Remove Player parameter from Camera::GetPosition

This commit is contained in:
Jochen Sch„fer 2024-09-12 08:18:15 +02:00
parent bce034185b
commit 8fbc76eace
3 changed files with 6 additions and 6 deletions

View File

@ -53,7 +53,7 @@ struct Camera {
/* Returns the current orientation of the camera. */ /* Returns the current orientation of the camera. */
Vec2 (*GetOrientation)(void); Vec2 (*GetOrientation)(void);
/* Returns the current interpolated position of the camera. */ /* Returns the current interpolated position of the camera. */
Vec3 (*GetPosition)(struct LocalPlayer* p, float t); Vec3 (*GetPosition)(float t);
/* Called to update the camera's state. */ /* Called to update the camera's state. */
/* Typically, this is used to adjust yaw/pitch based on accumulated mouse movement. */ /* Typically, this is used to adjust yaw/pitch based on accumulated mouse movement. */

View File

@ -1049,7 +1049,7 @@ void LocalPlayers_MoveToSpawn(struct LocationUpdate* update) {
} }
/* TODO: This needs to be before new map... */ /* TODO: This needs to be before new map... */
Camera.CurrentPos = Camera.Active->GetPosition(p, 0.0f); Camera.CurrentPos = Camera.Active->GetPosition(0.0f);
} }
void LocalPlayer_CalcDefaultSpawn(struct LocalPlayer* p, struct LocationUpdate* update) { void LocalPlayer_CalcDefaultSpawn(struct LocalPlayer* p, struct LocationUpdate* update) {

View File

@ -789,7 +789,7 @@ static CC_INLINE void Game_RenderFrame(void) {
t = (float)(entTask.accumulator / entTask.interval); t = (float)(entTask.accumulator / entTask.interval);
LocalPlayer_SetInterpPosition(Entities.CurPlayer, t); LocalPlayer_SetInterpPosition(Entities.CurPlayer, t);
Camera.CurrentPos = Camera.Active->GetPosition(Entities.CurPlayer, t); Camera.CurrentPos = Camera.Active->GetPosition(t);
/* NOTE: EnvRenderer_UpdateFog also also sets clear color */ /* NOTE: EnvRenderer_UpdateFog also also sets clear color */
EnvRenderer_UpdateFog(); EnvRenderer_UpdateFog();
AudioBackend_Tick(); AudioBackend_Tick();