MCPcopy Create free account
hub / github.com/diasurgical/devilution / multi_player_left_msg

Function multi_player_left_msg

Source/multi.cpp:232–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232void multi_player_left_msg(int pnum, int left)
233{
234 char *pszFmt;
235
236 if (plr[pnum].plractive) {
237 RemovePlrFromMap(pnum);
238 RemovePortalMissile(pnum);
239 DeactivatePortal(pnum);
240 RemovePlrPortal(pnum);
241 RemovePlrMissiles(pnum);
242 if (left) {
243 pszFmt = "Player '%s' just left the game";
244 switch (sgdwPlayerLeftReasonTbl[pnum]) {
245 case 0x40000004:
246 pszFmt = "Player '%s' killed Diablo and left the game!";
247 gbSomebodyWonGameKludge = TRUE;
248 break;
249 case 0x40000006:
250 pszFmt = "Player '%s' dropped due to timeout";
251 break;
252 }
253 EventPlrMsg(pszFmt, plr[pnum]._pName);
254 }
255 plr[pnum].plractive = FALSE;
256 plr[pnum]._pName[0] = '\0';
257 gbActivePlayers--;
258 }
259}
260
261void multi_net_ping()
262{

Callers 2

multi_clear_left_tblFunction · 0.85
recv_plrinfoFunction · 0.85

Calls 6

RemovePlrFromMapFunction · 0.85
RemovePortalMissileFunction · 0.85
DeactivatePortalFunction · 0.85
RemovePlrPortalFunction · 0.85
RemovePlrMissilesFunction · 0.85
EventPlrMsgFunction · 0.85

Tested by

no test coverage detected