mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-23 06:15:43 +00:00
stop move
This commit is contained in:
parent
0028cfb1f6
commit
79817cc03b
@ -132,6 +132,7 @@ resetBotVars()
|
|||||||
self.bot.last_pos = self.origin;
|
self.bot.last_pos = self.origin;
|
||||||
self.bot.moveTo = self.origin;
|
self.bot.moveTo = self.origin;
|
||||||
self.bot.climbing = false;
|
self.bot.climbing = false;
|
||||||
|
self.bot.stop_move = false;
|
||||||
|
|
||||||
self.bot.isfrozen = false;
|
self.bot.isfrozen = false;
|
||||||
self.bot.isreloading = false;
|
self.bot.isreloading = false;
|
||||||
@ -2000,7 +2001,7 @@ walk()
|
|||||||
|
|
||||||
self botMoveTo(self.origin);
|
self botMoveTo(self.origin);
|
||||||
|
|
||||||
if(self.bot.isfrozen)
|
if(self.bot.isfrozen || self.bot.stop_move)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(self maps\mp\_flashgrenades::isFlashbanged())
|
if(self maps\mp\_flashgrenades::isFlashbanged())
|
||||||
|
@ -1516,6 +1516,7 @@ bot_use_tube_think()
|
|||||||
}
|
}
|
||||||
|
|
||||||
self SetScriptAimPos(loc);
|
self SetScriptAimPos(loc);
|
||||||
|
self BotStopMoving(true);
|
||||||
wait 1;
|
wait 1;
|
||||||
|
|
||||||
self setSpawnWeapon(tube);
|
self setSpawnWeapon(tube);
|
||||||
@ -1529,6 +1530,7 @@ bot_use_tube_think()
|
|||||||
}
|
}
|
||||||
|
|
||||||
self ClearScriptAimPos(loc);
|
self ClearScriptAimPos(loc);
|
||||||
|
self BotStopMoving(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1632,11 +1634,13 @@ bot_use_grenade_think()
|
|||||||
}
|
}
|
||||||
|
|
||||||
self SetScriptAimPos(loc);
|
self SetScriptAimPos(loc);
|
||||||
|
self BotStopMoving(true);
|
||||||
wait 1;
|
wait 1;
|
||||||
|
|
||||||
self throwBotGrenade(nade);
|
self throwBotGrenade(nade);
|
||||||
|
|
||||||
self ClearScriptAimPos(loc);
|
self ClearScriptAimPos(loc);
|
||||||
|
self BotStopMoving(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2696,9 +2700,6 @@ bot_killstreak_think()
|
|||||||
{
|
{
|
||||||
if (streakName == "airdrop_mega" || streakName == "airdrop_sentry_minigun" || streakName == "airdrop")
|
if (streakName == "airdrop_mega" || streakName == "airdrop_sentry_minigun" || streakName == "airdrop")
|
||||||
{
|
{
|
||||||
if (self HasScriptGoal() || self.bot_lock_goal)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (streakName != "airdrop_mega" && level.littleBirds > 2)
|
if (streakName != "airdrop_mega" && level.littleBirds > 2)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -2716,15 +2717,15 @@ bot_killstreak_think()
|
|||||||
if (!bulletTracePassed(forwardTrace["position"], forwardTrace["position"]+(0,0,2048), false, self) && self.pers["bots"]["skill"]["base"] > 3)
|
if (!bulletTracePassed(forwardTrace["position"], forwardTrace["position"]+(0,0,2048), false, self) && self.pers["bots"]["skill"]["base"] > 3)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
self SetScriptGoal(self.origin, 16);
|
self BotStopMoving(true);
|
||||||
if (self throwBotGrenade(ksWeap) != "grenade_fire")
|
if (self throwBotGrenade(ksWeap) != "grenade_fire")
|
||||||
{
|
{
|
||||||
self ClearScriptGoal();
|
self BotStopMoving(false);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self waittill_any_timeout( 15, "new_goal", "crate_physics_done" ) != "new_goal")
|
if (self waittill_any_timeout( 15, "new_goal", "crate_physics_done" ) != "new_goal")
|
||||||
self ClearScriptGoal();
|
self BotStopMoving(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,14 @@ BotPressAttack(time)
|
|||||||
self maps\mp\bots\_bot_internal::pressFire(time);
|
self maps\mp\bots\_bot_internal::pressFire(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BotStopMoving(what)
|
||||||
|
{
|
||||||
|
self.bot.stop_move = what;
|
||||||
|
|
||||||
|
if(what)
|
||||||
|
self notify("kill_goal");
|
||||||
|
}
|
||||||
|
|
||||||
getValidTube()
|
getValidTube()
|
||||||
{
|
{
|
||||||
weaps = self getweaponslistall();
|
weaps = self getweaponslistall();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user