diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2022-05-04 23:53:10 +0100 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2022-05-04 23:53:10 +0100 |
commit | 63f0e42faa98ef0c3776d8c887b991a2555cc8df (patch) | |
tree | c4b2a35399100b9596fc891123061667e7ee23d1 /src | |
parent | dec9908a01a027b200bedb5270891fc3d354d3bf (diff) |
Allow lowering fps_max in the Left 4 Deads
Diffstat (limited to 'src')
-rw-r--r-- | src/fixes.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/fixes.c b/src/fixes.c index 0a503f8..d055ba8 100644 --- a/src/fixes.c +++ b/src/fixes.c @@ -68,6 +68,27 @@ static void generalfixes(void) { // a game will want to require demos only (probably not till demos are more // robust anyway... whatever) chflags("developer", CON_HIDDEN | CON_DEVONLY, CON_DEMO); + + // fps_max policy varies a bit between speedgames and their communities! + // in theory we might wanna remove CON_NOTCONN on Portal 1 in a future + // release, but for now people haven't fully talked themselves into it. + struct con_var *v = con_findvar("fps_max"); + if (GAMETYPE_MATCHES(L4Dx)) { + // for L4D games, generally changing anything above normal limits is + // banned, but externally capping FPS will always be possible so we + // might as well allow lowering it ingame for convenience. + if (v->parent->base.flags & (CON_HIDDEN | CON_DEVONLY)) { + v->parent->base.flags &= ~(CON_HIDDEN | CON_DEVONLY); + v->parent->hasmax = true; v->parent->maxval = 300; + } + else { + // in TLS, this was made changeable, but still limit to 1000 to + // prevent breaking the engine + v->parent->hasmax = true; v->parent->maxval = 1000; + } + // also show the lower limit in help. engine should enforce anyway + v->parent->hasmin = true; v->parent->minval = 30; + } } static void l4d2specific(void) { |