Added instant warp offset fix

This commit is contained in:
Reonu
2021-06-01 15:55:51 +01:00
parent ebbad05ad2
commit b2cd5030c7
2 changed files with 9 additions and 1 deletions

View File

@@ -60,6 +60,8 @@
#define DISABLE_LIVES
// Disable AA (Recommended: it changes nothing on emulator, and it makes console run better)
#define DISABLE_AA
// Fix instant warp offset not working when warping across different areas
#define INSTANT_WARP_OFFSET_FIX
// Uncomment this if you want global star IDs (useful for creating an open world hack ala MVC)
//#define GLOBAL_STAR_IDS
// Uncomment this if you want to skip the title screen (Super Mario 64 logo)

View File

@@ -29,6 +29,8 @@
#include "course_table.h"
#include "rumble_init.h"
#include "config.h"
#define PLAY_MODE_NORMAL 0
#define PLAY_MODE_PAUSED 2
#define PLAY_MODE_CHANGE_AREA 3
@@ -557,7 +559,11 @@ void check_instant_warp(void) {
gMarioState->marioObj->oPosX = gMarioState->pos[0];
gMarioState->marioObj->oPosY = gMarioState->pos[1];
gMarioState->marioObj->oPosZ = gMarioState->pos[2];
#ifdef INSTANT_WARP_OFFSET_FIX
gMarioObject->header.gfx.pos[0] = gMarioState->pos[0];
gMarioObject->header.gfx.pos[1] = gMarioState->pos[1];
gMarioObject->header.gfx.pos[2] = gMarioState->pos[2];
#endif
cameraAngle = gMarioState->area->camera->yaw;
change_area(warp->area);