// to force disable delay or waves, set them to 0.125
set g_ctf_respawn_delay 0
set g_ctf_respawn_waves 0
+ set g_ctf_weapon_stay 1
set g_dm_respawn_delay 0
set g_dm_respawn_waves 0
+ set g_dm_weapon_stay 0
set g_dom_respawn_delay 0
set g_dom_respawn_waves 0
+ set g_dom_weapon_stay 0
set g_lms_respawn_delay 0
set g_lms_respawn_waves 0
+ set g_lms_weapon_stay 0
set g_rune_respawn_delay 0
set g_rune_respawn_waves 0
+ set g_rune_weapon_stay 0
set g_tdm_respawn_delay 0
set g_tdm_respawn_waves 0
+ set g_tdm_weapon_stay 0
set g_kh_respawn_delay 0
set g_kh_respawn_waves 0
+ set g_kh_weapon_stay 0
set g_arena_respawn_delay 0
set g_arena_respawn_waves 0
+ set g_arena_weapon_stay 0
set g_ca_respawn_delay 0
set g_ca_respawn_waves 0
+ set g_ca_weapon_stay 0
set g_ca_damage2score_multiplier 0.01
set g_ca_round_timelimit 180
set g_nexball_respawn_delay 0
set g_nexball_respawn_waves 0
+ set g_nexball_weapon_stay 0
set g_as_respawn_delay 0
set g_as_respawn_waves 0
+ set g_as_weapon_stay 1
set g_ons_respawn_delay 0
set g_ons_respawn_waves 0
+ set g_ons_weapon_stay 0
set g_rc_respawn_waves 0
set g_rc_respawn_delay 0
+ set g_rc_weapon_stay 0
set g_cts_respawn_waves 0
- set g_cts_respawn_delay 0.25
+ set g_cts_respawn_delay 0
set g_cts_selfdamage 1 "0 = disable all selfdamage and falldamage in cts"
set g_cts_finish_kill_delay 10 "prevent cheating by running back to the start line, and starting out with more speed than otherwise possible"
+ set g_cts_weapon_stay 1
set g_freezetag_respawn_waves 0
- set g_freezetag_respawn_delay 0.25
+ set g_freezetag_respawn_delay 0
+ set g_freezetag_weapon_stay 1
set g_ka_respawn_delay 0
set g_ka_respawn_waves 0
+ set g_ka_weapon_stay 0
// overtime
seta timelimit_overtime 2 "duration in minutes of one added overtime, added to the timelimit"
// create this cvar in case the engine did not
set snd_soundradius 1200
+// loading screen
+scr_loadingscreen_scale 1
+scr_loadingscreen_scale_base 1
+scr_loadingscreen_scale_limit 1
+
// other config files
exec balanceXonotic.cfg
exec ctfscoring-ai.cfg
void ClientKill_Now()
{
+ remove(self.killindicator);
+ self.killindicator = world;
+
if(self.killindicator_teamchange)
ClientKill_Now_TeamChange();
// in any case:
Damage(self, self, self, 100000, DEATH_KILL, self.origin, '0 0 0');
- if(self.killindicator)
- {
- dprint("Cleaned up after a leaked kill indicator.\n");
- remove(self.killindicator);
- self.killindicator = world;
- }
+ // now I am sure the player IS dead
}
void KillIndicator_Think()
{
ClientKill_Now(); // no oldself needed
return;
}
+ else if(g_cts && self.health == 1) // health == 1 means that it's silent
+ {
+ self.nextthink = time + 1;
+ self.cnt -= 1;
+ }
else
{
if(self.cnt <= 10)
entity e;
killtime = autocvar_g_balance_kill_delay;
- if(g_race_qualifying)
+ if(g_race_qualifying || g_cts)
killtime = 0;
+ if(g_cts && self.killindicator && self.killindicator.health == 1) // self.killindicator.health == 1 means that the kill indicator was spawned by CTS_ClientKill
+ {
+ remove(self.killindicator);
+ self.killindicator = world;
+
+ ClientKill_Now(); // allow instant kill in this case
+ return;
+ }
+
self.killindicator_teamchange = targetteam;
- if(!self.killindicator)
+ if(!self.killindicator)
{
if(self.modelindex && self.deadflag == DEAD_NO)
{
ClientKill_TeamChange(0);
}
- void CTS_ClientKill_Think (void)
+ void CTS_ClientKill (entity e) // silent version of ClientKill, used when player finishes a CTS run. Useful to prevent cheating by running back to the start line and starting out with more speed
{
- self = self.owner; // set self to the player to be killed
- sprint(self, "^1You were killed in order to prevent cheating!");
- ClientKill_Now();
- }
-
- void CTS_ClientKill (float t) // silent version of ClientKill
- {
- entity e;
- e = spawn();
- e.owner = self;
- e.think = CTS_ClientKill_Think;
- e.nextthink = t;
+ e.killindicator = spawn();
+ e.killindicator.owner = e;
+ e.killindicator.think = KillIndicator_Think;
+ e.killindicator.nextthink = time + (e.lip) * 0.05;
+ e.killindicator.cnt = ceil(autocvar_g_cts_finish_kill_delay);
+ e.killindicator.health = 1; // this is used to indicate that it should be silent
+ e.lip = 0;
}
void DoTeamChange(float destteam)
if(frametime)
player_anim();
button_pressed = (self.BUTTON_ATCK || self.BUTTON_JUMP || self.BUTTON_ATCK2 || self.BUTTON_HOOK || self.BUTTON_USE);
- force_respawn = (g_lms || (g_ca) || autocvar_g_forced_respawn);
+ force_respawn = (g_lms || g_ca || g_cts || autocvar_g_forced_respawn);
if (self.deadflag == DEAD_DYING)
{
if(force_respawn)