Merge remote branch 'origin/fruitiex/ctsfix'
authorRudolf Polzer <divverent@alientrap.org>
Sun, 12 Dec 2010 13:43:25 +0000 (14:43 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 12 Dec 2010 13:43:25 +0000 (14:43 +0100)
44 files changed:
balanceXonotic.cfg
defaultXPM.cfg
defaultXonotic.cfg
physicsCPMA.cfg
physicsFruit.cfg
physicsHavoc.cfg
physicsLeeStricklin-ModdedFruit.cfg
physicsLeeStricklin.cfg
physicsLeeStricklinOld.cfg
physicsLzd.cfg
physicsNexuiz10.cfg
physicsNexuiz11.cfg
physicsNexuiz151.cfg
physicsNexuiz151b.cfg
physicsNexuiz16rc1.cfg
physicsNexuiz20.cfg
physicsNexuiz25.cfg
physicsNexuiz26.cfg
physicsNoQWBunny-nexbased.cfg
physicsQ.cfg
physicsQ2.cfg
physicsQ2a.cfg
physicsQ3.cfg
physicsQBF.cfg
physicsQBFplus.cfg
physicsSamual.cfg
physicsWarsow.cfg
physicsWarsowClassicBunny.cfg
physicsWarsowDev.cfg
physicsX0.cfg
physicsXPM.cfg
physicsXPMLight.cfg
qcsrc/client/scoreboard.qc
qcsrc/server/autocvars.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_physics.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_weapons.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/race.qc
qcsrc/server/t_quake3.qc
qcsrc/server/teamplay.qc

index def0f54..7228328 100644 (file)
@@ -99,7 +99,7 @@ set g_pickup_respawntime_short 15
 set g_pickup_respawntime_medium 20
 set g_pickup_respawntime_long 30
 set g_pickup_respawntime_powerup 120
-set g_pickup_respawntime_weapon 5
+set g_pickup_respawntime_weapon 10
 set g_pickup_respawntime_ammo 25
 set g_pickup_respawntimejitter_short 0
 set g_pickup_respawntimejitter_medium 0
@@ -294,7 +294,7 @@ set g_balance_uzi_bulletconstant 115 // 13.1qu
 // }}}
 // {{{ mortar
 set g_balance_grenadelauncher_primary_type 0
-set g_balance_grenadelauncher_primary_damage 50
+set g_balance_grenadelauncher_primary_damage 44
 set g_balance_grenadelauncher_primary_edgedamage 32
 set g_balance_grenadelauncher_primary_force 300
 set g_balance_grenadelauncher_primary_radius 115
@@ -312,7 +312,7 @@ set g_balance_grenadelauncher_primary_damageforcescale 0
 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
 
 set g_balance_grenadelauncher_secondary_type 1
-set g_balance_grenadelauncher_secondary_damage 70
+set g_balance_grenadelauncher_secondary_damage 62
 set g_balance_grenadelauncher_secondary_edgedamage 32
 set g_balance_grenadelauncher_secondary_force 300
 set g_balance_grenadelauncher_secondary_radius 150
@@ -333,7 +333,7 @@ set g_balance_grenadelauncher_bouncefactor 0.5
 set g_balance_grenadelauncher_bouncestop 0.12
 // }}}
 // {{{ minelayer
-set g_balance_minelayer_damage 35
+set g_balance_minelayer_damage 42
 set g_balance_minelayer_edgedamage 30
 set g_balance_minelayer_force 250
 set g_balance_minelayer_radius 175
@@ -452,7 +452,7 @@ set g_balance_crylink_secondary_line_lifetime 2 // range: 4000 full, fades to 80
 set g_balance_crylink_secondary_line_fadetime 2
 // }}}
 // {{{ nex
-set g_balance_nex_primary_damage 100
+set g_balance_nex_primary_damage 90
 set g_balance_nex_primary_force 500
 set g_balance_nex_primary_refire 1
 set g_balance_nex_primary_animtime 0.4
@@ -519,10 +519,10 @@ set g_balance_hagar_secondary_refire 0.12
 set g_balance_hagar_secondary_ammo 1
 // }}}
 // {{{ rocketlauncher
-set g_balance_rocketlauncher_damage 90
-set g_balance_rocketlauncher_edgedamage 30
+set g_balance_rocketlauncher_damage 82
+set g_balance_rocketlauncher_edgedamage 32
 set g_balance_rocketlauncher_force 350
-set g_balance_rocketlauncher_radius 125
+set g_balance_rocketlauncher_radius 130
 set g_balance_rocketlauncher_speed 1400
 set g_balance_rocketlauncher_speedaccel 1400
 set g_balance_rocketlauncher_speedstart 800
@@ -533,7 +533,7 @@ set g_balance_rocketlauncher_ammo 3
 set g_balance_rocketlauncher_health 0
 set g_balance_rocketlauncher_damageforcescale 0
 set g_balance_rocketlauncher_detonatedelay 0.05 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 40 // max degrees per second
+set g_balance_rocketlauncher_guiderate 42 // max degrees per second
 set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
 set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
 set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
@@ -610,8 +610,8 @@ set g_balance_campingrifle_reloadtime 2 // matches reload anim
 set g_balance_campingrifle_auto_reload_on_switch 0
 set g_balance_campingrifle_bursttime 0
 set g_balance_campingrifle_primary_tracer 1
-set g_balance_campingrifle_primary_damage 70
-set g_balance_campingrifle_primary_headshotaddeddamage 110
+set g_balance_campingrifle_primary_damage 60
+set g_balance_campingrifle_primary_headshotaddeddamage 100
 set g_balance_campingrifle_primary_spread 0
 set g_balance_campingrifle_primary_force 2
 set g_balance_campingrifle_primary_speed 40000
@@ -624,8 +624,8 @@ set g_balance_campingrifle_primary_burstcost 0
 set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
 set g_balance_campingrifle_secondary 1
 set g_balance_campingrifle_secondary_tracer 0
-set g_balance_campingrifle_secondary_damage 50
-set g_balance_campingrifle_secondary_headshotaddeddamage 75
+set g_balance_campingrifle_secondary_damage 42
+set g_balance_campingrifle_secondary_headshotaddeddamage 70
 set g_balance_campingrifle_secondary_spread 0
 set g_balance_campingrifle_secondary_force 2
 set g_balance_campingrifle_secondary_speed 20000
index 37aee96..35d5da9 100644 (file)
@@ -1,22 +1,32 @@
+// Xonotic ProMode
 exec defaultXonotic.cfg
-exec physicsXPM.cfg
 
-set g_start_weapon_laser 0
-set g_balance_weaponswitchdelay 0
+//==============
+// pure changes
+//==============
 
-set g_shootfromcenter 1
+// players
+sv_fbskin_green // visible playermodel forced on everyone
 
-set g_forced_respawn 1
+//================
+// impure changes
+//================
 
-set g_mirrordamage 0
-set g_friendlyfire 1
+// players
+g_jump_grunt 1 // make enemies even easier to hear when they're jumping around
 
-set timelimit_overtimes 1
+// physics
+exec physicsXPM.cfg // XPM physics. Similar to vanilla Xonotic physics, with a different way to accelerate: through strafejumping
 
-set sv_fragmessage_information_stats 0
+// balance
+set g_balance_weaponswitchdelay 0 // no switch animation, this is standard in "pro modes" ;)
+set g_shootfromcenter 1 // hit where you point at with the crosshair (almost so, no shooteye because it's really ugly)
 
-// force a visible playermodel!
-set sv_defaultcharacter 1
-set sv_defaultplayermodel "models/player/nyx.iqm"
-set sv_defaultplayercolors 60
-set g_fullbrightplayers 1
+// match rules
+set timelimit_overtimes 1 // overtimes on, draw matches are less interesting! :)
+set g_forced_respawn 1 // no delaying/cheating a match by not spawning
+set g_mirrordamage 0 // hurting teammates does not hurt you...
+set g_friendlyfire 1 // ...it hurts them.
+
+// info
+set sv_fragmessage_information_stats 0 // don't reveal how much health/armor the attacker had
index 7026fc4..e273cac 100644 (file)
@@ -596,40 +596,56 @@ set g_respawn_waves 0 "respawn in waves (every n seconds), intended to decrease
 // 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"
index 5660a33..2ae8d2d 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 320
index 82d996f..6467afa 100644 (file)
@@ -29,3 +29,4 @@ sv_doublejump 1 // TINY (1.35x normal) doublejumps only, can be disabled if want
 sv_jumpspeedcap_min 0 // need predicting? (it should already be in CSQC prediction code)
 sv_jumpspeedcap_max 0.35
 sv_jumpspeedcap_max_disable_on_ramps 1
+g_teleport_maxspeed 0
index f328f89..a19617d 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 805df99..c332942 100644 (file)
@@ -38,3 +38,4 @@ sv_doublejump 0 // TINY (1.35x normal) doublejumps only, can be disabled if want
 sv_jumpspeedcap_min 0 // need predicting? (it should already be in CSQC prediction code)
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
+g_teleport_maxspeed 0
index dc82a81..2f23ae7 100644 (file)
@@ -38,3 +38,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
+g_teleport_maxspeed 0
index 5d9a128..bb6133a 100644 (file)
@@ -33,3 +33,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max 0.38
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 0644990..01e446e 100644 (file)
@@ -31,3 +31,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 6e112b9..de2ff25 100644 (file)
@@ -31,3 +31,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index d4e1f54..64ac7b0 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 6cb19f1..c527b29 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 4796765..aa2f530 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index c4d60c7..0622e1a 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index d317514..1d15fe1 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index af5f386..5b6db6b 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 8fa5abc..f766152 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index e67832d..2f12a4e 100644 (file)
@@ -39,3 +39,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
+g_teleport_maxspeed 0
index 6fb02af..5093108 100644 (file)
@@ -31,3 +31,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 927fef3..dc580a5 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 1
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 7828cc6..c5f2111 100644 (file)
@@ -31,3 +31,4 @@ sv_doublejump 1
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 37973ae..a504271 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 320
index 2f32558..9725e8c 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 03be62d..75c70c1 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 7492b41..731b148 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 811084d..068d22c 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 467c421..72ca9ff 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 8a62f3e..051775d 100644 (file)
@@ -30,3 +30,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
+g_teleport_maxspeed 0
index 1897315..8fec026 100644 (file)
@@ -38,3 +38,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
+g_teleport_maxspeed 0
index 6c6b8a4..9191ab8 100644 (file)
@@ -34,3 +34,4 @@ sv_doublejump 1
 sv_jumpspeedcap_min 0
 sv_jumpspeedcap_max 0.5
 sv_jumpspeedcap_max_disable_on_ramps 1
+g_teleport_maxspeed 320
index 519db9f..3e7ee55 100644 (file)
@@ -34,3 +34,4 @@ sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
+g_teleport_maxspeed 0
index 502c448..31cdc45 100644 (file)
@@ -883,8 +883,10 @@ float HUD_WouldDrawScoreboard() {
                return 1;
        else if (intermission == 1)
                return 1;
-       else if (getstati(STAT_HEALTH) <= 0 && autocvar_cl_deathscoreboard)
+       else if (getstati(STAT_HEALTH) <= 0 && autocvar_cl_deathscoreboard && gametype != GAME_CTS)
                return 1;
+    else if (spectatee_status == -1)
+        return 1;
        else if (scoreboard_showscores_force)
                return 1;
        return 0;
index a93398b..c5beab2 100644 (file)
@@ -1086,6 +1086,7 @@ float autocvar_sv_dodging_sound;
 float autocvar_sv_dodging_up_speed;
 float autocvar_sv_dodging_wall_distance_threshold;
 float autocvar_sv_dodging_wall_dodging;
+float autocvar_sv_doublejump;
 float autocvar_sv_eventlog;
 float autocvar_sv_eventlog_console;
 float autocvar_sv_eventlog_files;
index 2b8dc18..475771f 100644 (file)
@@ -1270,6 +1270,11 @@ 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)
@@ -1301,12 +1306,21 @@ void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto, -2
        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)
                {
@@ -1374,20 +1388,15 @@ void ClientKill (void)
                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)
