Merge branch 'dev' into coop

This commit is contained in:
MysterD 2023-05-01 01:36:58 -07:00
commit afe1ff937b
7 changed files with 12 additions and 5 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -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];

View file

@ -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);

View file

@ -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

View file

@ -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