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

Function MultiStartClient

Descent3/multi_client.cpp:497–519  ·  view source on GitHub ↗

Initializes some fields for a network client to play Client only

Source from the content-addressed store, hash-verified

495// Initializes some fields for a network client to play
496// Client only
497void MultiStartClient(char *scriptname) {
498 int i;
499
500 for (i = 0; i < MAX_NET_PLAYERS; i++) {
501 memset(&NetPlayers[i], 0, sizeof(netplayer));
502 }
503
504 for (i = 0; i < MAX_SAVED_MOVES; i++)
505 SavedMoves[i].timestamp = 0;
506
507 Current_saved_move = 0;
508
509 // Temporary name fix
510 Current_pilot.get_name(Players[Player_num].callsign);
511
512 Multi_send_size[Player_num] = 0;
513 Multi_last_sent_time[Player_num][0] = 0;
514 Last_weapons_load_update_time = 0;
515
516 Netgame.local_role = LR_CLIENT;
517 Game_mode = GM_NETWORK;
518 SetGamemodeScript(scriptname);
519}

Callers

nothing calls this directly

Calls 2

SetGamemodeScriptFunction · 0.85
get_nameMethod · 0.45

Tested by

no test coverage detected