adding akimbo gl deagle to classic mode, fixing bug where player sometimes would get the fallback gun after dieing
This commit is contained in:
@@ -845,7 +845,6 @@ takeInvalidWeapon()
|
|||||||
self endon("disconnect");
|
self endon("disconnect");
|
||||||
self endon("death");
|
self endon("death");
|
||||||
level endon("nuke");
|
level endon("nuke");
|
||||||
counter = 0;
|
|
||||||
// Skip the first 5 frames so the initial updateWeapon() from loadSetup() has
|
// Skip the first 5 frames so the initial updateWeapon() from loadSetup() has
|
||||||
// time to complete its switchtoweaponimmediate before we start polling.
|
// time to complete its switchtoweaponimmediate before we start polling.
|
||||||
// This prevents a false-positive correction that was causing the 2.5s delay.
|
// This prevents a false-positive correction that was causing the 2.5s delay.
|
||||||
@@ -859,15 +858,6 @@ takeInvalidWeapon()
|
|||||||
if(self isMantling())
|
if(self isMantling())
|
||||||
continue;
|
continue;
|
||||||
weapon = self getCurrentWeapon();
|
weapon = self getCurrentWeapon();
|
||||||
if(!self hasWeapon(level.gungameList[self.current]))
|
|
||||||
{
|
|
||||||
counter++;
|
|
||||||
if(counter == 2)
|
|
||||||
{
|
|
||||||
counter = 0;
|
|
||||||
level.gungameList[self.current] = mod\weapons::setWeapon("peacekeeper_mp");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(weapon != level.gungameList[self.current])
|
if(weapon != level.gungameList[self.current])
|
||||||
{
|
{
|
||||||
self takeAllWeapons();
|
self takeAllWeapons();
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ loadWeapons()
|
|||||||
// pistols
|
// pistols
|
||||||
weaponList[weaponList.size] = "usp_mp";
|
weaponList[weaponList.size] = "usp_mp";
|
||||||
weaponList[weaponList.size] = "deserteagle_mp";
|
weaponList[weaponList.size] = "deserteagle_mp";
|
||||||
|
weaponList[weaponList.size] = "deserteagle_akimbo_mp"; // GL deagle
|
||||||
weaponList[weaponList.size] = "coltanaconda_mp";
|
weaponList[weaponList.size] = "coltanaconda_mp";
|
||||||
weaponList[weaponList.size] = "beretta_mp";
|
weaponList[weaponList.size] = "beretta_mp";
|
||||||
// semi auto pistols
|
// semi auto pistols
|
||||||
@@ -118,7 +119,7 @@ loadWeapons()
|
|||||||
// Only remove specific weapons if we still have enough unique ones left
|
// Only remove specific weapons if we still have enough unique ones left
|
||||||
if(weaponList.size > 5)
|
if(weaponList.size > 5)
|
||||||
{
|
{
|
||||||
if(weaponList[id] == "m79_mp" || weaponList[id] == "at4_mp" || weaponList[id] == "rpg_mp" || weaponList[id] == "riotshield_mp" || weaponList[id] == "dragunov_mp" || weaponList[id] == "m40a3_mp" || weaponList[id] == "peacekeeper_mp")
|
if(weaponList[id] == "m79_mp" || weaponList[id] == "at4_mp" || weaponList[id] == "rpg_mp" || weaponList[id] == "riotshield_mp" || weaponList[id] == "dragunov_mp" || weaponList[id] == "m40a3_mp" || weaponList[id] == "peacekeeper_mp" || weaponList[id] == "deserteagle_akimbo_mp")
|
||||||
weaponList = removeIDfromArray(id, weaponList);
|
weaponList = removeIDfromArray(id, weaponList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -137,6 +138,10 @@ removeIDfromArray(id, weaponList)
|
|||||||
}
|
}
|
||||||
setWeapon(name)
|
setWeapon(name)
|
||||||
{
|
{
|
||||||
|
// If the caller already specified a fully-qualified akimbo weapon (e.g.
|
||||||
|
// "deserteagle_akimbo_mp"), pass it through unchanged — no randomization.
|
||||||
|
if(isSubstr(name, "_akimbo_"))
|
||||||
|
return name;
|
||||||
name = strTok(name, "_");
|
name = strTok(name, "_");
|
||||||
scope = "";
|
scope = "";
|
||||||
attachments = "";
|
attachments = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user