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())
|
if (!self inFinalStand() && !self IsUsingRemote())
|
||||||
{
|
{
|
||||||
|
while (self.bot.knifing || self.bot.tryingtofrag || self.disabledWeapon)
|
||||||
|
wait 0.05;
|
||||||
|
waittillframeend;
|
||||||
|
|
||||||
pistol = undefined;
|
pistol = undefined;
|
||||||
weaponsList = self GetWeaponsListPrimaries();
|
weaponsList = self GetWeaponsListPrimaries();
|
||||||
foreach ( weapon in weaponsList )
|
foreach ( weapon in weaponsList )
|
||||||
@ -1213,6 +1217,9 @@ grenade_danager()
|
|||||||
{
|
{
|
||||||
wait 1;
|
wait 1;
|
||||||
|
|
||||||
|
if (self inLastStand() && !self _hasPerk("specialty_laststandoffhand") && !self inFinalStand())
|
||||||
|
continue;
|
||||||
|
|
||||||
if (self.bot.isfrozen || level.gameEnded || !gameFlag( "prematch_done" ))
|
if (self.bot.isfrozen || level.gameEnded || !gameFlag( "prematch_done" ))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -117,6 +117,24 @@ getValidGrenade()
|
|||||||
return random(possibles);
|
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)
|
throwBotGrenade(gname, gtime)
|
||||||
{
|
{
|
||||||
return self maps\mp\bots\_bot_internal::botThrowGrenade(gname, gtime);
|
return self maps\mp\bots\_bot_internal::botThrowGrenade(gname, gtime);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user