mirror of
https://github.com/nzp-team/quakec.git
synced 2025-02-16 09:01:41 +00:00
Server: Improve Power-Up drop rate consistency
This commit is contained in:
parent
d7d1f1e050
commit
976770c9bf
5 changed files with 10 additions and 8 deletions
|
@ -1132,10 +1132,11 @@ void() Zombie_Death =
|
|||
{
|
||||
if (totalpowerups < 4)
|
||||
{
|
||||
if (total_powerup_points >= powerup_activate)
|
||||
if (total_powerup_points >= powerup_score_threshold)
|
||||
{
|
||||
Spawn_Powerup(self.origin, 0);
|
||||
total_powerup_points = total_powerup_points - powerup_activate;
|
||||
powerup_activate *= 1.14;
|
||||
powerup_score_threshold = total_powerup_points + powerup_activate;
|
||||
}
|
||||
else if (random () <= 0.02)
|
||||
Spawn_Powerup(self.origin, 0);
|
||||
|
|
|
@ -543,6 +543,10 @@ void(entity person, float expamt, float doublepoint) addmoney =
|
|||
person.score += expamt;
|
||||
}
|
||||
|
||||
// Combine the positive score with the powerup score tally
|
||||
if (expamt > 0)
|
||||
total_powerup_points += expamt;
|
||||
|
||||
person.points += expamt;
|
||||
|
||||
UpdatePlayerPoints(person.playernum, person.points, expamt, person.kills, person.netname, person);
|
||||
|
|
|
@ -344,18 +344,14 @@ void(entity attacker, float d_style) DieHandler =
|
|||
attacker.kills++;
|
||||
if (d_style == S_HEADSHOT) {
|
||||
addmoney(attacker, 100, true);
|
||||
total_powerup_points = total_powerup_points + 100;
|
||||
attacker.headshots++;
|
||||
} else if (d_style == S_NORMAL) {
|
||||
addmoney(attacker, 60, true);
|
||||
total_powerup_points = total_powerup_points + 60;
|
||||
}
|
||||
else if (d_style == S_KNIFE){
|
||||
addmoney(attacker, 130, true);
|
||||
total_powerup_points = total_powerup_points + 130;
|
||||
} else if (d_style == S_TESLA) {
|
||||
addmoney(attacker, 50, true);
|
||||
total_powerup_points = total_powerup_points + 50;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -380,6 +380,7 @@ float x2_finished;
|
|||
float x2_blink;
|
||||
float total_windows_down;
|
||||
float total_powerup_points;
|
||||
float powerup_score_threshold;
|
||||
float powerup_activate;
|
||||
float nuke_powerup_active;
|
||||
float nuke_powerups_activated;
|
||||
|
|
|
@ -225,7 +225,6 @@ void() NewRound =
|
|||
Current_Zombies = 0;
|
||||
spawn_delay = 0;
|
||||
totalpowerups = 0;
|
||||
powerup_activate = powerup_activate*1.14;
|
||||
|
||||
if (rounds == dogRound && gotdog) {
|
||||
roundtype = 2;
|
||||
|
@ -342,7 +341,8 @@ void() InitRounds =
|
|||
roundtype = 1;
|
||||
delay_at_round = 2/0.95;
|
||||
totalpowerups = 0;
|
||||
powerup_activate = 2000/1.14;
|
||||
powerup_activate = 2000;
|
||||
powerup_score_threshold = ((player_count + 1) * G_STARTPOINTS) + powerup_activate;
|
||||
spawnAllZombEnts();
|
||||
round_changetime = time + 3.5;
|
||||
rounds_change = 1;
|
||||
|
|
Loading…
Reference in a new issue