]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Consistency, consistency, consistency...
authorSamual <samual@xonotic.org>
Sat, 31 Mar 2012 02:26:54 +0000 (22:26 -0400)
committerSamual <samual@xonotic.org>
Sat, 31 Mar 2012 02:26:54 +0000 (22:26 -0400)
qcsrc/server/mutators/gamemode_ctf.qc

index c8060064a51c9c524770567051e484b9a779ce03..8264c8090a951210497d347b6150f0e7e9cd80d3 100644 (file)
@@ -540,26 +540,34 @@ void ctf_FlagTouch()
        switch(self.ctf_status) 
        {       
                case FLAG_BASE:
+               {
                        if((other.team == self.team) && (other.flagcarried) && (other.flagcarried.team != self.team))
                                ctf_Handle_Capture(self, other); // other just captured the enemies flag to his base
                        else if((other.team != self.team) && (!other.flagcarried) && (!other.ctf_captureshielded))
                                ctf_Handle_Pickup_Base(self, other); // other just stole the enemies flag
                        break;
+               }
                
                case FLAG_DROPPED:
+               {
                        if(other.team == self.team)
                                ctf_Handle_Return(self, other); // other just returned his own flag
                        else if((!other.flagcarried) && ((other.playerid != self.ctf_dropperid) || (time > self.ctf_droptime + autocvar_g_ctf_flag_collect_delay)))
                                ctf_Handle_Pickup_Dropped(self, other); // other just picked up a dropped enemy flag
                        break;
-                               
+               }
+                       
                case FLAG_CARRY:
+               {
                        dprint("Someone touched a flag even though it was being carried?\n");
                        break;
-
+               }
+               
                default: // this should never happen
+               {
                        dprint("Touch: Flag exists with no status?\n");
                        break;
+               }
        }
        
        self.wait = time + FLAG_TOUCHRATE;