diff --git a/src/game/mario.c b/src/game/mario.c index 236776b4a..2061f0f01 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -1543,6 +1543,8 @@ void update_mario_geometry_inputs(struct MarioState *m) { gasLevel = find_poison_gas_level(m->pos[0], m->pos[2]); m->waterLevel = find_water_level(m->pos[0], m->pos[2]); + if (m->action == ACT_DEBUG_FREE_MOVE) { return; } + if (m->floor != NULL) { m->floorAngle = atan2s(m->floor->normal.z, m->floor->normal.x); m->terrainSoundAddend = mario_get_terrain_sound_addend(m); @@ -2059,7 +2061,7 @@ s32 execute_mario_action(UNUSED struct Object *o) { } // If Mario is OOB, stop executing actions. - if (gMarioState->floor == NULL) { + if (gMarioState->floor == NULL && gMarioState->action != ACT_DEBUG_FREE_MOVE) { return 0; } diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index 013f20dc1..8d598b313 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -693,12 +693,10 @@ s32 act_debug_free_move(struct MarioState *m) { struct Surface *surf = NULL; f32 floorHeight = find_floor(pos[0], pos[1], pos[2], &surf); - if (surf != NULL) { - if (pos[1] < floorHeight) { - pos[1] = floorHeight; - } - vec3f_copy(m->pos, pos); + if (pos[1] < floorHeight) { + pos[1] = floorHeight; } + vec3f_copy(m->pos, pos); m->faceAngle[1] = m->intendedYaw; vec3f_copy(m->marioObj->header.gfx.pos, m->pos); diff --git a/src/pc/network/packets/packet_network_players.c b/src/pc/network/packets/packet_network_players.c index 49f3d6beb..c9e57e298 100644 --- a/src/pc/network/packets/packet_network_players.c +++ b/src/pc/network/packets/packet_network_players.c @@ -82,6 +82,10 @@ void network_receive_network_players(struct Packet *p) { LOG_ERROR("received list of clients as a non-client"); return; } + if (network_player_any_connected() && gNetworkPlayers[p->localIndex].type != NPT_SERVER) { + LOG_ERROR("list of clients came from non-server... refuse!"); + return; + } u8 connectedCount = 0; packet_read(p, &connectedCount, sizeof(u8)); for (s16 i = 0; i < connectedCount; i++) {