Made soft-resetting of the camera no longer change camera position

This commit is contained in:
MysterD 2023-11-07 14:57:42 -08:00
parent dba41da8ed
commit a091ccca93
3 changed files with 14 additions and 12 deletions

View File

@ -3609,14 +3609,14 @@ void init_camera(struct Camera *c) {
if (sSoftResettingCamera) {
c->cutscene = 0;
sSoftResettingCamera = FALSE;
}
} else {
// Set the camera pos to marioOffset (relative to Mario), added to Mario's position
offset_rotated(c->pos, sMarioCamState->pos, marioOffset, sMarioCamState->faceAngle);
if (c->mode != CAMERA_MODE_BEHIND_MARIO) {
c->pos[1] = find_floor(sMarioCamState->pos[0], sMarioCamState->pos[1] + 100.f,
sMarioCamState->pos[2], &floor) + 125.f;
}
}
vec3f_copy(c->focus, sMarioCamState->pos);
vec3f_copy(gLakituState.curPos, c->pos);
vec3f_copy(gLakituState.curFocus, c->focus);

View File

@ -459,12 +459,14 @@ static bool djui_chat_box_input_on_key_down(struct DjuiBase* base, int scancode)
djui_chat_box_input_escape(gDjuiChatBox->chatInput);
return true;
default:
{
bool returnValueOnOtherKeyDown = djui_inputbox_on_key_down(base, scancode);
if (strcmp(previousText, gDjuiChatBox->chatInput->buffer) != 0) {
reset_tab_completion_all();
}
return returnValueOnOtherKeyDown;
}
}
}
static void djui_chat_box_input_on_text_input(struct DjuiBase *base, char* text) {

View File

@ -254,7 +254,7 @@ void game_exit(void) {
exit(0);
}
void *main_game_init(void*) {
void* main_game_init(UNUSED void* arg) {
const char *gamedir = gCLIOpts.GameDir[0] ? gCLIOpts.GameDir : FS_BASEDIR;
const char *userpath = gCLIOpts.SavePath[0] ? gCLIOpts.SavePath : sys_user_path();
fs_init(sys_ropaths, gamedir, userpath);