mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Fix console animation with scr_conspeed <= 0
This commit is contained in:
parent
64b9818ec3
commit
e0469ae4b4
1 changed files with 4 additions and 3 deletions
|
@ -667,7 +667,7 @@ void SCR_SetUpToDrawConsole (void)
|
|||
{
|
||||
//johnfitz -- let's hack away the problem of slow console when host_timescale is <0
|
||||
extern cvar_t host_timescale;
|
||||
float timescale;
|
||||
float timescale, conspeed;
|
||||
//johnfitz
|
||||
|
||||
Con_CheckResize ();
|
||||
|
@ -689,18 +689,19 @@ void SCR_SetUpToDrawConsole (void)
|
|||
scr_conlines = 0; //none visible
|
||||
|
||||
timescale = (host_timescale.value > 0) ? host_timescale.value : 1; //johnfitz -- timescale
|
||||
conspeed = (scr_conspeed.value > 0) ? scr_conspeed.value : 1e6f;
|
||||
|
||||
if (scr_conlines < scr_con_current)
|
||||
{
|
||||
// ericw -- (glheight/600.0) factor makes conspeed resolution independent, using 800x600 as a baseline
|
||||
scr_con_current -= scr_conspeed.value*(glheight/600.0)*host_frametime/timescale; //johnfitz -- timescale
|
||||
scr_con_current -= conspeed*(glheight/600.0)*host_frametime/timescale; //johnfitz -- timescale
|
||||
if (scr_conlines > scr_con_current)
|
||||
scr_con_current = scr_conlines;
|
||||
}
|
||||
else if (scr_conlines > scr_con_current)
|
||||
{
|
||||
// ericw -- (glheight/600.0)
|
||||
scr_con_current += scr_conspeed.value*(glheight/600.0)*host_frametime/timescale; //johnfitz -- timescale
|
||||
scr_con_current += conspeed*(glheight/600.0)*host_frametime/timescale; //johnfitz -- timescale
|
||||
if (scr_conlines < scr_con_current)
|
||||
scr_con_current = scr_conlines;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue