From dae9ff4eea5fbc8e25765ae2a1914608daf98217 Mon Sep 17 00:00:00 2001 From: cdnutter Date: Thu, 6 Jun 2024 09:46:31 -0700 Subject: [PATCH] tidied up variant name code --- maps/mp/gametypes/_rank.gsc | 49 ++++++++++++++----------------------- 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/maps/mp/gametypes/_rank.gsc b/maps/mp/gametypes/_rank.gsc index 4d5e6a2..6d3415b 100755 --- a/maps/mp/gametypes/_rank.gsc +++ b/maps/mp/gametypes/_rank.gsc @@ -399,8 +399,6 @@ doDvars() { // Put threads that are called with every respawn switch(level.variantType) { case 0: - self.variantName = "Random Guns"; - // Marathon self maps\mp\perks\_perks::givePerk("specialty_marathon"); self maps\mp\perks\_perks::givePerk("specialty_longersprint"); @@ -418,8 +416,6 @@ doDvars() { // Put threads that are called with every respawn self thread randomGuns(); break; case 1: - self.variantName = "Snipers Only"; - // Sleight of Hand Pro self maps\mp\perks\_perks::givePerk("specialty_fastsnipe"); self maps\mp\perks\_perks::givePerk("specialty_fastreload"); @@ -437,8 +433,6 @@ doDvars() { // Put threads that are called with every respawn self thread snipersOnly(); break; case 2: - self.variantName = "Standard Progression"; - // Marathon self maps\mp\perks\_perks::givePerk("specialty_marathon"); self maps\mp\perks\_perks::givePerk("specialty_longersprint"); @@ -456,8 +450,6 @@ doDvars() { // Put threads that are called with every respawn self thread standardGuns(); break; case 3: - self.variantName = "Reverse Progression"; - // Marathon self maps\mp\perks\_perks::givePerk("specialty_marathon"); self maps\mp\perks\_perks::givePerk("specialty_longersprint"); @@ -474,27 +466,17 @@ doDvars() { // Put threads that are called with every respawn self thread reverseOrder(); break; - } if(self.firstRun) { self thread maps\mp\gametypes\_hud_message::hintMessage("^:Chroma ^7Games ^4Presents..."); - self thread maps\mp\gametypes\_hud_message::hintMessage("^7High Count Gun Game"); - - switch(level.variantType) { - case 0: - self thread maps\mp\gametypes\_hud_message::hintMessage("^3Random Weapons"); - break; - case 1: - self thread maps\mp\gametypes\_hud_message::hintMessage("^3Snipers Only"); - break; - case 2: - self thread maps\mp\gametypes\_hud_message::hintMessage("^:IAmChrisAMA's ^3Set"); - break; - } - self.firstRun = false; + self thread maps\mp\gametypes\_hud_message::hintMessage("^7Enhanced ^3Gun Game"); + self thread maps\mp\gametypes\_hud_message::hintMessage("^3" + self.variantName); + self thread maps\mp\gametypes\_hud_message::hintMessage("^1No melee allowed."); } + self.firstRun = false; + self notifyOnPlayercommand("E", "+melee"); self.didMelee = false; @@ -504,17 +486,24 @@ doDvars() { // Put threads that are called with every respawn // Prevent Melee spam if (self.didMelee != true) { - self thread maps\mp\gametypes\_hud_message::hintMessage("No melee allowed."); + self thread maps\mp\gametypes\_hud_message::hintMessage("^1No melee allowed."); self.didMelee = true; } - curwep = self getCurrentWeapon(); - self takeWeapon(curwep); + curWeapon = self getCurrentWeapon(); + curAmmoL = self getWeaponAmmoClip(curWeapon, "left"); + curAmmoR = self getWeaponAmmoClip(curWeapon, "right"); - if(isSubStr( curwep, "akimbo" )) { - self giveWeapon(curwep, 8, true); + self takeWeapon(curWeapon); + + if(isSubStr( curWeapon, "akimbo" )) { + self giveWeapon(curWeapon, 8, true); + self setWeaponAmmoClip( curWeapon, curAmmoL, "left" ); + self setWeaponAmmoClip( curWeapon, curAmmoR, "right" ); } else { - self giveWeapon(curwep, 8, false); + self giveWeapon(curWeapon, 8, false); + self setWeaponAmmoClip( curWeapon, curAmmoL, "left" ); + self setWeaponAmmoClip( curWeapon, curAmmoR, "right" ); } } @@ -547,7 +536,7 @@ doGun() { wait .2; } - self giveMaxAmmo(self.gunList[self.curgun].name); + //self giveMaxAmmo(self.gunList[self.curgun].name); wait .2; } }