diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index 055b4723..8168b93c 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -619,6 +619,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) d->lastaction = lastmillis; d->lastattackweapon = d->weapons[GUN_GRENADE]; if(d->weapons[GUN_GRENADE]) d->weapons[GUN_GRENADE]->attackfx(from, to, nademillis); + if(d!=player1) d->pstatshots[GUN_GRENADE]++; //NEW break; } @@ -676,7 +677,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) target->armour = armour; target->health = health; dodamage(damage, target, actor, -1, type==SV_GIBDAMAGE, false); - actor->pstatdamage[gun]+=damage; //NEW //FIXME - no gun info provided, can we fix that? + actor->pstatdamage[gun]+=damage; //NEW break; } diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 98759d12..37df5db5 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -656,6 +656,7 @@ void weapon::sendshoot(vec &from, vec &to) addmsg(SV_SHOOT, "ri2i3iv", lastmillis, owner->weaponsel->type, (int)(to.x*DMF), (int)(to.y*DMF), (int)(to.z*DMF), hits.length(), hits.length()*sizeof(hitmsg)/sizeof(int), hits.getbuf()); + player1->pstatshots[player1->weaponsel->type]++; //NEW } bool weapon::modelattacking() @@ -862,6 +863,7 @@ void grenadeent::activate(const vec &from, const vec &to) (int)(to.x*DMF), (int)(to.y*DMF), (int)(to.z*DMF), 0); audiomgr.playsound(S_GRENADEPULL, SP_HIGH); + player1->pstatshots[GUN_GRENADE]++; //NEW } }