Skip to content
Snippets Groups Projects

Draft: Fix Lua camera angle/aiming in 1st person.

Closed Jisk requested to merge Jisk/SRB2:firstperson-camera-fix-attempt into next

This weird artifact has been in the game for years, and it's time for it to go. Lua modders no longer have to use work arounds in order to get the first person angles. This change makes the camera angles fall back to localangle/localaiming variables, which R_SetupFrame does already, but doesn't reach Lua. Since the camera angles now fall back to localangle/localaiming, there should be no server latency in multiplayer when getting camera.angle and camera.aiming without chasecam enabled.

World to screen libraries heavily benefit from this

NOTE: Modders using the workaround (switching to player.mo.angle and player.aiming when not in chasecam), trust camera and camera2 from now on, remove any fallback that references player angles instead of camera angles.

Test: camerastuff.lua

Edited by Jisk

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading