From: Mario Date: Thu, 18 Apr 2013 10:47:56 +0000 (+1000) Subject: Only send movement flags when moving X-Git-Tag: xonotic-v0.8.0~241^2^2~343 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6784fd058f3728d62dea24ca6a8b8fa1e0b0e975;p=xonotic%2Fxonotic-data.pk3dir.git Only send movement flags when moving --- diff --git a/qcsrc/server/monsters/lib/monsters.qc b/qcsrc/server/monsters/lib/monsters.qc index 45a000766..d5d63de0d 100644 --- a/qcsrc/server/monsters/lib/monsters.qc +++ b/qcsrc/server/monsters/lib/monsters.qc @@ -301,7 +301,10 @@ void Monster_Fade () setorigin(self, self.pos1); self.angles = self.pos2; self.health = self.max_health; // TODO: check if resetting to max_health is wise here - self.SendFlags |= MSF_MOVE; + + if(vlen(self.velocity) > 0) + self.SendFlags |= MSF_MOVE; + return; } SUB_SetFade(self, time + 3, 1); @@ -643,7 +646,9 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_ self.checkattack(); self.SendFlags |= MSF_ANG; - self.SendFlags |= MSF_MOVE; + + if(vlen(self.velocity) > 0) + self.SendFlags |= MSF_MOVE; } void monster_dead_think() @@ -659,7 +664,8 @@ void monster_dead_think() return; } - self.SendFlags |= MSF_MOVE; // keep up to date on the monster's location + if(vlen(self.velocity) > 0) + self.SendFlags |= MSF_MOVE; // keep up to date on the monster's location } void monsters_setstatus() @@ -903,7 +909,8 @@ void monster_hook_death() if not(self.flags & FL_FLY) self.velocity = '0 0 0'; - self.SendFlags |= MSF_MOVE; + if(vlen(self.velocity) > 0) + self.SendFlags |= MSF_MOVE; totalspawned -= 1; }