From 834d2c9a9b2d662db55a6c3160ed749745a5c22d Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 3 May 2006 04:49:54 +0000 Subject: [PATCH] Add a message into the chat buffer whenever a player is killed, as well as define some dummy names for the fake AI players git-svn-id: https://svn.eduke32.com/eduke32@146 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/funct.h | 2 ++ polymer/eduke32/source/game.c | 3 ++- polymer/eduke32/source/player.c | 33 +++++++++------------------------ 3 files changed, 13 insertions(+), 25 deletions(-) diff --git a/polymer/eduke32/source/funct.h b/polymer/eduke32/source/funct.h index b39fc7a7c..9c6acf2f8 100644 --- a/polymer/eduke32/source/funct.h +++ b/polymer/eduke32/source/funct.h @@ -355,4 +355,6 @@ extern void updatenames(void); extern void sendboardname(void); extern void sendquit(void); +extern void adduserquote(char *daquote); + #endif // __funct_h__ diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index ebac0f107..1b060293e 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -7933,7 +7933,8 @@ void checkcommandline(int argc,char **argv) ud.m_respawn_monsters = ud.respawn_monsters = 1; ud.m_respawn_items = ud.respawn_items = 1; ud.m_respawn_inventory = ud.respawn_inventory = 1; - + for(j=numplayers;jfrag_ps].frag++; frags[p->frag_ps][snum]++; - if(ud.user_name[p->frag_ps][0]) + if(snum == screenpeek) { - if(snum == screenpeek) - { - Bsprintf(fta_quotes[115],"KILLED BY %s",&ud.user_name[p->frag_ps][0]); - FTA(115,p); - } - else - { - Bsprintf(fta_quotes[116],"KILLED %s",&ud.user_name[snum][0]); - FTA(116,&ps[p->frag_ps]); - } + Bsprintf(fta_quotes[115],"KILLED BY %s",&ud.user_name[p->frag_ps][0]); + FTA(115,p); } else { - if(snum == screenpeek) - { - Bsprintf(fta_quotes[115],"KILLED BY PLAYER %d",p->frag_ps); - FTA(115,p); - } - else - { - Bsprintf(fta_quotes[116],"KILLED PLAYER %d",snum); - FTA(116,&ps[p->frag_ps]); - } + Bsprintf(fta_quotes[116],"KILLED %s",&ud.user_name[snum][0]); + FTA(116,&ps[p->frag_ps]); } + Bsprintf(tempbuf,"%s WAS KILLED BY %s",&ud.user_name[snum][0],&ud.user_name[p->frag_ps][0]); + adduserquote(tempbuf); } else p->fraggedself++; if(myconnectindex == connecthead) { - unsigned char tmpbuf[2048]; - Bsprintf(tmpbuf,"frag %d killed %d\n",p->frag_ps+1,snum+1); - sendscore(tmpbuf); + Bsprintf(tempbuf,"frag %d killed %d\n",p->frag_ps+1,snum+1); + sendscore(tempbuf); // printf(tempbuf); }