check for cam subsector
since we can move it around and i added this to freecam mode, subsector may be null for reason so better be safe than sorry
This commit is contained in:
1 parent
ee8f937866
commit
e9c35d269d
1 file changed
+2
-2
+2
-2
@@ -3221,7 +3221,7 @@ static boolean P_CameraCheckHeat(camera_t *thiscam)
|
||||
sector_t *sector;
|
||||
fixed_t halfheight;
|
||||
|
||||
if (!thiscam)
|
||||
if (!thiscam || !thiscam->subsector)
|
||||
return false;
|
||||
|
||||
halfheight = thiscam->z + (thiscam->height >> 1);
|
||||
@@ -3259,7 +3259,7 @@ static boolean P_CameraCheckWater(camera_t *thiscam)
|
||||
sector_t *sector;
|
||||
fixed_t halfheight;
|
||||
|
||||
if (!thiscam)
|
||||
if (!thiscam || !thiscam->subsector)
|
||||
return false;
|
||||
|
||||
halfheight = thiscam->z + (thiscam->height >> 1);
|
||||
|
||||
Reference in new issue
Block a user