Remove spawn offsets, a relic of a time where all players were in the same level
This commit is contained in:
parent
a0700f8e02
commit
a694bcea20
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue