mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 22:05:44 +00:00
perk
This commit is contained in:
parent
d19928e485
commit
027c808e4c
@ -2109,6 +2109,8 @@ watchOnGoal(goal, dis)
|
|||||||
while(DistanceSquared(self.origin, goal) > dis)
|
while(DistanceSquared(self.origin, goal) > dis)
|
||||||
wait 0.05;
|
wait 0.05;
|
||||||
|
|
||||||
|
if (isDefined(self.bot.script_goal) && self.bot.script_goal == goal)
|
||||||
|
self notify("script_goal");
|
||||||
self notify("goal");
|
self notify("goal");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1067,6 +1067,7 @@ bots_watch_touch_obj(obj)
|
|||||||
|
|
||||||
if (self IsTouching(obj))
|
if (self IsTouching(obj))
|
||||||
{
|
{
|
||||||
|
self notify("script_goal");
|
||||||
self notify("goal");
|
self notify("goal");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1108,7 +1109,7 @@ bot_perk_think()
|
|||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
wait randomIntRange(3,5);
|
wait randomIntRange(5,7);
|
||||||
|
|
||||||
if (self IsUsingRemote())
|
if (self IsUsingRemote())
|
||||||
continue;
|
continue;
|
||||||
@ -1123,15 +1124,15 @@ bot_perk_think()
|
|||||||
{
|
{
|
||||||
if (!self _hasPerk("_specialty_blastshield"))
|
if (!self _hasPerk("_specialty_blastshield"))
|
||||||
{
|
{
|
||||||
if (randomInt(100) < 50)
|
if (randomInt(100) < 65)
|
||||||
continue;
|
break;
|
||||||
|
|
||||||
self _setPerk("_specialty_blastshield");
|
self _setPerk("_specialty_blastshield");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (randomInt(100) < 90)
|
if (randomInt(100) < 90)
|
||||||
continue;
|
break;
|
||||||
|
|
||||||
self _unsetPerk("_specialty_blastshield");
|
self _unsetPerk("_specialty_blastshield");
|
||||||
}
|
}
|
||||||
@ -1160,17 +1161,14 @@ bot_perk_think()
|
|||||||
{
|
{
|
||||||
weap = weaponsList[i];
|
weap = weaponsList[i];
|
||||||
|
|
||||||
if (self getAmmoCount(weap))
|
if (self getAmmoCount(weap) || weap == "onemanarmy_mp")
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!isWeaponPrimary(weap))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
anyWeapout = true;
|
anyWeapout = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!anyWeapout && randomInt(100) < 90)
|
if ((!anyWeapout && randomInt(100) < 90) || randomInt(100) < 10)
|
||||||
continue;
|
break;
|
||||||
|
|
||||||
self BotFreezeControls(true);
|
self BotFreezeControls(true);
|
||||||
self setSpawnWeapon("onemanarmy_mp");
|
self setSpawnWeapon("onemanarmy_mp");
|
||||||
@ -1382,11 +1380,11 @@ bot_equipment_kill_think()
|
|||||||
self SetScriptGoal(target.origin, 16);
|
self SetScriptGoal(target.origin, 16);
|
||||||
self thread bots_watch_touch_obj( target );
|
self thread bots_watch_touch_obj( target );
|
||||||
|
|
||||||
path = self waittill_any_return("bad_path", "goal");
|
path = self waittill_any_return("bad_path", "goal", "script_goal");
|
||||||
|
|
||||||
self ClearScriptGoal();
|
self ClearScriptGoal();
|
||||||
|
|
||||||
if (path != "goal")
|
if (path != "script_goal")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
target.enemyTrigger notify("trigger", self);
|
target.enemyTrigger notify("trigger", self);
|
||||||
@ -1823,12 +1821,12 @@ bot_crate_think()
|
|||||||
self SetScriptGoal(crate.origin, 16);
|
self SetScriptGoal(crate.origin, 16);
|
||||||
self thread bots_watch_touch_obj(crate);
|
self thread bots_watch_touch_obj(crate);
|
||||||
|
|
||||||
path = self waittill_any_return("bad_path", "goal");
|
path = self waittill_any_return("bad_path", "goal", "script_goal");
|
||||||
|
|
||||||
self.bot_lock_goal = false;
|
self.bot_lock_goal = false;
|
||||||
self ClearScriptGoal();
|
self ClearScriptGoal();
|
||||||
|
|
||||||
if (path == "bad_path")
|
if (path != "script_goal")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
self _DisableWeapon();
|
self _DisableWeapon();
|
||||||
|
@ -598,6 +598,7 @@ load_waypoints()
|
|||||||
level.waypointsTube = [];
|
level.waypointsTube = [];
|
||||||
level.waypointsGren = [];
|
level.waypointsGren = [];
|
||||||
level.waypointsClay = [];
|
level.waypointsClay = [];
|
||||||
|
level.waypointsJav = [];
|
||||||
|
|
||||||
for(i = 0; i < level.waypointCount; i++)
|
for(i = 0; i < level.waypointCount; i++)
|
||||||
if(level.waypoints[i].type == "crouch" && level.waypoints[i].childCount == 1)
|
if(level.waypoints[i].type == "crouch" && level.waypoints[i].childCount == 1)
|
||||||
@ -608,6 +609,8 @@ load_waypoints()
|
|||||||
level.waypointsGren[level.waypointsGren.size] = level.waypoints[i];
|
level.waypointsGren[level.waypointsGren.size] = level.waypoints[i];
|
||||||
else if(level.waypoints[i].type == "claymore")
|
else if(level.waypoints[i].type == "claymore")
|
||||||
level.waypointsClay[level.waypointsClay.size] = level.waypoints[i];
|
level.waypointsClay[level.waypointsClay.size] = level.waypoints[i];
|
||||||
|
else if(level.waypoints[i].type == "javelin")
|
||||||
|
level.waypointsJav[level.waypointsJav.size] = level.waypoints[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user