]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix minor issue with vehicles, plus implement dropped capture delay
authorSamual Lenks <samual@xonotic.org>
Fri, 21 Sep 2012 21:06:32 +0000 (17:06 -0400)
committerSamual Lenks <samual@xonotic.org>
Fri, 21 Sep 2012 21:06:32 +0000 (17:06 -0400)
gamemodes.cfg
qcsrc/server/autocvars.qh
qcsrc/server/mutators/gamemode_ctf.qc

index b20c9136bbf34025aab288f64f137811e3fc1110..9d804878873d5ceabc7842b2e742984ed9de693e 100644 (file)
@@ -185,10 +185,11 @@ set g_ctf_flagcarrier_damagefactor 1
 set g_ctf_flagcarrier_forcefactor 1
 set g_ctf_flagcarrier_waypointforenemy_stalemate 60 "show the enemy flagcarrier location after both teams have held the flags for this amount of time"
 set g_ctf_flagcarrier_waypointforenemy_spotting 1 "show the enemy flagcarrier location if a team mate presses +use to spot them"
+set g_ctf_dropped_capture_delay 1 "dropped capture delay"
 set g_ctf_dropped_capture_radius 100 "allow dropped flags to be automatically captured by base flags if the dropped flag is within this radius of it"
 set g_ctf_flag_damageforcescale 2
 set g_ctf_portalteleport 0 "allow flag carriers to go through portals made in portal gun without dropping the flag"
-set g_ctf_reverse 0    "if enabled, flags positions are switched: you have to capture the enemy's flag from your own base by bringing it to your own flag in the enemy base"
+set g_ctf_reverse 0 "if enabled, flags positions are switched: you have to capture the enemy's flag from your own base by bringing it to your own flag in the enemy base"
 set g_ctf_flag_collect_delay 1
 set g_ctf_flag_health 0
 set g_ctf_flag_dropped_waypoint 2 "show dropped flag waypointsprite when a flag is lost. 1 = team only, 2 = for all players"
index af2459f83343fc1c47e3501c1c7121be588478e8..0517dcf10e89037b21e651235c0ac02e9c70fd0d 100644 (file)
@@ -823,6 +823,7 @@ float autocvar_g_ctf_shield_force;
 float autocvar_g_ctf_shield_max_ratio;
 float autocvar_g_ctf_shield_min_negscore;
 float autocvar_g_ctf_reverse;
+float autocvar_g_ctf_dropped_capture_delay;
 float autocvar_g_ctf_dropped_capture_radius;
 float autocvar_g_cts_finish_kill_delay;
 float autocvar_g_cts_selfdamage;
index 18485d71638c5ee04e8d5d675b2ca651d27b8b16..b12e2857820f1280e818f14b76c6e48ffc9f4594 100644 (file)
@@ -691,8 +691,9 @@ void ctf_FlagThink()
                        {
                                for(tmp_entity = ctf_worldflaglist; tmp_entity; tmp_entity = tmp_entity.ctf_worldflagnext)
                                        if(tmp_entity.ctf_status == FLAG_DROPPED)
-                                               if(vlen(self.origin - tmp_entity.origin) < autocvar_g_ctf_dropped_capture_radius)
-                                                       ctf_Handle_Capture(self, tmp_entity, CAPTURE_DROPPED);
+                                       if(vlen(self.origin - tmp_entity.origin) < autocvar_g_ctf_dropped_capture_radius)
+                                       if(time > tmp_entity.ctf_droptime + autocvar_g_ctf_dropped_capture_delay)
+                                               ctf_Handle_Capture(self, tmp_entity, CAPTURE_DROPPED);
                        }
                        return;
                }
@@ -1890,7 +1891,7 @@ MUTATOR_HOOKFUNCTION(ctf_VehicleEnter)
 {
        if(vh_player.flagcarried)
        {
-               if(!autocvar_g_ctf_allow_vehicle_carry)
+               if(!autocvar_g_ctf_allow_vehicle_carry && !autocvar_g_ctf_allow_vehicle_touch)
                {
                        ctf_Handle_Throw(vh_player, world, DROP_NORMAL);
                }