]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix more bugs
authorSamual <samual@xonotic.org>
Sun, 1 Apr 2012 20:57:09 +0000 (16:57 -0400)
committerSamual <samual@xonotic.org>
Sun, 1 Apr 2012 20:57:09 +0000 (16:57 -0400)
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/mutators/gamemode_ctf.qh

index 5faec0233e28589bfcc8b9d96a7f1d20a592dad3..fd06e0df9fa0332961e65c5bba89f42dbf320e50 100644 (file)
@@ -282,6 +282,7 @@ void ctf_Handle_Throw(entity player, entity reciever, float droptype)
                }
                
                default:
+               case DROP_RESET:
                case DROP_NORMAL:
                {
                        flag.velocity = ('0 0 200' + ('0 100 0' * crandom()) + ('100 0 0' * crandom()));
@@ -306,6 +307,12 @@ void ctf_Handle_Throw(entity player, entity reciever, float droptype)
                        te_lightning2(world, reciever.origin, player.origin);
                        break;
                }
+
+               case DROP_RESET: 
+               {
+                       // do nothing
+                       break;
+               }
                
                default:
                case DROP_THROW:
@@ -373,7 +380,7 @@ void ctf_Handle_Capture(entity flag, entity toucher, float capturetype)
 void ctf_Handle_Return(entity flag, entity player)
 {
        // messages and sounds
-       //centerprint(player, strcat("You returned ", flag.netname));
+       //centerprint(player, strcat("You returned the ", flag.netname));
        Send_KillNotification (player.netname, flag.netname, "", INFO_RETURNFLAG, MSG_INFO);
        sound(player, CH_TRIGGER, flag.snd_flag_returned, VOL_BASE, ATTN_NONE);
        ctf_EventLog("return", flag.team, player);
@@ -506,12 +513,14 @@ void ctf_FlagDamage(entity inflictor, entity attacker, float damage, float death
                // automatically kill the flag and return it
                self.health = 0;
                ctf_CheckFlagReturn(self);
+               return;
        }
        
        if(autocvar_g_ctf_flag_return_damage) 
        {
                self.health = self.health - damage;
                ctf_CheckFlagReturn(self);
+               return;
        }
 }
 
@@ -728,7 +737,7 @@ void ctf_Reset()
 {
        if(self.owner)
                if(self.owner.classname == "player")
-                       ctf_Handle_Throw(self.owner, world, DROP_NORMAL);
+                       ctf_Handle_Throw(self.owner, world, DROP_RESET);
                        
        ctf_RespawnFlag(self);
 }
index 1de49fdb93f01b4dbaf3c751136b3546863e8e45..8ac10bbf940f356579eccd2a99e889219985d75e 100644 (file)
@@ -61,6 +61,7 @@ entity ctf_worldflaglist;
 #define DROP_NORMAL 1
 #define DROP_THROW 2
 #define DROP_PASS 3
+#define DROP_RESET 4
 
 #define PICKUP_BASE 1
 #define PICKUP_DROPPED 2