game.cpp: change camera sprite yvel limits to clamp to min/max angle when beyond the min/max rather than when beyond 0 and 199

git-svn-id: https://svn.eduke32.com/eduke32@7728 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
pogokeen 2019-06-25 18:34:49 +00:00 committed by Christoph Oelckers
parent 0cc6ff2e48
commit 87d3af7204
2 changed files with 2 additions and 4 deletions

View file

@ -7562,7 +7562,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
{
if (pSprite->extra < 1 && (ud.recstat == 0 || !ud.democams)) break;
if (pSprite->extra == 1)
if (klabs(pSprite->extra) == 2)
{
actor[spriteNum].tempang = pSprite->ang;
if (ud.camerasprite != spriteNum)

View file

@ -750,9 +750,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
{
spritetype *const pSprite = &sprite[ud.camerasprite];
// XXX: what?
if (pSprite->yvel < 0) pSprite->yvel = -100;
else if (pSprite->yvel > 199) pSprite->yvel = 300;
pSprite->yvel = clamp(TrackerCast(pSprite->yvel), -100, 300);
CAMERA(q16ang) = fix16_from_int(actor[ud.camerasprite].tempang
+ mulscale16(((pSprite->ang + 1024 - actor[ud.camerasprite].tempang) & 2047) - 1024, smoothRatio));