- Fixed: MAPINFO's 'lookup' option should only work for actual strings but

not for lump and file names.


SVN r1017 (trunk)
This commit is contained in:
Christoph Oelckers 2008-06-03 21:35:30 +00:00
parent 8a3edf9716
commit 7ab48d2de6
5 changed files with 14 additions and 8 deletions

View file

@ -1,4 +1,6 @@
June 3, 2008 (Changes by Graf Zahl) 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 a few 'activator == NULL' checks to some ACS functions.
- Added line and vertex lists to polyobjects so that I can do some - 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. changes that won't work with only a seg list being maintained.

View file

@ -339,6 +339,7 @@ enum EMIType
MITYPE_REDIRECT, MITYPE_REDIRECT,
MITYPE_SPECIALACTION, MITYPE_SPECIALACTION,
MITYPE_COMPATFLAG, MITYPE_COMPATFLAG,
MITYPE_STRINGT,
}; };
struct MapInfoHandler struct MapInfoHandler
@ -485,8 +486,8 @@ static const char *MapInfoClusterLevel[] =
MapInfoHandler ClusterHandlers[] = MapInfoHandler ClusterHandlers[] =
{ {
{ MITYPE_STRING, cioffset(entertext), CLUSTER_LOOKUPENTERTEXT }, { MITYPE_STRINGT, cioffset(entertext), CLUSTER_LOOKUPENTERTEXT },
{ MITYPE_STRING, cioffset(exittext), CLUSTER_LOOKUPEXITTEXT }, { MITYPE_STRINGT, cioffset(exittext), CLUSTER_LOOKUPEXITTEXT },
{ MITYPE_MUSIC, cioffset(messagemusic), cioffset(musicorder) }, { MITYPE_MUSIC, cioffset(messagemusic), cioffset(musicorder) },
{ MITYPE_LUMPNAME, cioffset(finaleflat), 0 }, { MITYPE_LUMPNAME, cioffset(finaleflat), 0 },
{ MITYPE_LUMPNAME, cioffset(finaleflat), CLUSTER_FINALEPIC }, { MITYPE_LUMPNAME, cioffset(finaleflat), CLUSTER_FINALEPIC },
@ -495,7 +496,7 @@ MapInfoHandler ClusterHandlers[] =
{ MITYPE_HEX, cioffset(cdid), 0 }, { MITYPE_HEX, cioffset(cdid), 0 },
{ MITYPE_SETFLAG, CLUSTER_ENTERTEXTINLUMP, 0 }, { MITYPE_SETFLAG, CLUSTER_ENTERTEXTINLUMP, 0 },
{ MITYPE_SETFLAG, CLUSTER_EXITTEXTINLUMP, 0 }, { MITYPE_SETFLAG, CLUSTER_EXITTEXTINLUMP, 0 },
{ MITYPE_STRING, cioffset(clustername), CLUSTER_LOOKUPNAME }, { MITYPE_STRINGT, cioffset(clustername), CLUSTER_LOOKUPNAME },
}; };
static void ParseMapInfoLower (FScanner &sc, static void ParseMapInfoLower (FScanner &sc,
@ -1095,7 +1096,7 @@ static void ParseMapInfoLower (FScanner &sc,
} }
break; break;
case MITYPE_STRING: case MITYPE_STRINGT:
sc.MustGetString (); sc.MustGetString ();
if (sc.String[0] == '$') if (sc.String[0] == '$')
{ {
@ -1114,6 +1115,11 @@ static void ParseMapInfoLower (FScanner &sc,
} }
break; break;
case MITYPE_STRING:
sc.MustGetString();
ReplaceString ((char **)(info + handler->data1), sc.String);
break;
case MITYPE_MUSIC: case MITYPE_MUSIC:
sc.MustGetString (); sc.MustGetString ();
{ {

View file

@ -4827,8 +4827,6 @@ int DLevelScript::RunScript ()
break; break;
case PCD_CHECKWEAPON: case PCD_CHECKWEAPON:
if (script == 4)
__asm nop
if (activator == NULL || activator->player == NULL || // Non-players do not have weapons if (activator == NULL || activator->player == NULL || // Non-players do not have weapons
activator->player->ReadyWeapon == NULL) activator->player->ReadyWeapon == NULL)
{ {

View file

@ -23,7 +23,7 @@
#ifndef __P_LOCAL__ #ifndef __P_LOCAL__
#define __P_LOCAL__ #define __P_LOCAL__
#ifndef __R_LOCAL_H__ #ifndef __R_LOCAL__
#include "r_local.h" #include "r_local.h"
#endif #endif

View file

@ -875,7 +875,7 @@ public:
if (MulScale16(yScale, fitheight) != Height) yScale++; 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: protected:
WORD Width, Height, WidthMask; WORD Width, Height, WidthMask;