From ec98937c88cca3cfa5c2762f042775c0480aecf2 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 26 Dec 2014 14:41:01 -0600 Subject: [PATCH] Read script number as signed when parsing SARY chunks - Fixed: Script arrays didn't work in named scripts because the loader read the script number as an unsigned word, hence it would never find named scripts, since they are stored with negative numbers. --- src/p_acs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index e005c3c674..2929eb32a0 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -2393,7 +2393,7 @@ void FBehavior::LoadScriptsDirectory () int size = LittleLong(scripts.dw[1]); if (size >= 6) { - int script_num = LittleShort(scripts.w[4]); + int script_num = LittleShort(scripts.sw[4]); ScriptPtr *ptr = const_cast(FindScript(script_num)); if (ptr != NULL) {