mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-03 14:11:10 +00:00
Minor improvements to first person camera
This commit is contained in:
parent
33a6256999
commit
c101a6f6be
3 changed files with 4 additions and 3 deletions
|
@ -37,10 +37,11 @@ bool first_person_check_cancels(struct MarioState *m) {
|
|||
if (m->action == ACT_FIRST_PERSON || m->action == ACT_IN_CANNON || m->action == ACT_READING_NPC_DIALOG || m->action == ACT_DISAPPEARED || m->action == ACT_FLYING) {
|
||||
return true;
|
||||
}
|
||||
if (find_object_with_behavior(smlua_override_behavior(bhvActSelector)) != NULL) { return true; }
|
||||
|
||||
if (gLuaLoadingMod != NULL) { return false; }
|
||||
|
||||
struct Object *bowser = find_object_with_behavior(bhvBowser);
|
||||
struct Object *bowser = find_object_with_behavior(smlua_override_behavior(bhvBowser));
|
||||
if ((gCurrLevelNum == LEVEL_BOWSER_1 || gCurrLevelNum == LEVEL_BOWSER_2 || gCurrLevelNum == LEVEL_BOWSER_3) &&
|
||||
bowser != NULL &&
|
||||
(bowser->oAction == 5 || bowser->oAction == 6)) {
|
||||
|
|
|
@ -1156,7 +1156,7 @@ static s32 obj_is_in_view(struct GraphNodeObject *node, Mat4 matrix) {
|
|||
// visibly pop in or out at the edge of the screen.
|
||||
//
|
||||
// Half of the fov in in-game angle units instead of degrees.
|
||||
s16 halfFov = (not_zero(gCurGraphNodeCamFrustum->fov, gOverrideFOV) / 2.0f + 1.0f) * 32768.0f / 180.0f + 0.5f;
|
||||
s16 halfFov = (get_first_person_enabled() ? gFirstPersonCamera.fov : not_zero(gCurGraphNodeCamFrustum->fov, gOverrideFOV) / 2.0f + 1.0f) * 32768.0f / 180.0f + 0.5f;
|
||||
|
||||
f32 divisor = coss(halfFov);
|
||||
if (divisor == 0) { divisor = 1; }
|
||||
|
|
|
@ -170,7 +170,7 @@ extern s16 gMenuMode;
|
|||
static void controller_sdl_read(OSContPad *pad) {
|
||||
if (!init_ok) { return; }
|
||||
|
||||
if ((newcam_mouse == 1 || gFirstPersonCamera.enabled || gDjuiHudLockMouse) && gMenuMode == -1 && !gDjuiInMainMenu && !gDjuiChatBoxFocus && !gDjuiConsoleFocus && WAPI.has_focus()) {
|
||||
if ((newcam_mouse == 1 || get_first_person_enabled() || gDjuiHudLockMouse) && gMenuMode == -1 && !gDjuiInMainMenu && !gDjuiChatBoxFocus && !gDjuiConsoleFocus && WAPI.has_focus()) {
|
||||
controller_mouse_enter_relative();
|
||||
} else {
|
||||
controller_mouse_leave_relative();
|
||||
|
|
Loading…
Reference in a new issue