diff --git a/src/r_main.c b/src/r_main.c index 97d6876e..1ad125cd 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -919,9 +919,9 @@ void R_SkyboxFrame(player_t *player) } } if (mh->skybox_scalez > 0) - viewz += player->awayviewmobj->z / mh->skybox_scalez; + viewz += (player->awayviewmobj->z + 20*FRACUNIT) / mh->skybox_scalez; else if (mh->skybox_scalez < 0) - viewz += player->awayviewmobj->z * -mh->skybox_scalez; + viewz += (player->awayviewmobj->z + 20*FRACUNIT) * -mh->skybox_scalez; } else if (thiscam->chase) { @@ -966,9 +966,9 @@ void R_SkyboxFrame(player_t *player) } } if (mh->skybox_scalez > 0) - viewz += thiscam->z / mh->skybox_scalez; + viewz += (thiscam->z + (thiscam->height>>1)) / mh->skybox_scalez; else if (mh->skybox_scalez < 0) - viewz += thiscam->z * -mh->skybox_scalez; + viewz += (thiscam->z + (thiscam->height>>1)) * -mh->skybox_scalez; } else {