Question: Can you explain this
Код:
int personIndex = GamePlay.gpPlayer().PlacePrimary();
if (personIndex < 0)
personIndex = GamePlay.gpPlayer().PlaceSecondary();
AiPerson person = (GamePlay.gpPlayer().Place() as AiCart).Person(personIndex);
if (person.Health <= 0)
return;
if (Campaign != null) {
if (Campaign.battleSuccess != null)
return;
Campaign.battleSuccess = true;
}
GamePlay.gpHUDLogCenter("MISSION COMPLETE");
piece of code, please? it makes no real sense to me. IT's from the official gb campain and can be found in several missions at the end of the inherited OnActorDead function (for example in the "Stuka Intercept.cs" script). It looks like is checking to see if the player is still alive.. yet.. why check a secondary place (I assume PlaceSecondary it's a second seat, like the gunner in a Stuka), as the player is in a single seated aircraft, and why the as AiCart part, instead as AiAircraft? Please have mercy and try to enlighten me
