branchrust_reboot/main/3p_spectator_improvementscancel
20 Commits over 31 Days - 0.03cph!
Viewmode fixes:
- Now need to press shift+F3 to set additional viewmodes. Just pressing F3 will only toggle between standard 1st and 3rd person.
- SpectatePlayer should now return the correct currentViewMode during both spectate and demo playback. Removed hack for getting the viewmode
- Can now switch between all viewmodes during demo playback
- Fix SpectatorMode.Update not being called in third person during demo playback
- Smoothed the zooming in and out in third person camera view
- Fixed third person camera zoom being inverted. Added client.'invertthirdpersoncamzoom' convar for the sickos that prefer it the old way
- Fix connections potentially being added more than once in RpcTarget.FromFlags
- Fix spectated player name and health text being invisible when spectating in third person
- Add LocalPlayer.GetLocalOrDemoPlayer() to cleanup some usages for retrieving the local player. Consequently fixed a few incorrect usages of GetLocalOrSpectatePlayer()
- Fix metabolism values on other players not being recorded in demos
- Add RpcTarget.FromFlags to easier construct who we want to send an RPC to
- Fix full server snapshots not being sent if running client+server
Fix potential NRE when starting debug camera
Rename FirstPersonSpectatorMode to SpectatorMode and invoke it when spectating in the third person camera
Fixes a few things only working in the first person spectate camera
▇ ▄▄▋▊▊▇▉▄ ▉▋▋▌▋▄▌▉▌ ▍█ ▉▅█▍▊▊ ▇▋▆▆ ▅▇ ▊▌ ▉▄▉ ▅▉▍▆█▋▅▋▄▍ ▄ ▆▊▆▄▆▄
Fix third person player sounds not working correctly in spectator mode
Fix previous commit breaking the cycling order of the camera viewmodes
Compile fix UIPrisonerHoodOverlay
Replace LocalOrSpectatePlayer property with GetLocalOrSpectatePlayer() that will always prefer to return the currently spectated player regardless of current camera viewmode
Replaced property with getter method to make it clearer that we should prefer to cache the player rather than repeatedly fetching
Checked and replaced all the previous usages. Many files touched, many minor bugs fixed due to the spectate player value having been wrong. Definitely* no new bugs introduced
Metabolism values should now immediately update to latest values upon spectating a player
Fix spam from passing in a zero vector to Quaternion.LookRotation when spectating mounted bots
Commit progress on misc spectating improvements:
- Can now spectate bots with 'global.spectatebots' enabled
- Can now open chat whilst spectating in third person
- Vitals UI should now update correctly whilst spectating in third person
- Display SteamID alongside player name when spectating a new player