framerate-independent turning of player-model in multiplayer menu

fixes #701
This commit is contained in:
Daniel Gibson 2021-05-08 18:59:52 +02:00
parent ea51d5f924
commit 002498c33d

View file

@ -4758,7 +4758,6 @@ PlayerConfig_MenuDraw(void)
if (s_pmi[s_player_model_box.curvalue].skindisplaynames)
{
static int yaw;
entity_t entity;
char scratch[MAX_QPATH];
@ -4780,12 +4779,11 @@ PlayerConfig_MenuDraw(void)
entity.frame = 0;
entity.oldframe = 0;
entity.backlerp = 0.0;
entity.angles[1] = (float)yaw;
if (++yaw > 360)
{
yaw -= 360;
}
int curTime = Sys_Milliseconds();
// one full turn is 3s = 3000ms => 3000/360 deg per millisecond
curTime = curTime % 3000;
entity.angles[1] = (float)curTime/(3000.0f/360.0f);
refdef.areabits = 0;
refdef.num_entities = 1;