mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
a few adjustments to merged prs
This commit is contained in:
parent
f503785ec2
commit
45ea768590
1 changed files with 11 additions and 4 deletions
|
@ -27,12 +27,15 @@
|
|||
#include "game/first_person_cam.h"
|
||||
#include "pc/lua/utils/smlua_math_utils.h"
|
||||
#include "pc/lua/utils/smlua_audio_utils.h"
|
||||
#include "pc/network/socket/socket.h"
|
||||
|
||||
#ifdef DISCORD_SDK
|
||||
#include "pc/discord/discord.h"
|
||||
#endif
|
||||
|
||||
#ifdef COOPNET
|
||||
#include "pc/network/coopnet/coopnet.h"
|
||||
#endif
|
||||
|
||||
static struct DateTime sDateTime;
|
||||
|
||||
///
|
||||
|
@ -427,12 +430,16 @@ const char* get_local_discord_id(void) {
|
|||
#endif
|
||||
}
|
||||
|
||||
const char* get_coopnet_id(s8 localIndex) {
|
||||
if (!gNetworkSystem || gNetworkSystem == &gNetworkSystemSocket) { return "-1"; }
|
||||
if (localIndex < 0 || localIndex > MAX_PLAYERS - 1) { return "-1"; }
|
||||
const char* get_coopnet_id(UNUSED s8 localIndex) {
|
||||
#ifdef COOPNET
|
||||
if (!gNetworkSystem || gNetworkSystem != &gNetworkSystemCoopNet) { return "-1"; }
|
||||
if (localIndex < 0 || localIndex >= MAX_PLAYERS) { return "-1"; }
|
||||
struct NetworkPlayer* np = &gNetworkPlayers[localIndex];
|
||||
if (np == NULL || !np->connected) { return "-1"; }
|
||||
return gNetworkSystem->get_id_str(np->localIndex);
|
||||
#else
|
||||
return "-1";
|
||||
#endif
|
||||
}
|
||||
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue