adding latest mod patch

This commit is contained in:
2026-05-05 19:57:49 +02:00
parent 27a9cb2234
commit 7ee4431049
3 changed files with 24 additions and 15 deletions

View File

@@ -172,7 +172,7 @@ CodeCallback_PlayerKilled(eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon
if(getDvar("gunmode") != "Kill Confirmed") if(getDvar("gunmode") != "Kill Confirmed")
{ {
if(sWeapon == "riotshield_mp" && getDvar("gunmode") == "Fungame") if(sWeapon == "riotshield_mp" && getDvar("gunmode") == "Fungame")
eAttacker.gungameKills += 2; eAttacker.gungameKills += getDvarInt("gun_kills", 1);
else else
eAttacker.gungameKills++; eAttacker.gungameKills++;
} }

View File

@@ -39,6 +39,7 @@ setGamemodes()
initializeGametype(type) // called in vote.gsc after first map initializeGametype(type) // called in vote.gsc after first map
{ {
setDvar("gunmode", type); setDvar("gunmode", type);
setDvar("gun_kills", 1); // Default to 1 kill per weapon
if(type == "Team Gungame") if(type == "Team Gungame")
setDvar("g_gametype", "gungame_team"); setDvar("g_gametype", "gungame_team");
else else
@@ -89,6 +90,7 @@ initializeGametype(type) // called in vote.gsc after first map
setDvar("streaks_online", 1); setDvar("streaks_online", 1);
setDvar("jump_height", 0.5); setDvar("jump_height", 0.5);
setDvar("amount_weapons", 150); setDvar("amount_weapons", 150);
setDvar("gun_kills", 1);
break; break;
default: // not required default: // not required
setDvar("global_health", 70); setDvar("global_health", 70);
@@ -333,7 +335,7 @@ updateWeapon()
if(level.state == "prematch" || level.state == "ingame") if(level.state == "prematch" || level.state == "ingame")
self show(); self show();
if(self.isJugger) if(self.isJugger)
self setMoveSpeedScale(.7); self setMoveSpeedScale(1);
else if(self.speed) else if(self.speed)
self setMoveSpeedScale(1.6); self setMoveSpeedScale(1.6);
if(level.state == "prematch") if(level.state == "prematch")
@@ -381,16 +383,19 @@ onKilling() {
self thread scorepopup(-100); self thread scorepopup(-100);
kills--; kills--;
refreshCounter++; refreshCounter++;
if(getDvar("gunmode") == "Fungame") killsPerWeapon = getDvarInt("gun_kills", 1);
if(killsPerWeapon > 1)
{ {
killsInGun = (self.gungameKills % 2); killsInGun = (self.gungameKills % killsPerWeapon);
self.weaponhud setValue(self.current); self.weaponhud setValue(self.current);
self.killhud setValue(killsInGun); self.killhud setValue(killsInGun);
self.killhud.alpha = 1;
self.killtotalhud.alpha = 1;
} }
else else
{ {
self.weaponhud setValue(self.current); self.weaponhud setValue(self.current);
self.killhud.alpha = 0; // hide kill progress if not Fungame self.killhud.alpha = 0;
self.killtotalhud.alpha = 0; self.killtotalhud.alpha = 0;
} }
self refreshCounter(refreshCounter); self refreshCounter(refreshCounter);
@@ -404,14 +409,15 @@ onKilling() {
self.streaking++; self.streaking++;
if(getDvar("g_gametype") != "gungame_team") if(getDvar("g_gametype") != "gungame_team")
{ {
if(getDvar("gunmode") == "Fungame") killsPerWeapon = getDvarInt("gun_kills", 1);
if(killsPerWeapon > 1)
{ {
if(self.gungameKills % 2 == 0) if(self.gungameKills % killsPerWeapon == 0)
{ {
self.current++; self.current++;
self thread updateWeapon(); self thread updateWeapon();
} }
killsInGun = (self.gungameKills % 2); killsInGun = (self.gungameKills % killsPerWeapon);
self.weaponhud setValue(self.current); self.weaponhud setValue(self.current);
self.killhud setValue(killsInGun); self.killhud setValue(killsInGun);
} }
@@ -636,11 +642,15 @@ createKillHud()
self.killtotalhud.hideWhenInMenu = true; self.killtotalhud.hideWhenInMenu = true;
self.killtotalhud.glowcolor = (1,0,0); self.killtotalhud.glowcolor = (1,0,0);
if(getDvar("gunmode") == "Fungame") killsPerWeapon = getDvarInt("gun_kills", 1);
if(killsPerWeapon > 1)
{ {
self.killhud.label = &"Kills: "; self.killhud.label = &"Kills: ";
self.killhud setValue(0); self.killhud setValue(0);
self.killtotalhud.label = &" / 2"; self.killtotalhud.label = &" / ";
self.killtotalhud setValue(killsPerWeapon);
self.killhud.alpha = 1;
self.killtotalhud.alpha = 1;
} }
else else
{ {

View File

@@ -495,12 +495,11 @@ startVote()
} }
} }
mod\main::initializeGametype(level.options[number].gamemode); mod\main::initializeGametype(level.options[number].gamemode);
setDvar("sv_maprotation", ("map " + level.options[number].map)); setDvar("sv_mapRotationCurrent", "map " + level.options[number].map);
setDvar("g_hardcore", 0); setDvar("sv_mapRotation", "map " + level.options[number].map);
wait 0.5;
exitLevel(false);
level.currentNextMap = level.options[number].map;
level notify("endVote"); level notify("endVote");
wait 0.1;
map(level.options[number].map);
} }
doControls() doControls()
{ {