Camera subsector crash fix
- Nov 12, 2018
-
-
Monster Iestyn authored
Split camera initialisation code from P_SetupLevel, make sure the camera has an initial subsector set!
e85f7311
-
I've lost track how often I've seen crash reports that lead back to P_CameraCheckWater
or perhaps P_CameraCheckHeat
, almost always seeming to be a crash accessing the camera's subsector.
Naturally I've gotten tired of these kind of crashes, so I've attempted a fix for it now. Basically, I've made sure the camera should have a subsector set initially when a level is loaded. If this by some mad chance doesn't fix the crashes, I still think the game should have been doing this anyway in the level loading code, so whatever. *shrugs*
This is a fix for master, because the camera is always a local thing in the first place.
Split camera initialisation code from P_SetupLevel, make sure the camera has an initial subsector set!