mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 21:45:12 +00:00
Removed spawn offset from players during a same-area-warp
This commit is contained in:
parent
caa38b2df5
commit
48eb2d0ab0
1 changed files with 12 additions and 0 deletions
|
@ -428,6 +428,18 @@ void init_mario_after_warp(void) {
|
|||
init_mario();
|
||||
set_mario_initial_action(gMarioState, marioSpawnType, sWarpDest.arg);
|
||||
|
||||
// remove offset from local mario during warps
|
||||
if (sWarpDest.type == WARP_TYPE_SAME_AREA) {
|
||||
gMarioState[0].pos[0] = (s16)spawnNode->object->oPosX;
|
||||
gMarioState[0].pos[1] = (s16)spawnNode->object->oPosY;
|
||||
gMarioState[0].pos[2] = (s16)spawnNode->object->oPosZ;
|
||||
if (gMarioState[0].marioObj != NULL) {
|
||||
gMarioState[0].marioObj->oPosX = spawnNode->object->oPosX;
|
||||
gMarioState[0].marioObj->oPosY = spawnNode->object->oPosY;
|
||||
gMarioState[0].marioObj->oPosZ = spawnNode->object->oPosZ;
|
||||
}
|
||||
}
|
||||
|
||||
gMarioState->interactObj = spawnNode->object;
|
||||
gMarioState->usedObj = spawnNode->object;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue