Done as a single issue since there is not so many as it was with UTIL_GetLocalPlayer().
-
CAI_PlaneSolver::GenerateObstacleNpcs. The player is used as an obstacle under certain conditions via AddObstacle method. We need to iterate through all players.
To find: find sk_controller_enemy_avoidance_distance convar object, CNPC_AlienController::OverrideMove uses it multiple times, it calls CAI_LocalNavigator::AddObstacle (?at the end?), CAI_LocalNavigator::AddObstacle calls CAI_PlaneSolver::AddObstacle, CAI_PlaneSolver::AddObstacle is called by two funcs, the large is what we need.
-
CAI_Expresser::SpeakFindResponse. The player is used to call ModifyOrAppendPlayerCriteria on it. We probably should use the nearest or most relevant player (not sure for now).
To find: find by string "RESPONSERULES: %s spoke '%s'. Found response".
-
CBaseCombatCharacter::Weapon_Drop( CBaseCombatWeapon *pWeapon, const Vector pvecTarget / = NULL */, const Vector pVelocity / = NULL */ ). Everything is fine in bms (but not it hl2dm) unless weapon_smg1 classname is used somehow. We should use the nearest player.
Offset exists.
-
CEntityDissolve::DissolveThink. The player is used for damage info. We should store a reference to the actual attacking entity/player that caused the dissolve.
-
CEntityDissolve::Create. The same issues as CEntityDissolve::DissolveThink.
To find: find CreateServerRagdoll by string "changeparent", one of many funcs it calls is CBaseAnimating::TransferDissolveFrom, one of the funcs that calls CBaseAnimating::TransferDissolveFrom is CEntityDissolve::Create (?the very first?).
-
CGlobalEntityList::FindEntityProcedural. Used to resolve special "procedural" entity names that start with the ! character. We should use the nearest player in case if we got "!player" or "!pvsplayer" (for the fallback code) in szName.
To find: find by string "Invalid entity search name %s\n".
-
CFlextalkActor::ProcessSceneEvents. The player is used as a look target. We should use the nearest player.
Offset exists.
-
CAI_ActBusyBehavior::GatherConditions. Used for case BA_INT_ZOMBIESLUMP. We should use the nearest player.
Offset exists.
-
CNPC_PlayerCompanion::GetIdealAccel. Returns the ideal acceleration rate for player companion NPCs. We should use the companion's owner or nearest player.
Offset exists.
-
CGameSystemTacticalAwareness::FrameUpdatePostEntityThink. NOT IN SOURCE SDK AS IT IS ONLY IN BMS!!! Seems to be used as action zone around the player to collect info for AI tactical awareness. AI suggested to choose one “tactical anchor” - the player around whom the battle is actually taking place (not necessarily the nearest).
Offset exists.
Done as a single issue since there is not so many as it was with UTIL_GetLocalPlayer().
CAI_PlaneSolver::GenerateObstacleNpcs. The player is used as an obstacle under certain conditions via AddObstacle method. We need to iterate through all players.
To find: find sk_controller_enemy_avoidance_distance convar object, CNPC_AlienController::OverrideMove uses it multiple times, it calls CAI_LocalNavigator::AddObstacle (?at the end?), CAI_LocalNavigator::AddObstacle calls CAI_PlaneSolver::AddObstacle, CAI_PlaneSolver::AddObstacle is called by two funcs, the large is what we need.
CAI_Expresser::SpeakFindResponse. The player is used to call ModifyOrAppendPlayerCriteria on it. We probably should use the nearest or most relevant player (not sure for now).
To find: find by string "RESPONSERULES: %s spoke '%s'. Found response".
CBaseCombatCharacter::Weapon_Drop( CBaseCombatWeapon *pWeapon, const Vector pvecTarget / = NULL */, const Vector pVelocity / = NULL */ ). Everything is fine in bms (but not it hl2dm) unless weapon_smg1 classname is used somehow. We should use the nearest player.
Offset exists.
CEntityDissolve::DissolveThink. The player is used for damage info. We should store a reference to the actual attacking entity/player that caused the dissolve.
CEntityDissolve::Create. The same issues as CEntityDissolve::DissolveThink.
To find: find CreateServerRagdoll by string "changeparent", one of many funcs it calls is CBaseAnimating::TransferDissolveFrom, one of the funcs that calls CBaseAnimating::TransferDissolveFrom is CEntityDissolve::Create (?the very first?).
CGlobalEntityList::FindEntityProcedural. Used to resolve special "procedural" entity names that start with the ! character. We should use the nearest player in case if we got "!player" or "!pvsplayer" (for the fallback code) in szName.
To find: find by string "Invalid entity search name %s\n".
CFlextalkActor::ProcessSceneEvents. The player is used as a look target. We should use the nearest player.
Offset exists.
CAI_ActBusyBehavior::GatherConditions. Used for case BA_INT_ZOMBIESLUMP. We should use the nearest player.
Offset exists.
CNPC_PlayerCompanion::GetIdealAccel. Returns the ideal acceleration rate for player companion NPCs. We should use the companion's owner or nearest player.
Offset exists.
CGameSystemTacticalAwareness::FrameUpdatePostEntityThink. NOT IN SOURCE SDK AS IT IS ONLY IN BMS!!! Seems to be used as action zone around the player to collect info for AI tactical awareness. AI suggested to choose one “tactical anchor” - the player around whom the battle is actually taking place (not necessarily the nearest).
Offset exists.