SERVER: Re-set spawnflags for perk_random machines

This commit is contained in:
Steam Deck User 2023-02-04 21:34:28 -05:00
parent 7d842bc720
commit 593e63d56c

View file

@ -2012,6 +2012,7 @@ void() perk_random =
// Quick Revive // Quick Revive
if (i < (1/8) && (self.spawnflags & 1)) { if (i < (1/8) && (self.spawnflags & 1)) {
if !(find(world, classname, "perk_revive")) { if !(find(world, classname, "perk_revive")) {
self.spawnflags = 8;
perk_revive(); perk_revive();
foundperk = true; foundperk = true;
} }
@ -2019,6 +2020,7 @@ void() perk_random =
// Jugger-Nog // Jugger-Nog
else if (i < (2/8) && (self.spawnflags & 2)) { else if (i < (2/8) && (self.spawnflags & 2)) {
if !(find(world, classname, "perk_juggernog")) { if !(find(world, classname, "perk_juggernog")) {
self.spawnflags = 2;
perk_juggernog(); perk_juggernog();
foundperk = true; foundperk = true;
} }
@ -2026,6 +2028,7 @@ void() perk_random =
// Speed Cola // Speed Cola
else if (i < (3/8) && (self.spawnflags & 4)) { else if (i < (3/8) && (self.spawnflags & 4)) {
if !(find(world, classname, "perk_speed")) { if !(find(world, classname, "perk_speed")) {
self.spawnflags = 4;
perk_speed(); perk_speed();
foundperk = true; foundperk = true;
} }
@ -2033,6 +2036,7 @@ void() perk_random =
// Double Tap // Double Tap
else if (i < (4/8) && (self.spawnflags & 8)) { else if (i < (4/8) && (self.spawnflags & 8)) {
if !(find(world, classname, "perk_double")) { if !(find(world, classname, "perk_double")) {
self.spawnflags = 16;
perk_double(); perk_double();
foundperk = true; foundperk = true;
} }
@ -2040,6 +2044,7 @@ void() perk_random =
// PhD Flopper // PhD Flopper
else if (i < (5/8) && (self.spawnflags & 16)) { else if (i < (5/8) && (self.spawnflags & 16)) {
if !(find(world, classname, "perk_flopper")) { if !(find(world, classname, "perk_flopper")) {
self.spawnflags = 16;
perk_flopper(); perk_flopper();
foundperk = true; foundperk = true;
} }
@ -2047,6 +2052,7 @@ void() perk_random =
// Stamin-Up // Stamin-Up
else if (i < (6/8) && (self.spawnflags & 32)) { else if (i < (6/8) && (self.spawnflags & 32)) {
if !(find(world, classname, "perk_staminup")) { if !(find(world, classname, "perk_staminup")) {
self.spawnflags = 16;
perk_staminup(); perk_staminup();
foundperk = true; foundperk = true;
} }
@ -2054,6 +2060,7 @@ void() perk_random =
// Deadshot Daiquiri // Deadshot Daiquiri
else if (i < (7/8) && (self.spawnflags & 64)) { else if (i < (7/8) && (self.spawnflags & 64)) {
if (!find(world, classname, "perk_deadshot")) { if (!find(world, classname, "perk_deadshot")) {
self.spawnflags = 16;
perk_deadshot(); perk_deadshot();
foundperk = true; foundperk = true;
} }
@ -2061,6 +2068,7 @@ void() perk_random =
// Mule Kick // Mule Kick
else if (i < 1 && (self.spawnflags & 128)) { else if (i < 1 && (self.spawnflags & 128)) {
if (!find(world, classname, "perk_mule")) { if (!find(world, classname, "perk_mule")) {
self.spawnflags = 4;
perk_mule(); perk_mule();
foundperk = true; foundperk = true;
} }