| 1143 | } |
| 1144 | |
| 1145 | TargetSide 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 | |
| 1165 | TargetSide EntityAI::GetTargetSide(float accuracy) const |
| 1166 | { |
no test coverage detected