UserCmd: use the preferred clamp function

Tends to get optimized better.
This commit is contained in:
Kawe Mazidjatari 2024-07-30 12:08:34 +02:00
parent 0ab2b3f800
commit 3c68b491e7

View File

@ -51,7 +51,7 @@ int ReadUserCmd(bf_read* buf, CUserCmd* move, CUserCmd* from)
// time to the exact values that the client should be using to make sure // time to the exact values that the client should be using to make sure
// it couldn't be circumvented by busting out the client side clamps. // it couldn't be circumvented by busting out the client side clamps.
if (host_timescale->GetFloat() == 1.0f) if (host_timescale->GetFloat() == 1.0f)
move->frametime = clamp(move->frametime, move->frametime = Clamp(move->frametime,
usercmd_frametime_min.GetFloat(), usercmd_frametime_min.GetFloat(),
usercmd_frametime_max.GetFloat()); usercmd_frametime_max.GetFloat());