From 536995cdc53adf4e08b3716a15c953e3d042e67f Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sun, 19 Nov 2006 04:21:26 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@711 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clientgame.cpp | 7 +------ source/src/weapon.cpp | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index adefda08..0612cf09 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -421,7 +421,6 @@ void mousemove(int dx, int dy) void selfdamage(int damage, int actor, playerent *act, bool gib, playerent *pl) { - if(!act) return; if(pl->state!=CS_ALIVE || editmode || intermission) return; if(pl==player1) @@ -455,11 +454,7 @@ void selfdamage(int damage, int actor, playerent *act, bool gib, playerent *pl) conoutf("%s fragged %s", act==player1 ? "you" : act->name, pl->name); }; } - else if(actor==-2) - { - conoutf("you got killed by %s!", &act->name); - } - else if(actor==-1) + else if(act==pl) { actor = getclientnum(); conoutf("you suicided!"); diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index d6b68f1f..712cd55c 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -254,7 +254,7 @@ void newprojectile(vec &from, vec &to, float speed, bool local, playerent *owner void hit(int target, int damage, playerent *d, playerent *at, bool gib=false) { d->lastpain = lastmillis; - if(d==player1 || d->type==ENT_BOT) selfdamage(damage, at==d ? -1 : -2, at, gib, d); + if(d==player1 || d->type==ENT_BOT) selfdamage(damage, -1, at, gib, d); else { addmsg(gib ? SV_GIBDAMAGE : SV_DAMAGE, "ri3", target, damage, d->lifesequence);