@@ -2737,7 +2746,7 @@ void PlayerPreThink (void)
                                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)
index ed459ae..e2feca9 100644 (file)
@@ -30,7 +30,7 @@ void PlayerJump (void)
        float doublejump;
 
        doublejump = FALSE;
-       if (sv_doublejump)
+       if (autocvar_sv_doublejump)
        {
                tracebox(self.origin + '0 0 0.01', self.mins, self.maxs, self.origin - '0 0 0.01', MOVE_NORMAL, self);
                if (trace_fraction < 1 && trace_plane_normal_z > 0.7)
index 27bd209..9fa4784 100644 (file)
@@ -669,7 +669,12 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                waves = 0;
                sdelay = cvar(strcat("g_", GetGametype(), "_respawn_delay"));
                if(!sdelay)
-                       sdelay = autocvar_g_respawn_delay;
+        {
+            if(g_cts)
+                sdelay = 0; // no respawn delay in CTS
+            else
+                sdelay = autocvar_g_respawn_delay;
+        }
                waves = cvar(strcat("g_", GetGametype(), "_respawn_waves"));
                if(!waves)
                        waves = autocvar_g_respawn_waves;
index db79588..cfe0126 100644 (file)
@@ -275,6 +275,8 @@ void W_ThrowWeapon(vector velo, vector delta, float doreduce)
                return;
        if (g_ca)
                return;
+    if (g_cts)
+        return;
        if(!autocvar_g_weapon_throwable)
                return;
        if(autocvar_g_weapon_stay == 1)
index c9a7e61..76ce748 100644 (file)
@@ -427,7 +427,6 @@ float sv_maxidle;
 float sv_maxidle_spectatorsareidle;
 
 float sv_pogostick;
-float sv_doublejump;
 float tracebox_hits_trigger_hurt(vector start, vector mi, vector ma, vector end);
 
 float next_pingtime;
index f064e53..6ab2900 100644 (file)
@@ -295,7 +295,8 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                {
                        if (deathtype == DEATH_TEAMCHANGE || deathtype == DEATH_AUTOTEAMCHANGE)
                                msg = ColoredTeamName(targ.team); // TODO: check if needed?
-                       Send_CSQC_Centerprint(targ, msg, "", deathtype, MSG_SUICIDE);
+            if(!g_cts) // no "killed your own dumb self" message in CTS
+                Send_CSQC_Centerprint(targ, msg, "", deathtype, MSG_SUICIDE);
 
                        if(deathtype != DEATH_TEAMCHANGE && deathtype != DEATH_QUIET)
                        {
index 11c97cc..632a4a5 100644 (file)
@@ -880,8 +880,10 @@ float want_weapon(string cvarprefix, entity weaponinfo, float allguns)
                        t = (weaponinfo.spawnflags & WEP_FLAG_NORMAL);
                else if(t < -1)
                        t = 0;
-               else if (g_race || g_cts)
-                       t = (i == WEP_LASER);
+               else if (g_race)
+                       t = (i == WEP_LASER || i == WEP_SHOTGUN);
+               else if (g_cts)
+                       t = (i == WEP_SHOTGUN);
                else if (g_nexball)
                        t = 0; // weapon is set a few lines later
                else
@@ -1164,6 +1166,7 @@ float sv_pitch_min;
 float sv_pitch_max;
 float sv_pitch_fixyaw;
 
+string GetGametype(); // g_world.qc
 void readlevelcvars(void)
 {
        // first load all the mutators
@@ -1214,6 +1217,8 @@ void readlevelcvars(void)
        sv_gentle = cvar("sv_gentle");
        sv_foginterval = cvar("sv_foginterval");
        g_cloaked = cvar("g_cloaked");
+    if(g_cts)
+        g_cloaked = 1; // always enable cloak in CTS
        g_jump_grunt = cvar("g_jump_grunt");
        g_footsteps = cvar("g_footsteps");
        g_grappling_hook = cvar("g_grappling_hook");
@@ -1297,7 +1302,9 @@ void readlevelcvars(void)
 
        g_pinata = cvar("g_pinata");
 
-       g_weapon_stay = cvar("g_weapon_stay");
+    g_weapon_stay = cvar(strcat("g_", GetGametype(), "_weapon_stay"));
+    if(!g_weapon_stay)
+        g_weapon_stay = cvar("g_weapon_stay");
 
        if (!g_weapon_stay && (cvar("deathmatch") == 2))
                g_weapon_stay = 1;
@@ -1750,6 +1757,14 @@ void objerror(string s)
     objerror_builtin(s);
 }
 
+.float remove_except_protected_forbidden;
+void remove_except_protected(entity e)
+{
+       if(e.remove_except_protected_forbidden)
+               error("not allowed to remove this at this point");
+       remove_builtin(e);
+}
+
 void remove_unsafely(entity e)
 {
     remove_builtin(e);
@@ -1800,6 +1815,11 @@ void InitializeEntitiesRun()
     entity startoflist;
     startoflist = initialize_entity_first;
     initialize_entity_first = world;
+    remove = remove_except_protected;
+    for (self = startoflist; self; self = self.initialize_entity_next)
+    {
+       self.remove_except_protected_forbidden = 1;
+    }
     for (self = startoflist; self; )
     {
         entity e;
@@ -1809,6 +1829,7 @@ void InitializeEntitiesRun()
         self.initialize_entity_order = 0;
         self.initialize_entity = func_null;
         self.initialize_entity_next = world;
+       self.remove_except_protected_forbidden = 0;
         if (self.classname == "initialize_entity")
         {
             entity e_old;
@@ -1817,9 +1838,16 @@ void InitializeEntitiesRun()
             self = e_old;
         }
         //dprint("Delayed initialization: ", self.classname, "\n");
-        func();
+        if(func != func_null)
+            func();
+        else
+        {
+            eprint(self);
+            backtrace(strcat("Null function in: ", self.classname, "\n"));
+        }
         self = e;
     }
+    remove = remove_unsafely;
 }
 
 .float uncustomizeentityforclient_set;
@@ -2595,7 +2623,6 @@ void zcurveparticles_from_tracetoss(float effectno, vector start, vector end, ve
        zcurveparticles(effectno, start, end, end_dz, vlen(vel));
 }
 
-string GetGametype(); // g_world.qc
 void write_recordmarker(entity pl, float tstart, float dt)
 {
     GameLogEcho(strcat(":recordset:", ftos(pl.playerid), ":", ftos(dt)));
index 80a379a..9817b3b 100644 (file)
@@ -308,7 +308,7 @@ void race_SendTime(entity e, float cp, float t, float tvalid)
                                        race_setTime(GetMapname(), t, e.crypto_idfp, e.netname, e);
                                        if(g_cts && autocvar_g_cts_finish_kill_delay)
                                        {
-                                               CTS_ClientKill(autocvar_g_cts_finish_kill_delay);
+                                               CTS_ClientKill(e);
                                        }
                                }
                                if(t < recordtime || recordtime == 0)
@@ -742,11 +742,21 @@ void trigger_race_checkpoint_verify()
                for(trigger = world; (trigger = find(trigger, classname, "trigger_multiple")); )
                        for(targ = world; (targ = find(targ, targetname, trigger.target)); )
                                if (targ.classname == "target_checkpoint" || targ.classname == "target_startTimer" || targ.classname == "target_stopTimer") {
-                                       targ.wait = -2;
+                                       trigger.wait = 0;
+                                       trigger.delay = 0;
+                                       targ.wait = 0;
                                        targ.delay = 0;
 
-                                       setsize(targ, trigger.mins, trigger.maxs);
-                                       setorigin(targ, trigger.origin);
+                    // These just make the game crash on some maps with oddly shaped triggers. 
+                    // (on the other hand they used to fix the case when two players ran through a checkpoint at once, 
+                    // and often one of them just passed through without being registered. Hope it's fixed  in a better way now.
+                    // (happened on item triggers too)
+                    //
+                                       //targ.wait = -2;
+                                       //targ.delay = 0;
+
+                                       //setsize(targ, trigger.mins, trigger.maxs);
+                                       //setorigin(targ, trigger.origin);
                                        //remove(trigger);
                                }
        }
index 241b8f7..44036ad 100644 (file)
@@ -47,11 +47,13 @@ void target_init_verify()
                for(targ = world; (targ = find(targ, targetname, trigger.target)); )
                        if (targ.classname == "target_init" || targ.classname == "target_give" || targ.classname == "target_items")
                        {
-                               targ.wait = -2;
+                               trigger.wait = 0;
+                               trigger.delay = 0;
+                               targ.wait = 0;
                                targ.delay = 0;
 
-                               setsize(targ, trigger.mins, trigger.maxs);
-                               setorigin(targ, trigger.origin);
+                               //setsize(targ, trigger.mins, trigger.maxs);
+                               //setorigin(targ, trigger.origin);
                                //remove(trigger);
                        }
 }
@@ -59,7 +61,7 @@ void target_init_verify()
 void spawnfunc_target_init()
 {
        self.spawnflags = 0; // remove all weapons except the ones listed below
-       self.netname = "laser uzi"; // keep these weapons through the remove trigger
+       self.netname = "shotgun"; // keep these weapons through the remove trigger
        spawnfunc_target_items();
        InitializeEntity(self, target_init_verify, INITPRIO_FINDTARGET);
 }
@@ -98,7 +100,9 @@ void target_give_init()
                        self.armorvalue = 100;
                else if (targ.classname == "item_health_mega")
                        self.health = 200;
-               remove(targ);
+               //remove(targ); // removing ents in init functions causes havoc, workaround:
+        targ.think = SUB_Remove;
+        targ.nextthink = time;
        }
        self.spawnflags = 2;
        spawnfunc_target_items();
index 1c8f517..9cb52c1 100644 (file)
@@ -517,7 +517,7 @@ void PrintWelcomeMessage(entity pl)
                modifications = strcat(modifications, ", No start weapons");
        if(autocvar_sv_gravity < 800)
                modifications = strcat(modifications, ", Low gravity");
-       if(g_cloaked)
+       if(g_cloaked && !g_cts)
                modifications = strcat(modifications, ", Cloaked");
        if(g_grappling_hook)
                modifications = strcat(modifications, ", Hook");
@@ -525,7 +525,7 @@ void PrintWelcomeMessage(entity pl)
                modifications = strcat(modifications, ", Midair");
        if(g_pinata)
                modifications = strcat(modifications, ", Pinata");
-       if(g_weapon_stay)
+       if(g_weapon_stay && !g_cts)
                modifications = strcat(modifications, ", Weapons stay");
        if(g_bloodloss > 0)
                modifications = strcat(modifications, ", Bloodloss");