Skip to content

Commit

Permalink
Tighten up cutscene detection (#269)
Browse files Browse the repository at this point in the history
Previously, mouse movement was disabled until the next
server frame after receiving a svc_setangle in order to
prevent jittery camera movement during cutscenes such as
the one at the beginning of ad_tears (which would happen
because input/rendering is decoupled from the server).

Now we also check for a NULL viewmodel before disabling
mouse movement in to allow view angle adjustments during
gameplay (e.g. the instant teleporters in Alkaline 1.2).
  • Loading branch information
andrei-drexler committed Nov 27, 2023
1 parent b9d8a85 commit 05a151b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Quake/in_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ extern cvar_t scr_fov;

void IN_MouseMotion(int dx, int dy)
{
if (cls.state != ca_connected || cls.signon != SIGNONS || key_dest != key_game || cl.fixangle)
qboolean cutscene = cl.fixangle && !cl.viewent.model;
if (cls.state != ca_connected || cls.signon != SIGNONS || key_dest != key_game || cutscene)
{
total_dx = 0;
total_dy = 0;
Expand Down

0 comments on commit 05a151b

Please sign in to comment.