]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Only hide the flag from the player if the player can carry the flag into the vehicle
authorMario <mario@smbclan.net>
Sat, 18 Jun 2016 15:15:54 +0000 (01:15 +1000)
committerMario <mario@smbclan.net>
Sat, 18 Jun 2016 15:15:54 +0000 (01:15 +1000)
qcsrc/server/mutators/mutator/gamemode_ctf.qc

index f9872e7490ed45b665b718490ee42f63dbaa7a07..a184e68df9bb4e1398bca4555968305a846373fc 100644 (file)
@@ -2238,14 +2238,13 @@ MUTATOR_HOOKFUNCTION(ctf, VehicleEnter)
 
        if(player.flagcarried)
        {
-               player.flagcarried.nodrawtoclient = player; // hide the flag from the driver
-
                if(!autocvar_g_ctf_allow_vehicle_carry && !autocvar_g_ctf_allow_vehicle_touch)
                {
                        ctf_Handle_Throw(player, NULL, DROP_NORMAL);
                }
                else
                {
+                       player.flagcarried.nodrawtoclient = player; // hide the flag from the driver
                        setattachment(player.flagcarried, veh, "");
                        setorigin(player.flagcarried, VEHICLE_FLAG_OFFSET);
                        player.flagcarried.scale = VEHICLE_FLAG_SCALE;