]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix flag throwing bug and dropped capture bug
authorSamual <samual@xonotic.org>
Sun, 1 Apr 2012 17:13:17 +0000 (13:13 -0400)
committerSamual <samual@xonotic.org>
Sun, 1 Apr 2012 17:13:17 +0000 (13:13 -0400)
qcsrc/server/mutators/gamemode_ctf.qc

index 4c261d09d8caddd0d4c668a27f4f95070fa91773..5e6818806385f2463d6e36b232c7f1c2d717849b 100644 (file)
@@ -263,6 +263,8 @@ void ctf_Handle_Throw(entity player, entity reciever, float droptype)
        flag.solid = SOLID_TRIGGER;
        flag.ctf_droptime = time;
        
+       flag.flags = FL_ITEM | FL_NOTARGET; // clear FL_ONGROUND for MOVETYPE_TOSS
+       
        switch(droptype)
        {
                case DROP_PASS:
@@ -287,8 +289,6 @@ void ctf_Handle_Throw(entity player, entity reciever, float droptype)
                }
        }
        
-       print("flag.velocity = ", vtos(flag.velocity), ".\n");
-       
        switch(droptype)
        {
                case DROP_PASS:
@@ -367,7 +367,7 @@ void ctf_Handle_Capture(entity flag, entity toucher, float capturetype)
        
        // reset the flag
        player.next_take_time = time + autocvar_g_ctf_flag_collect_delay;
-       ctf_RespawnFlag(player.flagcarried);
+       ctf_RespawnFlag(enemy_flag);
 }
 
 void ctf_Handle_Return(entity flag, entity player)