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);