mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-06 23:51:17 +00:00
Do a full reset of the camera again. More janky, but prevents camera softlock
This commit is contained in:
parent
b673457a48
commit
6dc5819583
5 changed files with 3 additions and 11 deletions
|
@ -3252,13 +3252,6 @@ void update_camera(struct Camera *c) {
|
||||||
gLakituState.lastFrameAction = sMarioCamState->action;
|
gLakituState.lastFrameAction = sMarioCamState->action;
|
||||||
}
|
}
|
||||||
|
|
||||||
void semi_reset_camera(struct Camera* c) {
|
|
||||||
s16 oldMovementFlags = gCameraMovementFlags;
|
|
||||||
reset_camera(c);
|
|
||||||
|
|
||||||
// don't cause a reset of position/rotation
|
|
||||||
gCameraMovementFlags = oldMovementFlags;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Reset all the camera variables to their arcane defaults
|
* Reset all the camera variables to their arcane defaults
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -687,7 +687,6 @@ void move_mario_head_c_up(UNUSED struct Camera *c);
|
||||||
void transition_next_state(UNUSED struct Camera *c, s16 frames);
|
void transition_next_state(UNUSED struct Camera *c, s16 frames);
|
||||||
void set_camera_mode(struct Camera *c, s16 mode, s16 frames);
|
void set_camera_mode(struct Camera *c, s16 mode, s16 frames);
|
||||||
void update_camera(struct Camera *c);
|
void update_camera(struct Camera *c);
|
||||||
void semi_reset_camera(struct Camera* c);
|
|
||||||
void reset_camera(struct Camera *c);
|
void reset_camera(struct Camera *c);
|
||||||
void init_camera(struct Camera *c);
|
void init_camera(struct Camera *c);
|
||||||
void select_mario_cam_mode(void);
|
void select_mario_cam_mode(void);
|
||||||
|
|
|
@ -403,7 +403,7 @@ void mario_set_bubbled(struct MarioState* m) {
|
||||||
gCutsceneTimer = 0;
|
gCutsceneTimer = 0;
|
||||||
|
|
||||||
if (m->playerIndex == 0) {
|
if (m->playerIndex == 0) {
|
||||||
semi_reset_camera(m->area->camera);
|
reset_camera(m->area->camera);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -953,7 +953,7 @@ s32 act_bubbled(struct MarioState* m) {
|
||||||
m->vel[2] = 0;
|
m->vel[2] = 0;
|
||||||
m->marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE;
|
m->marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE;
|
||||||
if (m->playerIndex == 0) {
|
if (m->playerIndex == 0) {
|
||||||
semi_reset_camera(m->area->camera);
|
reset_camera(m->area->camera);
|
||||||
}
|
}
|
||||||
return force_idle_state(m);
|
return force_idle_state(m);
|
||||||
}
|
}
|
||||||
|
|
|
@ -710,7 +710,7 @@ void general_star_dance_handler(struct MarioState *m, s32 isInWater) {
|
||||||
set_mario_action(m, isInWater ? ACT_WATER_IDLE : ACT_IDLE, 0);
|
set_mario_action(m, isInWater ? ACT_WATER_IDLE : ACT_IDLE, 0);
|
||||||
}
|
}
|
||||||
if (gServerSettings.stayInLevelAfterStar) {
|
if (gServerSettings.stayInLevelAfterStar) {
|
||||||
semi_reset_camera(m->area->camera);
|
reset_camera(m->area->camera);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue