mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 05:55:42 +00:00
ll
This commit is contained in:
parent
0106fab764
commit
a130a9ecb0
@ -140,6 +140,9 @@ handleBots()
|
|||||||
level thread diffBots();
|
level thread diffBots();
|
||||||
level addBots();
|
level addBots();
|
||||||
|
|
||||||
|
while(!level.intermission)
|
||||||
|
wait 0.05;
|
||||||
|
|
||||||
setDvar("bots_manage_add", getBotArray().size);
|
setDvar("bots_manage_add", getBotArray().size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1078,7 +1078,7 @@ grenade_danager()
|
|||||||
|
|
||||||
curWeap = self GetCurrentWeapon();
|
curWeap = self GetCurrentWeapon();
|
||||||
|
|
||||||
if (!isWeaponDroppable(curWeap))
|
if (!isWeaponPrimary(curWeap))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
myEye = self getEye();
|
myEye = self getEye();
|
||||||
@ -2138,7 +2138,7 @@ knife(ent, knifeDist)
|
|||||||
|
|
||||||
curWeap = self GetCurrentWeapon();
|
curWeap = self GetCurrentWeapon();
|
||||||
|
|
||||||
if (!isWeaponDroppable(curWeap))
|
if (!isWeaponPrimary(curWeap))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (self.bot.knifing || self.bot.isfraggingafter)
|
if (self.bot.knifing || self.bot.isfraggingafter)
|
||||||
@ -2316,7 +2316,7 @@ botThrowGrenade(grenName)
|
|||||||
|
|
||||||
curWeap = self GetCurrentWeapon();
|
curWeap = self GetCurrentWeapon();
|
||||||
|
|
||||||
if (!isWeaponDroppable(curWeap))
|
if (!isWeaponPrimary(curWeap))
|
||||||
return "cur weap is not droppable";
|
return "cur weap is not droppable";
|
||||||
|
|
||||||
if (self.bot.knifingafter)
|
if (self.bot.knifingafter)
|
||||||
|
@ -258,7 +258,7 @@ getKillstreaks()
|
|||||||
{
|
{
|
||||||
streak_name = tableLookupByRow( "mp/killstreakTable.csv", i, 1 );
|
streak_name = tableLookupByRow( "mp/killstreakTable.csv", i, 1 );
|
||||||
|
|
||||||
if(streak_name == "")
|
if(streak_name == "" || streak_name == "none")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(streak_name == "b1")
|
if(streak_name == "b1")
|
||||||
@ -1052,7 +1052,7 @@ bot_weapon_think()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(curWeap != "none" && self getAmmoCount(curWeap) && curWeap != "stinger_mp" && curWeap != "javelin_mp")
|
if(curWeap != "none" && self getAmmoCount(curWeap) && curWeap != "stinger_mp" && curWeap != "javelin_mp" && curWeap != "onemanarmy_mp")
|
||||||
{
|
{
|
||||||
if(randomInt(100) > self.pers["bots"]["behavior"]["switch"])
|
if(randomInt(100) > self.pers["bots"]["behavior"]["switch"])
|
||||||
continue;
|
continue;
|
||||||
@ -1071,10 +1071,10 @@ bot_weapon_think()
|
|||||||
if(!self getAmmoCount(weapon))
|
if(!self getAmmoCount(weapon))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!isWeaponDroppable(weapon))
|
if (!isWeaponPrimary(weapon))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(curWeap == weapon || weapon == "none" || weapon == "")
|
if(curWeap == weapon || weapon == "none" || weapon == "" || weapon == "javelin_mp" || weapon == "stinger_mp" || weapon == "onemanarmy_mp")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
weap = weapon;
|
weap = weapon;
|
||||||
@ -1253,7 +1253,7 @@ bot_killstreak_think()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
curWeap = self GetCurrentWeapon();
|
curWeap = self GetCurrentWeapon();
|
||||||
if (!isWeaponDroppable(curWeap))
|
if (!isWeaponPrimary(curWeap))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (self isEMPed())
|
if (self isEMPed())
|
||||||
|
@ -13,11 +13,6 @@ is_bot()
|
|||||||
return ((isDefined(self.pers["isBot"]) && self.pers["isBot"]) || (isDefined(self.pers["isBotWarfare"]) && self.pers["isBotWarfare"]) || isSubStr( self.guid, "bot" ));
|
return ((isDefined(self.pers["isBot"]) && self.pers["isBot"]) || (isDefined(self.pers["isBotWarfare"]) && self.pers["isBotWarfare"]) || isSubStr( self.guid, "bot" ));
|
||||||
}
|
}
|
||||||
|
|
||||||
entIsVehicle(ent)
|
|
||||||
{
|
|
||||||
return (ent.classname == "script_vehicle" || ent.model == "vehicle_uav_static_mp" || ent.model == "vehicle_ac130_coop");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Returns how much the bot is ads'ing all the way.
|
Returns how much the bot is ads'ing all the way.
|
||||||
*/
|
*/
|
||||||
@ -167,19 +162,6 @@ GetThreat()
|
|||||||
return self.bot.target.entity;
|
return self.bot.target.entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
Returns if the given weapon is full auto.
|
|
||||||
*/
|
|
||||||
WeaponIsFullAuto(weap)
|
|
||||||
{
|
|
||||||
weaptoks = strtok(weap, "_");
|
|
||||||
|
|
||||||
assert(isDefined(weaptoks[0]));
|
|
||||||
assert(isString(weaptoks[0]));
|
|
||||||
|
|
||||||
return !isDefined(level.bots_nonfullautoguns[weaptoks[0]]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Returns if the bot has a script enemy.
|
Returns if the bot has a script enemy.
|
||||||
*/
|
*/
|
||||||
@ -201,6 +183,34 @@ IsBotKnifing()
|
|||||||
return self.bot.knifing;
|
return self.bot.knifing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getBotVelocity()
|
||||||
|
{
|
||||||
|
return self.bot.velocity;
|
||||||
|
}
|
||||||
|
|
||||||
|
isWeaponPrimary(weap)
|
||||||
|
{
|
||||||
|
return (maps\mp\gametypes\_weapons::isPrimaryWeapon(weap) || maps\mp\gametypes\_weapons::isAltModeWeapon(weap));
|
||||||
|
}
|
||||||
|
|
||||||
|
entIsVehicle(ent)
|
||||||
|
{
|
||||||
|
return (ent.classname == "script_vehicle" || ent.model == "vehicle_uav_static_mp" || ent.model == "vehicle_ac130_coop");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Returns if the given weapon is full auto.
|
||||||
|
*/
|
||||||
|
WeaponIsFullAuto(weap)
|
||||||
|
{
|
||||||
|
weaptoks = strtok(weap, "_");
|
||||||
|
|
||||||
|
assert(isDefined(weaptoks[0]));
|
||||||
|
assert(isString(weaptoks[0]));
|
||||||
|
|
||||||
|
return !isDefined(level.bots_nonfullautoguns[weaptoks[0]]);
|
||||||
|
}
|
||||||
|
|
||||||
IsDefusing()
|
IsDefusing()
|
||||||
{
|
{
|
||||||
return (isDefined(self.isDefusing) && self.isDefusing);
|
return (isDefined(self.isDefusing) && self.isDefusing);
|
||||||
@ -234,11 +244,6 @@ IsStunned()
|
|||||||
return (isdefined(self.concussionEndTime) && self.concussionEndTime > gettime());
|
return (isdefined(self.concussionEndTime) && self.concussionEndTime > gettime());
|
||||||
}
|
}
|
||||||
|
|
||||||
getBotVelocity()
|
|
||||||
{
|
|
||||||
return self.bot.velocity;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Returns if we are beingArtilleryShellshocked
|
Returns if we are beingArtilleryShellshocked
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user