Made soft-resetting of the camera no longer change camera position
This commit is contained in:
parent
dba41da8ed
commit
a091ccca93
|
@ -3609,13 +3609,13 @@ void init_camera(struct Camera *c) {
|
||||||
if (sSoftResettingCamera) {
|
if (sSoftResettingCamera) {
|
||||||
c->cutscene = 0;
|
c->cutscene = 0;
|
||||||
sSoftResettingCamera = FALSE;
|
sSoftResettingCamera = FALSE;
|
||||||
}
|
} else {
|
||||||
|
// Set the camera pos to marioOffset (relative to Mario), added to Mario's position
|
||||||
// Set the camera pos to marioOffset (relative to Mario), added to Mario's position
|
offset_rotated(c->pos, sMarioCamState->pos, marioOffset, sMarioCamState->faceAngle);
|
||||||
offset_rotated(c->pos, sMarioCamState->pos, marioOffset, sMarioCamState->faceAngle);
|
if (c->mode != CAMERA_MODE_BEHIND_MARIO) {
|
||||||
if (c->mode != CAMERA_MODE_BEHIND_MARIO) {
|
c->pos[1] = find_floor(sMarioCamState->pos[0], sMarioCamState->pos[1] + 100.f,
|
||||||
c->pos[1] = find_floor(sMarioCamState->pos[0], sMarioCamState->pos[1] + 100.f,
|
sMarioCamState->pos[2], &floor) + 125.f;
|
||||||
sMarioCamState->pos[2], &floor) + 125.f;
|
}
|
||||||
}
|
}
|
||||||
vec3f_copy(c->focus, sMarioCamState->pos);
|
vec3f_copy(c->focus, sMarioCamState->pos);
|
||||||
vec3f_copy(gLakituState.curPos, c->pos);
|
vec3f_copy(gLakituState.curPos, c->pos);
|
||||||
|
|
|
@ -459,11 +459,13 @@ static bool djui_chat_box_input_on_key_down(struct DjuiBase* base, int scancode)
|
||||||
djui_chat_box_input_escape(gDjuiChatBox->chatInput);
|
djui_chat_box_input_escape(gDjuiChatBox->chatInput);
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
bool returnValueOnOtherKeyDown = djui_inputbox_on_key_down(base, scancode);
|
{
|
||||||
if (strcmp(previousText, gDjuiChatBox->chatInput->buffer) != 0) {
|
bool returnValueOnOtherKeyDown = djui_inputbox_on_key_down(base, scancode);
|
||||||
reset_tab_completion_all();
|
if (strcmp(previousText, gDjuiChatBox->chatInput->buffer) != 0) {
|
||||||
|
reset_tab_completion_all();
|
||||||
|
}
|
||||||
|
return returnValueOnOtherKeyDown;
|
||||||
}
|
}
|
||||||
return returnValueOnOtherKeyDown;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -254,7 +254,7 @@ void game_exit(void) {
|
||||||
exit(0);
|
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 *gamedir = gCLIOpts.GameDir[0] ? gCLIOpts.GameDir : FS_BASEDIR;
|
||||||
const char *userpath = gCLIOpts.SavePath[0] ? gCLIOpts.SavePath : sys_user_path();
|
const char *userpath = gCLIOpts.SavePath[0] ? gCLIOpts.SavePath : sys_user_path();
|
||||||
fs_init(sys_ropaths, gamedir, userpath);
|
fs_init(sys_ropaths, gamedir, userpath);
|
||||||
|
|
Loading…
Reference in New Issue