MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / MultiLeaveGame

Function MultiLeaveGame

Descent3/multi.cpp:3454–3477  ·  view source on GitHub ↗

Called whenever I want to leave the game

Source from the content-addressed store, hash-verified

3452
3453// Called whenever I want to leave the game
3454void MultiLeaveGame() {
3455 mprintf(0, "I'm leaving the netgame!\n");
3456
3457 CallGameDLL(EVT_GAME_DISCONNECTED, &DLLInfo);
3458
3459 if ((Players[Player_num].flags & PLAYER_FLAGS_DYING) || (Players[Player_num].flags & PLAYER_FLAGS_DEAD))
3460 EndPlayerDeath(Player_num);
3461
3462 // Cancel all incoming file transfers
3463
3464 Multi_bail_ui_menu = true;
3465 MultiSendLeaveGame();
3466
3467 CallMultiDLL(MT_EVT_GAME_OVER);
3468 MultiCloseGame();
3469
3470 SetFunctionMode(MENU_MODE);
3471 if (Netgame.local_role == LR_SERVER) {
3472 // gspy_EndGame();
3473 }
3474
3475 ScoreAPIGameOver();
3476 NetPlayers[Player_num].flags &= ~NPF_CONNECTED;
3477}
3478
3479// Releases a missile that belongs to a player
3480void MultiDoReleaseTimeoutMissile(uint8_t *data) {

Callers 10

GameSequencerFunction · 0.85
RunGameMenuFunction · 0.85
BailOnMultiplayerFunction · 0.85
MultiDoConnectBailFunction · 0.85
MultiDoServerQuitFunction · 0.85
MultiDoServerFrameFunction · 0.85
MultiDoClientFrameFunction · 0.85
SetCVarNoneFunction · 0.85
MultiPollForLevelInfoFunction · 0.85

Calls 7

CallGameDLLFunction · 0.85
EndPlayerDeathFunction · 0.85
MultiSendLeaveGameFunction · 0.85
CallMultiDLLFunction · 0.85
MultiCloseGameFunction · 0.85
SetFunctionModeFunction · 0.85
ScoreAPIGameOverFunction · 0.85

Tested by

no test coverage detected