improved debug tool
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run

This commit is contained in:
Isaac0-dev 2025-12-19 21:43:04 +10:00
parent 1c40a787bb
commit 6e28f75165
3 changed files with 10 additions and 6 deletions

View file

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

View file

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

View file

@ -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++) {