set g_telefrags_avoid 0\r
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"\r
\r
+set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns"\r
+set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"\r
+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"\r
+\r
set sv_gibhealth 75 "Minus health a dead body must have in order to get gibbed"\r
\r
// fragmessage: This allows extra information to be displayed with the frag centerprints. \r
else self.colormod = '1 1 1';\r
};*/\r
\r
+.float oldcolormap;\r
void respawn(void)\r
{\r
+ if(self.alpha >= 0 && self.modelindex != 0 && cvar("g_respawn_ghosts"))\r
+ {\r
+ self.solid = SOLID_NOT;\r
+ self.takedamage = DAMAGE_NO;\r
+ self.movetype = MOVETYPE_FLY;\r
+ self.velocity = '0 0 1' * cvar("g_respawn_ghosts_speed");\r
+ self.avelocity = randomvec() * cvar("g_respawn_ghosts_speed") * 3 - randomvec() * cvar("g_respawn_ghosts_speed") * 3;\r
+ self.effects |= EF_ADDITIVE;\r
+ self.oldcolormap = self.colormap;\r
+ self.colormap = 512;\r
+ pointparticles(particleeffectnum("respawn_ghost"), self.origin, '0 0 0', 1);\r
+ if(cvar("g_respawn_ghosts_maxtime"))\r
+ SUB_SetFade (self, time + cvar("g_respawn_ghosts_maxtime") / 2 + random () * (cvar("g_respawn_ghosts_maxtime") - cvar("g_respawn_ghosts_maxtime") / 2), 1.5);\r
+ }\r
+\r
CopyBody(1);\r
self.effects |= EF_NODRAW; // prevent another CopyBody\r
+ if(self.oldcolormap)\r
+ {\r
+ self.colormap = self.oldcolormap;\r
+ self.oldcolormap = 0;\r
+ }\r
PutClientInServer();\r
}\r
\r