From: Samual Date: Sun, 1 Apr 2012 20:57:09 +0000 (-0400) Subject: Fix more bugs X-Git-Tag: xonotic-v0.7.0~240^2~117 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2e72a56834474d91602e9723816839fdccb62ece;p=xonotic%2Fxonotic-data.pk3dir.git Fix more bugs --- diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index 5faec0233..fd06e0df9 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -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); } diff --git a/qcsrc/server/mutators/gamemode_ctf.qh b/qcsrc/server/mutators/gamemode_ctf.qh index 1de49fdb9..8ac10bbf9 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qh +++ b/qcsrc/server/mutators/gamemode_ctf.qh @@ -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