This commit is contained in:
INeedBots 2020-11-12 02:05:08 -06:00
parent 965c34b946
commit 16ae35f892

View File

@ -1090,8 +1090,17 @@ bot_killstreak_think()
break; break;
case "helicopter_mp": case "helicopter_mp":
if(isDefined( level.chopper )) chopper = level.chopper;
if (isDefined(chopper) && !isEntity(chopper))
chopper = level.chopper[self.team];
if (isDefined(chopper))
continue; continue;
if (isDefined( level.mannedchopper ))
continue;
break; break;
case "airstrike_mp": case "airstrike_mp":
@ -1262,23 +1271,30 @@ bot_kill_chopper()
if(!self getAmmoCount("rpg_mp") && self BotGetRandom() < 90) if(!self getAmmoCount("rpg_mp") && self BotGetRandom() < 90)
continue; continue;
if(!isDefined(level.chopper)) chopper = level.chopper;
if(isDefined(chopper) && !isEntity(chopper))
{
chopper = level.chopper[ level.otherTeam[self.team] ];
}
if (!isdefined(chopper))
continue; continue;
if(!isDefined(level.bot_chopper) || !level.bot_chopper)//must be crashing or leaving if(!isDefined(level.bot_chopper) || !level.bot_chopper)//must be crashing or leaving
continue; continue;
if(isDefined(level.chopper.owner) && level.chopper.owner == self) if(isDefined(chopper.owner) && chopper.owner == self)
continue; continue;
if(level.chopper.team == self.team && level.teamBased) if(chopper.team == self.team && level.teamBased)
continue; continue;
if(!bulletTracePassed( self getEyePos(), level.chopper.origin + (0, 0, -5), false, level.chopper )) if(!bulletTracePassed( self getEyePos(), chopper.origin + (0, 0, -5), false, chopper ))
continue; continue;
self SetScriptEnemy( level.chopper, (0, 0, -5) ); self SetScriptEnemy( chopper, (0, 0, -5) );
self bot_chopper_attack(level.chopper); self bot_chopper_attack(chopper);
self ClearScriptEnemy(); self ClearScriptEnemy();
} }
} }