Skip to content

Commit

Permalink
Make i_timescale cvar virtual
Browse files Browse the repository at this point in the history
Changing i_timescale in a netgame would cause its callback to recurse
into itself infinitely. CVAR_VIRTUAL prevents this.
  • Loading branch information
emily authored and coelckers committed Mar 24, 2021
1 parent 3b50f7d commit c6073d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/d_main.cpp
Expand Up @@ -200,7 +200,7 @@ const char* iwad_folders[13] = { "flats/", "textures/", "hires/", "sprites/", "v
const char* iwad_reserved[12] = { "mapinfo", "zmapinfo", "gameinfo", "sndinfo", "sbarinfo", "menudef", "gldefs", "animdefs", "decorate", "zscript", "iwadinfo", "maps/" };


CUSTOM_CVAR(Float, i_timescale, 1.0f, CVAR_NOINITCALL)
CUSTOM_CVAR(Float, i_timescale, 1.0f, CVAR_NOINITCALL | CVAR_VIRTUAL)
{
if (netgame)
{
Expand Down

0 comments on commit c6073d9

Please sign in to comment.