mirror of
https://github.com/ineedbots/t4_bot_warfare.git
synced 2025-04-22 07:55:43 +00:00
More sprinting
This commit is contained in:
parent
f0aa54189d
commit
3c7e07866f
@ -457,17 +457,25 @@ stance()
|
|||||||
self prone();
|
self prone();
|
||||||
|
|
||||||
curweap = self getCurrentWeapon();
|
curweap = self getCurrentWeapon();
|
||||||
|
time = getTime();
|
||||||
|
chance = self.pers["bots"]["behavior"]["sprint"];
|
||||||
|
|
||||||
|
if (time - self.lastSpawnTime < 5000)
|
||||||
|
chance *= 2;
|
||||||
|
|
||||||
|
if(isDefined(self.bot.script_goal) && DistanceSquared(self.origin, self.bot.script_goal) > 256*256)
|
||||||
|
chance *= 2;
|
||||||
|
|
||||||
if(toStance != "stand" || self.bot.isreloading || self.bot.issprinting || self.bot.isfraggingafter || self.bot.issmokingafter)
|
if(toStance != "stand" || self.bot.isreloading || self.bot.issprinting || self.bot.isfraggingafter || self.bot.issmokingafter)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(randomInt(100) > self.pers["bots"]["behavior"]["sprint"])
|
if(randomInt(100) > chance)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(isDefined(self.bot.target) && self canFire(curweap) && self isInRange(self.bot.target.dist, curweap))
|
if(isDefined(self.bot.target) && self canFire(curweap) && self isInRange(self.bot.target.dist, curweap))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(self.bot.sprintendtime != -1 && getTime() - self.bot.sprintendtime < 2000)
|
if(self.bot.sprintendtime != -1 && time - self.bot.sprintendtime < 2000)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(!isDefined(self.bot.towards_goal) || DistanceSquared(self.origin, self.bot.towards_goal) < level.bots_minSprintDistance || getConeDot(self.bot.towards_goal, self.origin, self GetPlayerAngles()) < 0.75)
|
if(!isDefined(self.bot.towards_goal) || DistanceSquared(self.origin, self.bot.towards_goal) < level.bots_minSprintDistance || getConeDot(self.bot.towards_goal, self.origin, self GetPlayerAngles()) < 0.75)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user