diff --git a/lib/coopnet/linux/libcoopnet.a b/lib/coopnet/linux/libcoopnet.a index 4c970008c..8d7d52314 100644 Binary files a/lib/coopnet/linux/libcoopnet.a and b/lib/coopnet/linux/libcoopnet.a differ diff --git a/lib/coopnet/win32/libcoopnet.a b/lib/coopnet/win32/libcoopnet.a index b8d507681..d69ea547c 100644 Binary files a/lib/coopnet/win32/libcoopnet.a and b/lib/coopnet/win32/libcoopnet.a differ diff --git a/lib/coopnet/win64/libcoopnet.a b/lib/coopnet/win64/libcoopnet.a index 443abc4fe..b14e7c99f 100644 Binary files a/lib/coopnet/win64/libcoopnet.a and b/lib/coopnet/win64/libcoopnet.a differ diff --git a/src/game/behaviors/wiggler.inc.c b/src/game/behaviors/wiggler.inc.c index b25ceb022..7b3d809db 100644 --- a/src/game/behaviors/wiggler.inc.c +++ b/src/game/behaviors/wiggler.inc.c @@ -71,7 +71,7 @@ void bhv_wiggler_body_part_update(void) { // Sanity check the array size of our segments, // This should never be higher then 3 // in normal circumstances. - if (o->oBehParams2ndByte > 3) { return; } + if (o->oBehParams2ndByte > 3 || o->oBehParams2ndByte < 0) { return; } struct ChainSegment *segment = &parent->oWigglerSegments[o->oBehParams2ndByte]; diff --git a/src/game/level_update.c b/src/game/level_update.c index dbc4223a3..b11c26929 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -401,8 +401,8 @@ void set_mario_initial_action(struct MarioState *m, u32 spawnType, u32 actionArg void init_mario_after_warp(void) { struct ObjectWarpNode *spawnNode = area_get_warp_node(sWarpDest.nodeId); - if (spawnNode == NULL || spawnNode->object == NULL) { spawnNode = &gCurrentArea->warpNodes[0xFA]; } - if (spawnNode == NULL || spawnNode->object == NULL) { spawnNode = &gCurrentArea->warpNodes[0x00]; } + if (spawnNode == NULL || spawnNode->object == NULL) { if (gCurrentArea) { spawnNode = &gCurrentArea->warpNodes[0xFA]; } } + if (spawnNode == NULL || spawnNode->object == NULL) { if (gCurrentArea) { spawnNode = &gCurrentArea->warpNodes[0x00]; } } if (spawnNode == NULL || spawnNode->object == NULL) { return; } u32 marioSpawnType = get_mario_spawn_type(spawnNode->object); diff --git a/src/pc/network/packets/packet_spawn_objects.c b/src/pc/network/packets/packet_spawn_objects.c index 59a657e90..728876a95 100644 --- a/src/pc/network/packets/packet_spawn_objects.c +++ b/src/pc/network/packets/packet_spawn_objects.c @@ -120,7 +120,6 @@ void network_send_spawn_objects_to(u8 sendToLocalIndex, struct Object* objects[] } void network_receive_spawn_objects(struct Packet* p) { - LOG_INFO("rx spawn objects"); // prevent receiving spawn objects during credits if (gCurrActStarNum == 99) { LOG_ERROR("rx failed: in credits"); @@ -148,6 +147,14 @@ void network_receive_spawn_objects(struct Packet* p) { packet_read(p, &data.globalPlayerIndex, sizeof(u8)); packet_read(p, &data.extendedModelId, sizeof(u16)); + char* id = "unknown"; + char* name = "unknown"; + if (gNetworkSystem && p->localIndex) { + id = gNetworkSystem->get_id_str(p->localIndex); + name = gNetworkPlayers[p->localIndex].name; + } + LOG_INFO("rx spawn object %s from %s (%s)", get_behavior_name_from_id(data.behaviorId), name, id); + struct Object* parentObj = NULL; if (data.parentId == (u32)-1) { // this object is it's own parent, set it to a known object temporarily diff --git a/src/pc/network/version.h b/src/pc/network/version.h index e330882c3..06b803cc1 100644 --- a/src/pc/network/version.h +++ b/src/pc/network/version.h @@ -3,7 +3,7 @@ #define VERSION_TEXT "beta" #define VERSION_NUMBER 34 -#define MINOR_VERSION_NUMBER 0 +#define MINOR_VERSION_NUMBER 1 #define PATCH_VERSION_NUMBER 0 #define MAX_VERSION_LENGTH 28