From b65dfb614553af5ce1a3cc94c596dc383f239fc1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 28 Apr 2021 22:23:48 +0200 Subject: [PATCH] - check r_precache in all games. --- source/games/duke/src/premap.cpp | 1 + source/games/duke/src/premap_r.cpp | 1 + source/games/exhumed/src/enginesubs.cpp | 2 ++ 3 files changed, 4 insertions(+) diff --git a/source/games/duke/src/premap.cpp b/source/games/duke/src/premap.cpp index 10891de9e..35a6e6ca2 100644 --- a/source/games/duke/src/premap.cpp +++ b/source/games/duke/src/premap.cpp @@ -858,6 +858,7 @@ static int LoadTheMap(MapRecord *mi, struct player_struct *p, int gamemode) allignwarpelevators(); resetpspritevars(gamemode); + if (!r_precache) return 0; if (isRR()) cacheit_r(); else cacheit_d(); return 0; } diff --git a/source/games/duke/src/premap_r.cpp b/source/games/duke/src/premap_r.cpp index a7aa8d365..abf5e54e5 100644 --- a/source/games/duke/src/premap_r.cpp +++ b/source/games/duke/src/premap_r.cpp @@ -407,6 +407,7 @@ static void cachegoodsprites(void) void cacheit_r(void) { + if (!r_precache) return; int i; cachegoodsprites(); diff --git a/source/games/exhumed/src/enginesubs.cpp b/source/games/exhumed/src/enginesubs.cpp index 7223f822e..76b570bd4 100644 --- a/source/games/exhumed/src/enginesubs.cpp +++ b/source/games/exhumed/src/enginesubs.cpp @@ -36,6 +36,8 @@ void resettiming() void precache() { + if (!r_precache) return; + int i; for (i = 0; i < numsectors; i++)