]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make flags float in water
authorSamual <samual@xonotic.org>
Mon, 2 Apr 2012 16:18:21 +0000 (12:18 -0400)
committerSamual <samual@xonotic.org>
Mon, 2 Apr 2012 16:18:21 +0000 (12:18 -0400)
defaultXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/mutators/gamemode_ctf.qc

index b902bed782e7e68c41df26ce40648851b99dc622..f430022f0601784d3eabe813184e15dc3a658f1e 100644 (file)
@@ -611,6 +611,7 @@ set g_ctf_reverse 0 "if enabled, flags positions are switched: you have to captu
 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"
+set g_ctf_flag_dropped_floatinwater 200 "move upwards while in water at this velocity"
 set g_ctf_flag_pickup_verbosename 0 "show the name of the person who picked up the flag too"
 set g_ctf_drop 1 "dropping allows circumventing carrierkill score, so enable this with care!"
 set g_ctf_drop_velocity 500 "how fast or far a player can throw the flag"
index ed7401aa87d1ac532aab0762e5f2cb642fe682b2..db783ae638d05d4f6c7199b9ef3ae0325f8b5e13 100644 (file)
@@ -779,6 +779,7 @@ float autocvar_g_ctf_flag_capture_effects;
 float autocvar_g_ctf_flag_collect_delay;
 float autocvar_g_ctf_flag_damageforcescale;
 float autocvar_g_ctf_flag_dropped_waypoint;
+float autocvar_g_ctf_flag_dropped_floatinwater;
 float autocvar_g_ctf_flag_glowtrails;
 float autocvar_g_ctf_flag_health;
 float autocvar_g_ctf_flag_pickup_effects;
index 7a905a0b73b381db414c99cbbd55679754796d0b..e63a84fe54b4984b6dc495a4d340cfcceb8d9b82 100644 (file)
@@ -576,6 +576,9 @@ void ctf_FlagThink()
                
                case FLAG_DROPPED:
                {
+                       if(autocvar_g_ctf_flag_dropped_floatinwater && (self.flags & FL_INWATER))
+                                       self.velocity_z = autocvar_g_ctf_flag_dropped_floatinwater;
+               
                        if(autocvar_g_ctf_flag_return_dropped)
                        {
                                if((vlen(self.origin - self.ctf_spawnorigin) <= autocvar_g_ctf_flag_return_dropped) || (autocvar_g_ctf_flag_return_dropped == -1))