mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-23 06:15:43 +00:00
Improved ti targetting, hearing foot steps and fixed scrambler
This commit is contained in:
parent
8ef677bf0d
commit
bfb0a9ea25
@ -371,8 +371,12 @@ watchScrabler()
|
||||
for ( i = level.players.size - 1; i >= 0; i-- )
|
||||
{
|
||||
player = level.players[i];
|
||||
|
||||
player.bot_isScrambled = false;
|
||||
}
|
||||
|
||||
for ( i = level.players.size - 1; i >= 0; i-- )
|
||||
{
|
||||
player = level.players[i];
|
||||
|
||||
if (!player _HasPerk("specialty_localjammer") || !isReallyAlive(player))
|
||||
continue;
|
||||
@ -393,7 +397,7 @@ watchScrabler()
|
||||
if (DistanceSquared(player2.origin, player.origin) > 100*100)
|
||||
continue;
|
||||
|
||||
player.bot_isScrambled = true;
|
||||
player2.bot_isScrambled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2934,11 +2934,8 @@ bot_equipment_kill_think()
|
||||
if ( !IsDefined( target ) )
|
||||
continue;
|
||||
|
||||
if (isDefined(target.enemyTrigger))
|
||||
if (isDefined(target.enemyTrigger) && !self HasScriptGoal() && !self.bot_lock_goal)
|
||||
{
|
||||
if ( self HasScriptGoal() || self.bot_lock_goal )
|
||||
continue;
|
||||
|
||||
self SetScriptGoal(target.origin, 64);
|
||||
self thread bot_inc_bots(target, true);
|
||||
self thread bots_watch_touch_obj( target );
|
||||
@ -2951,14 +2948,16 @@ bot_equipment_kill_think()
|
||||
if (path != "goal")
|
||||
continue;
|
||||
|
||||
if (randomInt(100) > self.pers["bots"]["behavior"]["camp"] * 10)
|
||||
target.enemyTrigger notify("trigger", self);
|
||||
else
|
||||
if (randomInt(100) < self.pers["bots"]["behavior"]["camp"] * 8)
|
||||
{
|
||||
self thread killCampAfterTime(randomIntRange(10,20));
|
||||
self thread killCampAfterEntGone(target);
|
||||
self CampAtSpot(target.origin, target.origin + (0, 0, 42));
|
||||
}
|
||||
|
||||
if (isDefined(target))
|
||||
target.enemyTrigger notify("trigger", self);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -2997,9 +2996,6 @@ bot_listen_to_steps()
|
||||
for(;;)
|
||||
{
|
||||
wait 1;
|
||||
|
||||
if(self HasScriptGoal() || self.bot_lock_goal)
|
||||
continue;
|
||||
|
||||
if(self.pers["bots"]["skill"]["base"] < 3)
|
||||
continue;
|
||||
@ -3078,6 +3074,9 @@ bot_listen_to_steps()
|
||||
continue;
|
||||
}
|
||||
|
||||
if (self HasScriptGoal() || self.bot_lock_goal)
|
||||
continue;
|
||||
|
||||
self SetScriptGoal( heard.origin, 64 );
|
||||
|
||||
if (self waittill_any_return( "goal", "bad_path", "new_goal" ) != "new_goal")
|
||||
|
Loading…
x
Reference in New Issue
Block a user