Uses botWeapon

This commit is contained in:
INeedBots 2020-11-10 13:55:05 -06:00
parent cd7d315460
commit bf671d646a
2 changed files with 6 additions and 16 deletions

View File

@ -288,11 +288,10 @@ onWeaponChange()
if (newWeapon == "none") if (newWeapon == "none")
{ {
self changeToWeap(self.lastDroppableWeapon);
continue; continue;
} }
self changeToWeap(self GetCurrentWeapon()); self changeToWeap(newWeapon);
} }
} }
@ -1815,14 +1814,5 @@ prone()
*/ */
changeToWeap(weap) changeToWeap(weap)
{ {
toks = strtok(weap, "_"); self botWeapon(weap);
if (toks[0] == "gl")
{
self setSpawnWeapon(weap);
//self botWeapon("");
return;
}
//self botWeapon(weap);
self setSpawnWeapon(weap);
} }

View File

@ -1007,7 +1007,7 @@ bot_weapon_think()
if(threat.classname == "script_vehicle" && self getAmmoCount("rpg_mp") && curWeap != "rpg_mp") if(threat.classname == "script_vehicle" && self getAmmoCount("rpg_mp") && curWeap != "rpg_mp")
{ {
self setSpawnWeapon("rpg_mp"); self BotChangeToWeapon("rpg_mp");
continue; continue;
} }
} }
@ -1047,7 +1047,7 @@ bot_weapon_think()
if(weap == "") if(weap == "")
continue; continue;
self setSpawnWeapon(weap);//until switchToWeapon works... self BotChangeToWeapon(weap);//until switchToWeapon works...
} }
} }
@ -1135,7 +1135,7 @@ bot_killstreak_think()
continue; continue;
self BotFreezeControls(true); self BotFreezeControls(true);
self setSpawnWeapon(self.pers["hardPointItem"]); self BotChangeToWeapon(self.pers["hardPointItem"]);
wait 1; wait 1;
if(isAirstrikePos && !isDefined( level.airstrikeInProgress )) if(isAirstrikePos && !isDefined( level.airstrikeInProgress ))
{ {
@ -1145,7 +1145,7 @@ bot_killstreak_think()
self BotFreezeControls(false); self BotFreezeControls(false);
if(self getCurrentWeapon() != self.lastDroppableWeapon) if(self getCurrentWeapon() != self.lastDroppableWeapon)
self setSpawnWeapon(self.lastDroppableWeapon); self BotChangeToWeapon(self.lastDroppableWeapon);
} }
} }