SERVER: Adjust Power-Up spawning height

This commit is contained in:
cypress 2024-04-07 20:27:10 -07:00
parent 67d9815be4
commit aaca254c03
3 changed files with 14 additions and 4 deletions

View file

@ -192,7 +192,7 @@ void() Dog_Death = {
}
if(rounds == dogRound && Remaining_Zombies == 0) {
Spawn_Powerup(self.origin + '0 0 12', PU_MAXAMMO);
Spawn_Powerup(self.origin, PU_MAXAMMO);
}
if (self.onfire || self.electro_targeted) {
@ -232,7 +232,7 @@ void() Dog_Death_Tesla = {
tesla_spark(self.origin);
if(rounds == dogRound && Remaining_Zombies == 0) {
Spawn_Powerup(self.origin + '0 0 12', PU_MAXAMMO);
Spawn_Powerup(self.origin, PU_MAXAMMO);
}
dog_die_wunder1();

View file

@ -1190,12 +1190,12 @@ void() Zombie_Death =
{
if (total_powerup_points >= powerup_score_threshold)
{
Spawn_Powerup(self.origin + '0 0 13', -1);
Spawn_Powerup(self.origin, -1);
powerup_activate *= 1.14;
powerup_score_threshold = total_powerup_points + powerup_activate;
}
else if (random () <= 0.02)
Spawn_Powerup(self.origin + '0 0 13', -1);
Spawn_Powerup(self.origin, -1);
}
}

View file

@ -34,6 +34,9 @@
#define PU_CARPENTER 3
#define PU_MAXAMMO 4
#define PU_OFFSET_QK '0 0 13'
#define PU_OFFSET_HL '0 0 16'
var struct powerup_struct
{
float id;
@ -702,6 +705,13 @@ void(vector where, float type) Spawn_Powerup =
entity powerup;
entity sparkle;
// Move the Power-Up up a little to be near the player's
// mid torso.
if (map_compatibility_mode == MAP_COMPAT_BETA)
where += PU_OFFSET_QK;
else
where += PU_OFFSET_HL;
// Set Up Power-Up
powerup = PU_GetFreeEnt();