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
c8737bd43f
commit
03e45f4590
1 file changed
+2
-2
+2
-2
@@ -3141,7 +3141,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);
|
||||
@@ -3179,7 +3179,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