fixed random for all players

master
Chris Nutter 2024-06-01 21:49:07 -07:00
parent 62adad1a07
commit cc484b379c
1 changed files with 7 additions and 6 deletions

View File

@ -7,10 +7,9 @@ initGuns() {
self.finalkills = 2; // Kills to win after getting final weapon self.finalkills = 2; // Kills to win after getting final weapon
self.gunList = []; self.gunList = [];
self.variantType = RandomInt(2);
self.variantName = ""; self.variantName = "";
switch(self.variantType) { switch(level.variantType) {
case 0: case 0:
self.variantName = "Random Guns"; self.variantName = "Random Guns";
self thread randomGuns(); self thread randomGuns();
@ -273,7 +272,7 @@ doDvars() { // Put threads that are called with every respawn
self thread maps\mp\gametypes\_hud_message::hintMessage("^:Chroma ^7Games presents..."); self thread maps\mp\gametypes\_hud_message::hintMessage("^:Chroma ^7Games presents...");
self thread maps\mp\gametypes\_hud_message::hintMessage("^7Gun Game"); self thread maps\mp\gametypes\_hud_message::hintMessage("^7Gun Game");
switch(self.variantType) { switch(level.variantType) {
case 0: case 0:
self thread maps\mp\gametypes\_hud_message::hintMessage("^7Random Weapons"); self thread maps\mp\gametypes\_hud_message::hintMessage("^7Random Weapons");
break; break;
@ -331,13 +330,15 @@ doScore() {
while(true) { while(true) {
scoreText setText("^:Weapon ^3" + (self.curgun + 1) + " ^2/^3 " + (self.gunList.size)); scoreText setText("^:Weapon ^3" + (self.curgun + 1) + " ^2/^3 " + (self.gunList.size));
variantText setText("^3" + (self.variantName)); variantText setText("^3" + (level.variantName));
wait .2; wait .2;
} }
} }
setVariantType() {
level.variantType = RandomInt(2);
}
// ================= // // ================= //
@ -404,7 +405,7 @@ init()
maps\mp\gametypes\_missions::buildChallegeInfo(); maps\mp\gametypes\_missions::buildChallegeInfo();
level thread patientZeroWaiter(); level thread patientZeroWaiter();
level thread setVariantType();
level thread onPlayerConnect(); level thread onPlayerConnect();
} }