blue-nebula / base

Main repository of Blue Nebula, a fast-paced shooter with a unique parkour system. It is a fork of Red Eclipse and is free software.
https://blue-nebula.org
15 stars 6 forks source link

Switching to third person resets camera #219

Open robalni opened 3 years ago

robalni commented 3 years ago

When you spectate someone in first person and then switch to third person, you will no longer be spectating that person and you have to scroll back to the person you were spectating if you want to continue spectating the same person. This happens only the first time you switch to third person. If you do it again everything will be normal and you will not lose the player you were spectating anymore.

This happens because the game will try to load waypoints when you switch to third person (in game/game.cpp in function cameratv, calls ai::getwaypoints). When the waypoints have been loaded, game::specreset is called, which resets the camera as described.

My first thought is that loadwaypoints should not call specreset because I can't see why that would be needed. I don't know why that line was added but it was added in c58005331850e30b9e7158fdac08afc7a735b249.