From 261403558bdc14ef4e4c0cfcd55c4ed74a929ddd Mon Sep 17 00:00:00 2001 From: obligaron Date: Sat, 18 Sep 2021 12:55:41 +0200 Subject: [PATCH] Fix SetPlayerGPtrs with RUN_TESTS definied --- Source/player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/player.cpp b/Source/player.cpp index 53e216d01..be6fa0f8e 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -395,14 +395,14 @@ void StartWalk(int pnum, Displacement vel, Direction dir, bool pmWillBeCalled) void SetPlayerGPtrs(const char *path, std::unique_ptr &data, std::array, 8> &anim, int width) { data = nullptr; -#ifndef RUN_TESTS data = LoadFileInMem(path); + if (data == nullptr && gbQuietMode) + return; for (int i = 0; i < 8; i++) { byte *pCelStart = CelGetFrame(data.get(), i); anim[i].emplace(pCelStart, width); } -#endif } void ClearStateVariables(Player &player)