lets test

This commit is contained in:
2026-05-06 17:11:14 +02:00
parent ae083c2bb8
commit ae689f7f56

View File

@@ -337,7 +337,7 @@ getEnemyTeam()
} }
updateWeapon() updateWeapon()
{ {
if(self.current > (level.gungameList.size - 1)) if(self.current >= level.gungameList.size)
{ {
self thread tryNuke(); self thread tryNuke();
return; return;
@@ -379,6 +379,7 @@ updateWeapon()
if(self getCurrentWeapon() == "none" && !self isMantling() && !self isOnLadder()) // in rare case weapon does not exist if(self getCurrentWeapon() == "none" && !self isMantling() && !self isOnLadder()) // in rare case weapon does not exist
{ {
waitFrame();
self updateWeapon(); self updateWeapon();
} }
} }
@@ -443,21 +444,27 @@ onKilling() {
if(killsPerWeapon > 1) if(killsPerWeapon > 1)
{ {
if(self.gungameKills % killsPerWeapon == 0) if(self.gungameKills % killsPerWeapon == 0)
{
if(self.current < level.gungameList.size)
{ {
self.current++; self.current++;
self thread updateWeapon(); self thread updateWeapon();
} }
}
killsInGun = (self.gungameKills % killsPerWeapon); killsInGun = (self.gungameKills % killsPerWeapon);
self.weaponhud setValue(self.current); self.weaponhud setValue(self.current);
self.killhud setValue(killsInGun); self.killhud setValue(killsInGun);
} }
else else
{
if(self.current < level.gungameList.size)
{ {
self.current++; self.current++;
self thread updateWeapon(); self thread updateWeapon();
self.weaponhud setValue(self.current); self.weaponhud setValue(self.current);
} }
} }
}
if(self.current >= (level.gungameList.size-5) && !isDefined(self.markerIcon)) if(self.current >= (level.gungameList.size-5) && !isDefined(self.markerIcon))
self thread initCreateMarkerIcon(); self thread initCreateMarkerIcon();
self refreshCounter(refreshCounter); self refreshCounter(refreshCounter);
@@ -617,8 +624,9 @@ lowerMultitext(multiplier)
} }
tryNuke() tryNuke()
{ {
if(isDefined(level.startNuke)) if(isDefined(level.nukeCalled) || isDefined(level.startNuke))
return; return;
level.nukeCalled = true;
level.state = "aftermatch"; level.state = "aftermatch";
level notify("nuke"); level notify("nuke");
if(getDvar("g_gametype") != "gungame_team") if(getDvar("g_gametype") != "gungame_team")
@@ -750,6 +758,8 @@ takeInvalidWeapon()
while(1) while(1)
{ {
waitFrame(); waitFrame();
if(self.current >= level.gungameList.size)
break;
if(!isAlive(self)) if(!isAlive(self))
continue; continue;
if(self isMantling()) if(self isMantling())