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

This commit is contained in:
Unmatched Bracket 2024-09-25 20:40:34 +00:00
parent 209c545743
commit 491c77bd76

View file

@ -1153,7 +1153,7 @@ void R_SetupFrame(player_t *player)
if (quake.epicenter) {
// Calculate 3D distance from epicenter, using the camera.
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);
dist = R_PointToDist2(0, thiscam->z, xydist, quake.epicenter->z);
} else {