Skip to content
Snippets Groups Projects
Commit 491c77bd authored by Unmatched Bracket's avatar Unmatched Bracket
Browse files

[quake fixes] Use P_MobjWasRemoved instead of checking against NULL per Zapony's suggestion

parent 209c5457
No related branches found
No related tags found
No related merge requests found
...@@ -1153,7 +1153,7 @@ void R_SetupFrame(player_t *player) ...@@ -1153,7 +1153,7 @@ void R_SetupFrame(player_t *player)
if (quake.epicenter) { if (quake.epicenter) {
// Calculate 3D distance from epicenter, using the camera. // Calculate 3D distance from epicenter, using the camera.
fixed_t xydist, dist; fixed_t xydist, dist;
if (r_viewmobj == NULL) { if (P_MobjWasRemoved(r_viewmobj)) {
xydist = R_PointToDist2(thiscam->x, thiscam->y, quake.epicenter->x, quake.epicenter->y); xydist = R_PointToDist2(thiscam->x, thiscam->y, quake.epicenter->x, quake.epicenter->y);
dist = R_PointToDist2(0, thiscam->z, xydist, quake.epicenter->z); dist = R_PointToDist2(0, thiscam->z, xydist, quake.epicenter->z);
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment