Merge branch 'hitlag-cam-freeze' into 'master'

Camera no longer updates while you're in hitlag

See merge request KartKrew/Kart!358
This commit is contained in:
Sal 2021-02-02 00:47:41 -05:00
commit 7fc7fa7299

View file

@ -3075,6 +3075,13 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
mo = player->mo; mo = player->mo;
if (mo->hitlag > 0)
{
// Do not move the camera while in hitlag!
// The camera zooming out after you got hit makes it hard to focus on the vibration.
return true;
}
#ifndef NOCLIPCAM #ifndef NOCLIPCAM
cameranoclip = ((player->pflags & PF_NOCLIP) cameranoclip = ((player->pflags & PF_NOCLIP)
|| (mo->flags & (MF_NOCLIP|MF_NOCLIPHEIGHT)) // Noclipping player camera noclips too!! || (mo->flags & (MF_NOCLIP|MF_NOCLIPHEIGHT)) // Noclipping player camera noclips too!!