Improved ti targetting, hearing foot steps and fixed scrambler

This commit is contained in:
INeedGames 2020-12-23 22:12:11 -06:00
parent 8ef677bf0d
commit bfb0a9ea25
2 changed files with 15 additions and 12 deletions

View File

@ -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;
}
}
}

View File

@ -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;
}
@ -2998,9 +2997,6 @@ bot_listen_to_steps()
{
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")