test_sv_game:
stage: test
script:
- - export EXPECT=e67187c8446f97a8b062a431dccb89e0
+ - export EXPECT=1b80629ffd60bdd46befff04559d1fb9
- qcsrc/tools/sv_game-hashtest.sh
- exit $?
flag.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_PLAYERCLIP;
flag.damagedbytriggers = autocvar_g_ctf_flag_return_when_unreachable;
flag.damagedbycontents = false; // can be damaged by contents only when dropped
+ if(IL_CONTAINS(g_damagedbycontents, flag))
+ IL_REMOVE(g_damagedbycontents, flag);
flag.velocity = '0 0 0';
flag.mangle = flag.angles;
{
bool damagedbycontents_prev = this.damagedbycontents;
if(this.alpha >= 0)
- {
- if(autocvar_g_respawn_ghosts
- && !(this.effects & EF_NODRAW)) // only spawn one ghost
- {
- TransmuteToGhost(this);
- }
- else
- SUB_SetFade (this, time, 1); // fade out the corpse immediately
- }
+ SUB_SetFade (this, time, 1); // fade out the corpse immediately
CopyBody(this, 1);
this.damagedbycontents = damagedbycontents_prev;
float autocvar_g_respawn_delay_max;
bool autocvar_g_respawn_delay_forced;
bool autocvar_g_respawn_ghosts;
-bool autocvar_g_respawn_ghosts_gib;
float autocvar_g_respawn_ghosts_alpha = 1;
float autocvar_g_respawn_ghosts_fadetime = 1.5;
float autocvar_g_respawn_ghosts_time = 4.5;
this.view_ofs = '0 0 4';
Violence_GibSplash(this, 1, 1, attacker);
- //this.alpha = -1; //postpone after potential ghost spawn to avoid temp storing
+ this.alpha = -1;
this.solid = SOLID_NOT; // restore later
this.takedamage = DAMAGE_NO; // restore later
if(this.damagedbycontents)
IL_REMOVE(g_damagedbycontents, this);
this.damagedbycontents = false;
-
- if(autocvar_g_respawn_ghosts
- && autocvar_g_respawn_ghosts_gib
- && !(this.effects & EF_NODRAW)) // only spawn one ghost
- {
- TransmuteToGhost(this);
-
- CopyBody(this, 1);
- this.effects |= EF_NODRAW; // prevent another CopyBody and 2nd ghost spawns
- }
- this.alpha = -1;
}
}
}
});
}
+
+ if (autocvar_g_respawn_ghosts)
+ {
+ // spawn a ghost as the player died
+ //entity oldbody = CopyBody(this, 1);
+ CopyBody(this, 1);
+ TransmuteToGhost(this);
+ }
+
MUTATOR_CALLHOOK(PlayerDied, this);
}
}
this.solid = SOLID_NOT;
this.takedamage = DAMAGE_NO;
+ if(this.damagedbycontents)
+ IL_REMOVE(g_damagedbycontents, this);
this.damagedbycontents = false;
set_movetype(this, MOVETYPE_FLY);
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);
+ this.alpha = autocvar_g_respawn_ghosts_alpha;
Send_Effect(EFFECT_RESPAWN_GHOST, this.origin, '0 0 0', 1);
if(autocvar_g_respawn_ghosts_time > 0)
SUB_SetFade(this, time + autocvar_g_respawn_ghosts_time, autocvar_g_respawn_ghosts_fadetime);
set cl_deathglow 2 "number of seconds during which dead bodies glow out"
set cl_deathglow_min 0.5 "glow out up to this glow factor"
-set cl_respawn_ghosts_keepcolors 1 "if enabled respawn ghosts keep body colors"
+set cl_respawn_ghosts_keepcolors 1 "if enabled player ghosts keep body colors"
set _teams_available 0 "internal cvar, value is synced from the server to reflect currently available teams to join"
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_teleport_minspeed 0 "minimum speed that a player can keep when going through a teleporter which affects speed"
-set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns"
-set g_respawn_ghosts_gib 0 "spawn a ghost for gibbed players instantly"
-set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"
-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 g_respawn_ghosts 1 "if 1 dead players leave behind ghosts which float away"
+set g_respawn_ghosts_speed 5 "the speed with which ghosts float and rotate"
+set g_respawn_ghosts_time 4.5 "amount of time a 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 ghost takes to fade out"
+set g_respawn_ghosts_alpha 1 "ghost alpha"
set sv_gibhealth 100 "Minus health a dead body must have in order to get gibbed"