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
This commit is contained in:
terminx 2006-05-03 04:49:54 +00:00
parent 4a380c2b4a
commit 834d2c9a9b
3 changed files with 13 additions and 25 deletions

View File

@ -355,4 +355,6 @@ extern void updatenames(void);
extern void sendboardname(void); extern void sendboardname(void);
extern void sendquit(void); extern void sendquit(void);
extern void adduserquote(char *daquote);
#endif // __funct_h__ #endif // __funct_h__

View File

@ -7933,7 +7933,8 @@ void checkcommandline(int argc,char **argv)
ud.m_respawn_monsters = ud.respawn_monsters = 1; ud.m_respawn_monsters = ud.respawn_monsters = 1;
ud.m_respawn_items = ud.respawn_items = 1; ud.m_respawn_items = ud.respawn_items = 1;
ud.m_respawn_inventory = ud.respawn_inventory = 1; ud.m_respawn_inventory = ud.respawn_inventory = 1;
for(j=numplayers;j<ud.multimode;j++)
Bsprintf(ud.user_name[j],"PLAYER %d",j+1);
break; break;
case 'r': case 'r':
case 'R': case 'R':

View File

@ -3450,40 +3450,25 @@ void processinput(short snum)
ps[p->frag_ps].frag++; ps[p->frag_ps].frag++;
frags[p->frag_ps][snum]++; 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);
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]);
}
} }
else else
{ {
if(snum == screenpeek) Bsprintf(fta_quotes[116],"KILLED %s",&ud.user_name[snum][0]);
{ FTA(116,&ps[p->frag_ps]);
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(tempbuf,"%s WAS KILLED BY %s",&ud.user_name[snum][0],&ud.user_name[p->frag_ps][0]);
adduserquote(tempbuf);
} }
else p->fraggedself++; else p->fraggedself++;
if(myconnectindex == connecthead) if(myconnectindex == connecthead)
{ {
unsigned char tmpbuf[2048]; Bsprintf(tempbuf,"frag %d killed %d\n",p->frag_ps+1,snum+1);
Bsprintf(tmpbuf,"frag %d killed %d\n",p->frag_ps+1,snum+1); sendscore(tempbuf);
sendscore(tmpbuf);
// printf(tempbuf); // printf(tempbuf);
} }