]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Hide the flag from the carrier's view while they're in a vehicle (fixes flag getting...
authorMario <zacjardine@y7mail.com>
Fri, 6 Mar 2015 13:40:02 +0000 (00:40 +1100)
committerMario <zacjardine@y7mail.com>
Fri, 6 Mar 2015 13:40:02 +0000 (00:40 +1100)
qcsrc/server/mutators/gamemode_ctf.qc

index 4afec770e4fd96d400c92dd4c91ff3c6877ae8c2..7e956569813541a5f06acbef11621e8062b20f79 100644 (file)
@@ -2152,6 +2152,8 @@ MUTATOR_HOOKFUNCTION(ctf_VehicleEnter)
 {
        if(vh_player.flagcarried)
        {
+               vh_player.flagcarried.nodrawtoclient = vh_player; // hide the flag from the driver
+
                if(!autocvar_g_ctf_allow_vehicle_carry && !autocvar_g_ctf_allow_vehicle_touch)
                {
                        ctf_Handle_Throw(vh_player, world, DROP_NORMAL);
@@ -2177,6 +2179,7 @@ MUTATOR_HOOKFUNCTION(ctf_VehicleExit)
                setorigin(vh_player.flagcarried, FLAG_CARRY_OFFSET);
                vh_player.flagcarried.scale = FLAG_SCALE;
                vh_player.flagcarried.angles = '0 0 0';
+               vh_player.flagcarried.nodrawtoclient = world;
                return true;
        }