From e2f43a59a7b0b07718fff697e11dffc651ae6cee Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 19 May 2019 03:53:07 +0000 Subject: [PATCH] Add EDUKE32_PREDICT_FALSE to EVENT_ANIMATESPRITES check in G_SaveMapState() and G_RestoreMapState() git-svn-id: https://svn.eduke32.com/eduke32@7632 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/gameexec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/duke3d/src/gameexec.cpp b/source/duke3d/src/gameexec.cpp index 3808400de..c0aed9248 100644 --- a/source/duke3d/src/gameexec.cpp +++ b/source/duke3d/src/gameexec.cpp @@ -6665,7 +6665,7 @@ void G_SaveMapState(void) // If we're in EVENT_ANIMATESPRITES, we'll be saving pointer values to disk :-/ #if !defined LUNATIC - if (g_currentEvent == EVENT_ANIMATESPRITES) + if (EDUKE32_PREDICT_FALSE(g_currentEvent == EVENT_ANIMATESPRITES)) initprintf("Line %d: savemapstate called from EVENT_ANIMATESPRITES. WHY?\n", g_errorLineNum); #endif Bmemcpy(&save->spriteext[0],&spriteext[0],sizeof(spriteext_t)*MAXSPRITES); @@ -6804,7 +6804,7 @@ void G_RestoreMapState(void) // If we're restoring from EVENT_ANIMATESPRITES, all spriteext[].tspr // will be overwritten, so NULL them. #if !defined LUNATIC - if (g_currentEvent == EVENT_ANIMATESPRITES) + if (EDUKE32_PREDICT_FALSE(g_currentEvent == EVENT_ANIMATESPRITES)) { initprintf("Line %d: loadmapstate called from EVENT_ANIMATESPRITES. WHY?\n",g_errorLineNum); for (native_t i=0; i