Attempts to imitate UT2004-style respawn ghosts. When a dead player respawns, their last body becomes transparent and floats away.
set g_telefrags_avoid 0
set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed"
+set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns"
+set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"
+set g_respawn_ghosts_maxtime 6 "maximum amount of time a respawn ghost can last, minimum time is half this value. 0 disables and ghosts fade when the body would"
+
// fragmessage: This allows extra information to be displayed with the frag centerprints.
set sv_fragmessage_information_ping 0 "Enable ping display information, 0 = Never display; 1 = Always display (If the player is a bot, it will say bot instead of the ping.)"
set sv_fragmessage_information_handicap 1 "Enable handicap display information, 0 = Never display; 1 = Only when the player has handicap on; 2 = Always display (Displays Off if off)"
velocitymultiplier 20
velocityoffset 0 0 10
airfriction 1
+
+// effect for respawn ghosts
+// used in qcsrc/server/cl_client.qc: pointparticles(particleeffectnum("respawn_ghost"), self.origin, '0 0 0', 1)
+effect respawn_ghost
+count 75
+type static
+color 0xA0A0A0 0xFFFFFF
+size 2 2
+alpha 32 64 128
+airfriction 1
+liquidfriction 4
+originoffset 0 0 -8
+originjitter 28 28 16
+velocityjitter 0 0 256
\ No newline at end of file
else self.colormod = '1 1 1';
};*/
+.float oldcolormap;
void respawn(void)
{
+ if(self.modelindex != 0 && cvar("g_respawn_ghosts"))
+ {
+ self.solid = SOLID_NOT;
+ self.takedamage = DAMAGE_NO;
+ self.movetype = MOVETYPE_FLY;
+ self.velocity = '0 0 1' * cvar("g_respawn_ghosts_speed");
+ self.avelocity = randomvec() * cvar("g_respawn_ghosts_speed") * 3 - randomvec() * cvar("g_respawn_ghosts_speed") * 3;
+ self.effects |= EF_ADDITIVE;
+ self.oldcolormap = self.colormap;
+ self.colormap = 512;
+ pointparticles(particleeffectnum("respawn_ghost"), self.origin, '0 0 0', 1);
+ if(cvar("g_respawn_ghosts_maxtime"))
+ SUB_SetFade (self, time + cvar("g_respawn_ghosts_maxtime") / 2 + random () * (cvar("g_respawn_ghosts_maxtime") - cvar("g_respawn_ghosts_maxtime") / 2), 1.5);
+ }
+
CopyBody(1);
self.effects |= EF_NODRAW; // prevent another CopyBody
+ if(self.oldcolormap)
+ {
+ self.colormap = self.oldcolormap;
+ self.oldcolormap = 0;
+ }
PutClientInServer();
}
self.dmg_take = self.dmg_take + take;//max(take - 10, 0);
self.dmg_inflictor = inflictor;
- if (self.health <= -75 && self.modelindex != 0)
+ if (self.health <= -100 && self.modelindex != 0)
{
// don't use any animations as a gib
self.frame = 0;