mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-26 05:55:15 +00:00
parent
318807d3c2
commit
265a3c6b03
3 changed files with 13 additions and 1 deletions
|
@ -161,6 +161,10 @@ u32 get_mario_spawn_type(struct Object *o) {
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ObjectWarpNode *area_get_warp_node(u8 id) {
|
struct ObjectWarpNode *area_get_warp_node(u8 id) {
|
||||||
|
if (gCurrentArea == NULL || gCurrentArea->warpNodes == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
struct ObjectWarpNode *node = NULL;
|
struct ObjectWarpNode *node = NULL;
|
||||||
|
|
||||||
for (node = gCurrentArea->warpNodes; node != NULL; node = node->next) {
|
for (node = gCurrentArea->warpNodes; node != NULL; node = node->next) {
|
||||||
|
|
|
@ -332,6 +332,11 @@ static void open_mod_file(struct Mod* mod, struct ModFile* file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void network_receive_download(struct Packet* p) {
|
void network_receive_download(struct Packet* p) {
|
||||||
|
if (p == NULL) {
|
||||||
|
LOG_ERROR("Received null packet");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SOFT_ASSERT(gNetworkType == NT_CLIENT);
|
SOFT_ASSERT(gNetworkType == NT_CLIENT);
|
||||||
if (p->localIndex != UNKNOWN_LOCAL_INDEX) {
|
if (p->localIndex != UNKNOWN_LOCAL_INDEX) {
|
||||||
if (gNetworkPlayerServer == NULL || gNetworkPlayerServer->localIndex != p->localIndex) {
|
if (gNetworkPlayerServer == NULL || gNetworkPlayerServer->localIndex != p->localIndex) {
|
||||||
|
|
|
@ -28,7 +28,10 @@ void network_send_mod_list_request(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void network_receive_mod_list_request(UNUSED struct Packet* p) {
|
void network_receive_mod_list_request(UNUSED struct Packet* p) {
|
||||||
SOFT_ASSERT(gNetworkType == NT_SERVER);
|
if (gNetworkType != NT_SERVER) {
|
||||||
|
LOG_ERROR("Network type should be server!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
LOG_INFO("received mod list request");
|
LOG_INFO("received mod list request");
|
||||||
|
|
||||||
network_send_mod_list();
|
network_send_mod_list();
|
||||||
|
|
Loading…
Reference in a new issue