float autocvar_g_respawn_delay_max;
bool autocvar_g_respawn_delay_forced;
bool autocvar_g_respawn_ghosts;
-float autocvar_g_respawn_ghosts_maxtime;
+float autocvar_g_respawn_ghosts_alpha;
+float autocvar_g_respawn_ghosts_fadetime;
+float autocvar_g_respawn_ghosts_time;
float autocvar_g_respawn_ghosts_speed;
int autocvar_g_respawn_waves;
string autocvar_g_shootfromfixedorigin;
this.velocity = '0 0 1' * autocvar_g_respawn_ghosts_speed;
this.avelocity = randomvec() * autocvar_g_respawn_ghosts_speed * 3 - randomvec() * autocvar_g_respawn_ghosts_speed * 3;
this.effects |= CSQCMODEL_EF_RESPAWNGHOST;
+ this.alpha = min(this.alpha, autocvar_g_respawn_ghosts_alpha);
Send_Effect(EFFECT_RESPAWN_GHOST, this.origin, '0 0 0', 1);
- if(autocvar_g_respawn_ghosts_maxtime)
- SUB_SetFade (this, time + autocvar_g_respawn_ghosts_maxtime / 2 + random () * (autocvar_g_respawn_ghosts_maxtime - autocvar_g_respawn_ghosts_maxtime / 2), 1.5);
+ if(autocvar_g_respawn_ghosts_time > 0)
+ SUB_SetFade(this, time + autocvar_g_respawn_ghosts_time, autocvar_g_respawn_ghosts_fadetime);
}
else
SUB_SetFade (this, time, 1); // fade out the corpse immediately
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"
+set g_respawn_ghosts_time 4.5 "amount of time a respawn ghost lasts before it starts fading out. 0 disables and ghosts fade when the body would"
+set g_respawn_ghosts_fadetime 1.5 "amount of time a respawn ghost takes to fade out"
+set g_respawn_ghosts_alpha 1 "respawn ghost alpha"
set sv_gibhealth 100 "Minus health a dead body must have in order to get gibbed"