mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-08-21 23:01:19 -04:00
Fix multiplayer cameras
This commit is contained in:
+13
-10
@@ -759,18 +759,21 @@ void process_game_tick(void) {
|
||||
func_800382DC();
|
||||
}
|
||||
|
||||
// This looks like it should be in the switch.
|
||||
// But it needs to be here for player 1 to work in all modes.
|
||||
if (CVarGetInteger("gFreecam", 0) == true) {
|
||||
freecam(gFreecamCamera, gPlayerOneCopy, 0);
|
||||
} else {
|
||||
func_8001EE98(gPlayerOneCopy, camera1, 0);
|
||||
}
|
||||
|
||||
// Editor requires this so the camera keeps moving while the game is paused.
|
||||
if (gIsEditorPaused == true) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch(gActiveScreenMode) {
|
||||
case SCREEN_MODE_1P:
|
||||
if (CVarGetInteger("gFreecam", 0) == true) {
|
||||
freecam(gFreecamCamera, gPlayerOneCopy, 0);
|
||||
} else {
|
||||
func_8001EE98(gPlayerOneCopy, camera1, 0);
|
||||
}
|
||||
|
||||
// Editor requires this so the camera keeps moving while the game is paused.
|
||||
if (gIsEditorPaused == true) {
|
||||
return;
|
||||
}
|
||||
func_80028F70();
|
||||
break;
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
|
||||
|
||||
@@ -767,7 +767,7 @@ void setup_camera(Camera* camera, s32 playerId, s32 cameraId, struct UnkStruct_8
|
||||
}
|
||||
|
||||
// Setup perspective (camera movement)
|
||||
FrameInterpolation_RecordOpenChild("camera", FrameInterpolation_GetCameraEpoch());
|
||||
FrameInterpolation_RecordOpenChild("camera", (FrameInterpolation_GetCameraEpoch() | (((playerId | cameraId) << 8))));
|
||||
guPerspective(&gGfxPool->mtxPersp[cameraId], &perspNorm, gCameraZoom[cameraId], gScreenAspect,
|
||||
CM_GetProps()->NearPersp, CM_GetProps()->FarPersp, 1.0f);
|
||||
gSPPerspNormalize(gDisplayListHead++, perspNorm);
|
||||
|
||||
+3
-3
@@ -1195,9 +1195,6 @@ void func_8003D080(void) {
|
||||
func_8003C0F0();
|
||||
}
|
||||
|
||||
// Init free cam
|
||||
freecam_init(player->pos[0], player->pos[1], player->pos[2], player->rotation[1], 1, 4);
|
||||
|
||||
if (!gDemoMode) {
|
||||
switch (gActiveScreenMode) {
|
||||
case SCREEN_MODE_1P:
|
||||
@@ -1293,6 +1290,9 @@ void func_8003D080(void) {
|
||||
}
|
||||
}
|
||||
|
||||
// Init free cam
|
||||
freecam_init(player->pos[0], player->pos[1], player->pos[2], player->rotation[1], 1, 4);
|
||||
|
||||
switch (gActiveScreenMode) {
|
||||
case SCREEN_MODE_1P:
|
||||
func_8003CD98(gPlayerOneCopy, camera1, 0, 0); // sic
|
||||
|
||||
Reference in New Issue
Block a user