diff --git a/source/server/defs/custom.qc b/source/server/defs/custom.qc index 278df76..ce9417f 100644 --- a/source/server/defs/custom.qc +++ b/source/server/defs/custom.qc @@ -511,11 +511,12 @@ float round_changetime; float blink_return; float delay_at_round; float spawn_delay; -float maxreward; -float totalreward; float totalpowerups; float sounds_playing; +float barricade_reward_maximum; +.float barricade_reward; + float rounds; float rounds_change; diff --git a/source/server/entities/window.qc b/source/server/entities/window.qc index 5fae691..275db31 100644 --- a/source/server/entities/window.qc +++ b/source/server/entities/window.qc @@ -59,12 +59,12 @@ void() screen_shake = void() Window_repaired = { - if (maxreward > totalreward) + if (barricade_reward_maximum > self.enemy.barricade_reward) { sound(self, 0,"sounds/misc/ching.wav", 1, ATTN_NORM); Player_AddScore(self.enemy, 10, true); - totalreward = totalreward + 10; + self.enemy.barricade_reward += 10; } screen_shake(); self.enemy = world; diff --git a/source/server/rounds.qc b/source/server/rounds.qc index 93b7db8..f4623d9 100644 --- a/source/server/rounds.qc +++ b/source/server/rounds.qc @@ -240,16 +240,18 @@ void() NewRound = // Set everyone to full health. tempe.health = tempe.max_health; + // Reset total repaired barricades for this round + tempe.barricade_reward = 0; + tempe = find(tempe, classname, "player"); } set_z_health(); - maxreward = 50 * rounds; - if (maxreward > 500) - maxreward = 500; + barricade_reward_maximum = 50 * rounds; + if (barricade_reward_maximum > 500) + barricade_reward_maximum = 500; - totalreward = 0; Current_Zombies = 0; spawn_delay = 0; totalpowerups = 0;