(SBARINFO patch)

- Fixed: DrawBar would not show.
- Fixed: IsSelected took string constants instead of identifiers.

SVN r1176 (trunk)
This commit is contained in:
Christoph Oelckers 2008-08-18 19:01:14 +00:00
parent 774e559eaf
commit 371d4704b8
3 changed files with 30 additions and 24 deletions

View file

@ -1,3 +1,7 @@
August 18, 2008 (SBARINFO patch)
- Fixed: DrawBar would not show.
- Fixed: IsSelected took string constants instead of identifiers.
August 16, 2008 (Changes by Graf Zahl) August 16, 2008 (Changes by Graf Zahl)
- Put more floor/ceiling properties in sector_t into a substructure and - Put more floor/ceiling properties in sector_t into a substructure and
added wrapper functions. added wrapper functions.

View file

@ -901,8 +901,6 @@ void DSBarInfo::doCommands(SBarInfoBlock &block, int xOffset, int yOffset, int a
int cx, cy, cw, ch, cr, cb; int cx, cy, cw, ch, cr, cb;
// These still need to be caclulated for the clear call. // These still need to be caclulated for the clear call.
if(bg == NULL)
{
if(!block.fullScreenOffsets) if(!block.fullScreenOffsets)
{ {
// Calc real screen coordinates for bar // Calc real screen coordinates for bar
@ -924,7 +922,6 @@ void DSBarInfo::doCommands(SBarInfoBlock &block, int xOffset, int yOffset, int a
if(vid_fps && x < 0 && y >= 0) if(vid_fps && x < 0 && y >= 0)
y += 10; y += 10;
} }
}
if(cmd.special3 != 0) if(cmd.special3 != 0)
{ {

View file

@ -1147,15 +1147,17 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block)
this->ParseSBarInfoBlock(sc, cmd.subBlock); this->ParseSBarInfoBlock(sc, cmd.subBlock);
break; break;
case SBARINFO_ISSELECTED: case SBARINFO_ISSELECTED:
//Using StringConst instead of Identifieres is deperecated!
if(sc.CheckToken(TK_Identifier)) if(sc.CheckToken(TK_Identifier))
{ {
if(sc.Compare("not")) if(sc.Compare("not"))
{ {
cmd.flags |= SBARINFOEVENT_NOT; cmd.flags |= SBARINFOEVENT_NOT;
if(!sc.CheckToken(TK_StringConst))
sc.MustGetToken(TK_Identifier);
}
} }
else else
sc.ScriptError("Expected 'not' got '%s' instead.", sc.String);
}
sc.MustGetToken(TK_StringConst); sc.MustGetToken(TK_StringConst);
for(int i = 0;i < 2;i++) for(int i = 0;i < 2;i++)
{ {
@ -1166,7 +1168,10 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block)
sc.ScriptError("'%s' is not a type of weapon.", sc.String); sc.ScriptError("'%s' is not a type of weapon.", sc.String);
} }
if(sc.CheckToken(',')) if(sc.CheckToken(','))
sc.MustGetToken(TK_StringConst); {
if(!sc.CheckToken(TK_StringConst))
sc.MustGetToken(TK_Identifier);
}
else else
break; break;
} }