]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix evil problem caused by players dropping the flag and leaving
authorSamual Lenks <samual@xonotic.org>
Tue, 11 Sep 2012 06:17:27 +0000 (02:17 -0400)
committerSamual Lenks <samual@xonotic.org>
Tue, 11 Sep 2012 06:17:27 +0000 (02:17 -0400)
qcsrc/server/mutators/gamemode_ctf.qc

index e9e09b2ffd998da126e291308e76d2deaab5da9f..d83988f416513f4703193d9fcc3822bfcf9a178a 100644 (file)
@@ -1734,8 +1734,13 @@ MUTATOR_HOOKFUNCTION(ctf_GiveFragsForKill)
 
 MUTATOR_HOOKFUNCTION(ctf_RemovePlayer)
 {
+       entity flag; // temporary entity for the search method
+       
        if(self.flagcarried)
                { ctf_Handle_Throw(self, world, DROP_NORMAL); }
+       
+       for(flag = ctf_worldflaglist; flag; flag = flag.ctf_worldflagnext)
+               { if(flag.ctf_dropper == self) { flag.ctf_dropper = world; } }
                
        return FALSE;
 }