From 1a83ec15e49d6a8cd0d5862abf60b4a453345f8e Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 1 Aug 2019 06:50:46 +0000 Subject: [PATCH] Fix silly branching logic in engineLoadBoard() git-svn-id: https://svn.eduke32.com/eduke32@7871 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/engine.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index 5ced9c7e4..b45bd926a 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -9828,9 +9828,9 @@ skip_reading_mapbin: kclose(fil); // Done reading file. - for (i=numsprites-1; i>=0; i--) + if (!have_maptext()) { - if (!have_maptext()) + for (i=numsprites-1; i>=0; i--) { sprite[i].x = B_LITTLE32(sprite[i].x); sprite[i].y = B_LITTLE32(sprite[i].y); @@ -9847,9 +9847,14 @@ skip_reading_mapbin: sprite[i].lotag = B_LITTLE16(sprite[i].lotag); sprite[i].hitag = B_LITTLE16(sprite[i].hitag); sprite[i].extra = B_LITTLE16(sprite[i].extra); - } - check_sprite(i); + check_sprite(i); + } + } + else + { + for (i=numsprites-1; i>=0; i--) + check_sprite(i); } // Back up the map version of the *loaded* map. Must be before yax_update().