diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 01e9f7475f..7996f0af35 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -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) - Put more floor/ceiling properties in sector_t into a substructure and added wrapper functions. diff --git a/src/g_shared/sbarinfo_display.cpp b/src/g_shared/sbarinfo_display.cpp index 2c7aec16ba..49cb276d21 100644 --- a/src/g_shared/sbarinfo_display.cpp +++ b/src/g_shared/sbarinfo_display.cpp @@ -901,30 +901,27 @@ void DSBarInfo::doCommands(SBarInfoBlock &block, int xOffset, int yOffset, int a int cx, cy, cw, ch, cr, cb; // 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 + x = cmd.x + ST_X + xOffset; + y = cmd.y + ST_Y + yOffset; + w = fg->GetScaledWidth(); + h = fg->GetScaledHeight(); + if (Scaled) { - // Calc real screen coordinates for bar - x = cmd.x + ST_X + xOffset; - y = cmd.y + ST_Y + yOffset; - w = fg->GetScaledWidth(); - h = fg->GetScaledHeight(); - if (Scaled) - { - screen->VirtualToRealCoordsInt(x, y, w, h, 320, 200, true); - } - } - else - { - x = cmd.x + xOffset; - y = cmd.y + yOffset; - w = fg->GetScaledWidth(); - h = fg->GetScaledHeight(); - if(vid_fps && x < 0 && y >= 0) - y += 10; + screen->VirtualToRealCoordsInt(x, y, w, h, 320, 200, true); } } + else + { + x = cmd.x + xOffset; + y = cmd.y + yOffset; + w = fg->GetScaledWidth(); + h = fg->GetScaledHeight(); + if(vid_fps && x < 0 && y >= 0) + y += 10; + } if(cmd.special3 != 0) { diff --git a/src/g_shared/sbarinfo_parser.cpp b/src/g_shared/sbarinfo_parser.cpp index a219dbd5ab..ba386d3672 100644 --- a/src/g_shared/sbarinfo_parser.cpp +++ b/src/g_shared/sbarinfo_parser.cpp @@ -1147,16 +1147,18 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block) this->ParseSBarInfoBlock(sc, cmd.subBlock); break; case SBARINFO_ISSELECTED: + //Using StringConst instead of Identifieres is deperecated! if(sc.CheckToken(TK_Identifier)) { if(sc.Compare("not")) { cmd.flags |= SBARINFOEVENT_NOT; + if(!sc.CheckToken(TK_StringConst)) + sc.MustGetToken(TK_Identifier); } - else - sc.ScriptError("Expected 'not' got '%s' instead.", sc.String); } - sc.MustGetToken(TK_StringConst); + else + sc.MustGetToken(TK_StringConst); for(int i = 0;i < 2;i++) { cmd.setString(sc, sc.String, i); @@ -1166,7 +1168,10 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block) sc.ScriptError("'%s' is not a type of weapon.", sc.String); } if(sc.CheckToken(',')) - sc.MustGetToken(TK_StringConst); + { + if(!sc.CheckToken(TK_StringConst)) + sc.MustGetToken(TK_Identifier); + } else break; }