From 7ab48d2de6fd1b55c9f471bc5886f2876c468f65 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 3 Jun 2008 21:35:30 +0000 Subject: [PATCH] - Fixed: MAPINFO's 'lookup' option should only work for actual strings but not for lump and file names. SVN r1017 (trunk) --- docs/rh-log.txt | 2 ++ src/g_level.cpp | 14 ++++++++++---- src/p_acs.cpp | 2 -- src/p_local.h | 2 +- src/r_defs.h | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 65a4df1c3..2f8db45a7 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,6 @@ June 3, 2008 (Changes by Graf Zahl) +- Fixed: MAPINFO's 'lookup' option should only work for actual strings but + not for lump and file names. - Added a few 'activator == NULL' checks to some ACS functions. - Added line and vertex lists to polyobjects so that I can do some changes that won't work with only a seg list being maintained. diff --git a/src/g_level.cpp b/src/g_level.cpp index e287d454d..b07369f48 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -339,6 +339,7 @@ enum EMIType MITYPE_REDIRECT, MITYPE_SPECIALACTION, MITYPE_COMPATFLAG, + MITYPE_STRINGT, }; struct MapInfoHandler @@ -485,8 +486,8 @@ static const char *MapInfoClusterLevel[] = MapInfoHandler ClusterHandlers[] = { - { MITYPE_STRING, cioffset(entertext), CLUSTER_LOOKUPENTERTEXT }, - { MITYPE_STRING, cioffset(exittext), CLUSTER_LOOKUPEXITTEXT }, + { MITYPE_STRINGT, cioffset(entertext), CLUSTER_LOOKUPENTERTEXT }, + { MITYPE_STRINGT, cioffset(exittext), CLUSTER_LOOKUPEXITTEXT }, { MITYPE_MUSIC, cioffset(messagemusic), cioffset(musicorder) }, { MITYPE_LUMPNAME, cioffset(finaleflat), 0 }, { MITYPE_LUMPNAME, cioffset(finaleflat), CLUSTER_FINALEPIC }, @@ -495,7 +496,7 @@ MapInfoHandler ClusterHandlers[] = { MITYPE_HEX, cioffset(cdid), 0 }, { MITYPE_SETFLAG, CLUSTER_ENTERTEXTINLUMP, 0 }, { MITYPE_SETFLAG, CLUSTER_EXITTEXTINLUMP, 0 }, - { MITYPE_STRING, cioffset(clustername), CLUSTER_LOOKUPNAME }, + { MITYPE_STRINGT, cioffset(clustername), CLUSTER_LOOKUPNAME }, }; static void ParseMapInfoLower (FScanner &sc, @@ -1095,7 +1096,7 @@ static void ParseMapInfoLower (FScanner &sc, } break; - case MITYPE_STRING: + case MITYPE_STRINGT: sc.MustGetString (); if (sc.String[0] == '$') { @@ -1114,6 +1115,11 @@ static void ParseMapInfoLower (FScanner &sc, } break; + case MITYPE_STRING: + sc.MustGetString(); + ReplaceString ((char **)(info + handler->data1), sc.String); + break; + case MITYPE_MUSIC: sc.MustGetString (); { diff --git a/src/p_acs.cpp b/src/p_acs.cpp index ea4965020..4c1373940 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -4827,8 +4827,6 @@ int DLevelScript::RunScript () break; case PCD_CHECKWEAPON: - if (script == 4) - __asm nop if (activator == NULL || activator->player == NULL || // Non-players do not have weapons activator->player->ReadyWeapon == NULL) { diff --git a/src/p_local.h b/src/p_local.h index f53e0be66..69b5a5f58 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -23,7 +23,7 @@ #ifndef __P_LOCAL__ #define __P_LOCAL__ -#ifndef __R_LOCAL_H__ +#ifndef __R_LOCAL__ #include "r_local.h" #endif diff --git a/src/r_defs.h b/src/r_defs.h index 5dd58871e..82479a82c 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -875,7 +875,7 @@ public: if (MulScale16(yScale, fitheight) != Height) yScale++; } - void HackHack (int newheight); // called by FMultipatchTexture to discover corrupt patches. + virtual void HackHack (int newheight); // called by FMultipatchTexture to discover corrupt patches. protected: WORD Width, Height, WidthMask;