mirror of
https://github.com/nzp-team/quakec.git
synced 2025-02-16 09:01:41 +00:00
Server: Add explosion effect for Nuke'd Zombies
This commit is contained in:
parent
3f328c6cd4
commit
b5cb3207f6
2 changed files with 33 additions and 1 deletions
|
@ -1132,9 +1132,10 @@ void() Zombie_Death =
|
|||
{
|
||||
if (totalpowerups < 4)
|
||||
{
|
||||
Spawn_Powerup(self.origin + '0 0 13', 0);
|
||||
if (total_powerup_points >= powerup_score_threshold)
|
||||
{
|
||||
Spawn_Powerup(self.origin + '0 0 13', -1);
|
||||
//Spawn_Powerup(self.origin + '0 0 13', -1);
|
||||
powerup_activate *= 1.14;
|
||||
powerup_score_threshold = total_powerup_points + powerup_activate;
|
||||
}
|
||||
|
|
|
@ -218,6 +218,34 @@ void() PU_NukeFinalize =
|
|||
nuke_powerup_active = false;
|
||||
};
|
||||
|
||||
//
|
||||
// PU_NukeExplosionThink()
|
||||
// Think function for Nuke explosions.
|
||||
//
|
||||
void() PU_NukeExplosionThink =
|
||||
{
|
||||
self.frame++;
|
||||
|
||||
if (self.frame >= 5)
|
||||
remove(self);
|
||||
|
||||
self.nextthink = time + 0.10;
|
||||
}
|
||||
|
||||
//
|
||||
// PU_NukeExplode()
|
||||
// Spawns an explosion sprite.
|
||||
//
|
||||
void(vector org) PU_NukeExplode =
|
||||
{
|
||||
entity explosion = spawn();
|
||||
setmodel(explosion, "models/sprites/explosion.spr");
|
||||
setorigin(explosion, org);
|
||||
explosion.think = PU_NukeExplosionThink;
|
||||
explosion.nextthink = time + 0.10;
|
||||
explosion.ltime = time + 3;
|
||||
}
|
||||
|
||||
//
|
||||
// PU_NukeKill()
|
||||
// Kills Targets when Nuke is active.
|
||||
|
@ -237,6 +265,9 @@ void() PU_NukeKill =
|
|||
self = self.goaldummy;
|
||||
}
|
||||
|
||||
// play explosion effects
|
||||
PU_NukeExplode(self.origin + '0 0 13');
|
||||
|
||||
// kill a target
|
||||
self.th_die();
|
||||
|
||||
|
|
Loading…
Reference in a new issue