From 95c00d5f5927d27e09f0d21dcd79b9a1c89021e7 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 8 May 2022 17:40:47 -0700 Subject: [PATCH] Remove spawn offsets, a relic of a time where all players were in the same level --- src/game/mario.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/game/mario.c b/src/game/mario.c index 376017c0..43ebb2e1 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -2159,28 +2159,6 @@ void init_single_mario(struct MarioState* m) { m->marioObj->header.gfx.node.flags |= GRAPH_RENDER_ACTIVE; } - // offset spawning - u8 connectedPlayers = network_player_connected_count(); - u8 globalIndex = gNetworkPlayers[m->playerIndex].globalIndex; - u16 spawnAngle = m->faceAngle[1] + 0x4000 + 0x10000 * ((f32)globalIndex / ((f32)connectedPlayers + 1)); - f32 spawnMag = 60.0f * ((connectedPlayers + 1) / 2.0f); - if (spawnMag > 120) { spawnMag = 120; } - - // figure out if we should apply offset - u8 nearbyPlayers = 1; - for (s32 i = 1; i < MAX_PLAYERS; i++) { - struct NetworkPlayer *np = &gNetworkPlayers[i]; - if (!np->connected) { continue; } - if (np->currCourseNum == gCurrCourseNum && np->currLevelNum == gCurrLevelNum && np->currActNum == gCurrActStarNum && np->currAreaIndex == gCurrAreaIndex) { - nearbyPlayers++; - } - } - - if (nearbyPlayers > 1) { - m->pos[0] -= spawnMag * sins(spawnAngle); - m->pos[2] -= spawnMag * coss(spawnAngle); - } - m->floorHeight = find_floor(m->pos[0], m->pos[1], m->pos[2], &m->floor); if (m->pos[1] < m->floorHeight) {