mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-17 01:21:12 +00:00
framerate-independent turning of player-model in multiplayer menu
fixes #701
This commit is contained in:
parent
ea51d5f924
commit
002498c33d
1 changed files with 4 additions and 6 deletions
|
@ -4758,7 +4758,6 @@ PlayerConfig_MenuDraw(void)
|
||||||
|
|
||||||
if (s_pmi[s_player_model_box.curvalue].skindisplaynames)
|
if (s_pmi[s_player_model_box.curvalue].skindisplaynames)
|
||||||
{
|
{
|
||||||
static int yaw;
|
|
||||||
entity_t entity;
|
entity_t entity;
|
||||||
char scratch[MAX_QPATH];
|
char scratch[MAX_QPATH];
|
||||||
|
|
||||||
|
@ -4780,12 +4779,11 @@ PlayerConfig_MenuDraw(void)
|
||||||
entity.frame = 0;
|
entity.frame = 0;
|
||||||
entity.oldframe = 0;
|
entity.oldframe = 0;
|
||||||
entity.backlerp = 0.0;
|
entity.backlerp = 0.0;
|
||||||
entity.angles[1] = (float)yaw;
|
|
||||||
|
|
||||||
if (++yaw > 360)
|
int curTime = Sys_Milliseconds();
|
||||||
{
|
// one full turn is 3s = 3000ms => 3000/360 deg per millisecond
|
||||||
yaw -= 360;
|
curTime = curTime % 3000;
|
||||||
}
|
entity.angles[1] = (float)curTime/(3000.0f/360.0f);
|
||||||
|
|
||||||
refdef.areabits = 0;
|
refdef.areabits = 0;
|
||||||
refdef.num_entities = 1;
|
refdef.num_entities = 1;
|
||||||
|
|
Loading…
Reference in a new issue