mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 05:55:42 +00:00
fix laststnad
This commit is contained in:
parent
154332f014
commit
af5d7e9c6e
@ -1070,6 +1070,10 @@ onLastStand()
|
||||
|
||||
if (!self inFinalStand() && !self IsUsingRemote())
|
||||
{
|
||||
while (self.bot.knifing || self.bot.tryingtofrag || self.disabledWeapon)
|
||||
wait 0.05;
|
||||
waittillframeend;
|
||||
|
||||
pistol = undefined;
|
||||
weaponsList = self GetWeaponsListPrimaries();
|
||||
foreach ( weapon in weaponsList )
|
||||
@ -1213,6 +1217,9 @@ grenade_danager()
|
||||
{
|
||||
wait 1;
|
||||
|
||||
if (self inLastStand() && !self _hasPerk("specialty_laststandoffhand") && !self inFinalStand())
|
||||
continue;
|
||||
|
||||
if (self.bot.isfrozen || level.gameEnded || !gameFlag( "prematch_done" ))
|
||||
continue;
|
||||
|
||||
|
@ -117,6 +117,24 @@ getValidGrenade()
|
||||
return random(possibles);
|
||||
}
|
||||
|
||||
botChangeWeapon(weapon)
|
||||
{
|
||||
self endon("death");
|
||||
self endon("disconnect");
|
||||
|
||||
if (level.gameEnded || !gameFlag( "prematch_done" ) || self.bot.isfrozen || self IsUsingRemote())
|
||||
return;
|
||||
|
||||
if(self isDefusing() || self isPlanting())
|
||||
return;
|
||||
|
||||
if (self.bot.knifing || self.bot.isfraggingafter)
|
||||
return;
|
||||
|
||||
if (self.disabledWeapon)
|
||||
return;
|
||||
}
|
||||
|
||||
throwBotGrenade(gname, gtime)
|
||||
{
|
||||
return self maps\mp\bots\_bot_internal::botThrowGrenade(gname, gtime);
|
||||
|
Loading…
x
Reference in New Issue
Block a user