MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / GetTargetSide

Method GetTargetSide

engine/Poseidon/AI/VehicleAIDiag.cpp:1145–1163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1143}
1144
1145TargetSide EntityAI::GetTargetSide() const
1146{
1147 if (_isDead)
1148 {
1149 return TCivilian;
1150 }
1151
1152 AIUnit* unit = CommanderUnit();
1153 if (unit)
1154 {
1155 if (unit->GetPerson()->GetExperience() < ExperienceRenegadeLimit)
1156 {
1157 // he is crazy - shooting at friendlies - enemy to all sides
1158 return TEnemy;
1159 }
1160 }
1161
1162 return base::GetTargetSide();
1163}
1164
1165TargetSide EntityAI::GetTargetSide(float accuracy) const
1166{

Callers 6

AvoidBeInWithFunction · 0.45
CheckNearFriendliesFunction · 0.45
AddTargetMethod · 0.45
ProcessMethod · 0.45
ListCountSideHFunction · 0.45
ObjSideFunction · 0.45

Calls 5

GetTargetSideFunction · 0.85
GetExperienceMethod · 0.80
GetPersonMethod · 0.80
GetCaptiveMethod · 0.80
GetTypeFunction · 0.50

Tested by

no test coverage detected