From 7923f31693994156d03bdf7c66807c2cf9b6cfb7 Mon Sep 17 00:00:00 2001 From: Rafael Barreto Date: Wed, 28 Jul 2010 18:55:42 +0000 Subject: [PATCH] anticheats compatibility: fixing the false damage effect (the player will only see blood if the server accepts the damage)... git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5470 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clientgame.cpp | 3 ++- source/src/weapon.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index e152eb85..1ac8da92 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -646,6 +646,8 @@ void dodamage(int damage, playerent *pl, playerent *actor, bool gib, bool local) lasthit = lastmillis; } + damageeffect(damage, pl); + if(local) damage = pl->dodamage(damage); else if(actor==player1) return; @@ -655,7 +657,6 @@ void dodamage(int damage, playerent *pl, playerent *actor, bool gib, bool local) damageblend(damage); pl->damageroll(damage); } - damageeffect(damage, pl); if(pl->health<=0) { if(local) dokill(pl, actor, gib, actor->weaponsel->type); } else if(pl==player1) audiomgr.playsound(S_PAIN6, SP_HIGH); diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 036c1561..e2cb8fc8 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -368,7 +368,7 @@ void hit(int damage, playerent *d, playerent *at, const vec &vel, int gun, bool else { h.dir = ivec(int(vel.x*DNF), int(vel.y*DNF), int(vel.z*DNF)); - damageeffect(damage, d); +// damageeffect(damage, d); audiomgr.playsound(S_PAIN1+rnd(5), d); } }