diff --git a/src/game/g_map.pas b/src/game/g_map.pas
index ae8ee105f42f3bc783b26d62a6ec4ac7ff08d70f..bbf39cb5efb7bad44613c76d9352e0cb2655b37b 100644 (file)
--- a/src/game/g_map.pas
+++ b/src/game/g_map.pas
result := dfmapdef.parseMap(pr);
except on e: Exception do
begin
- if (pr <> nil) then e_LogWritefln('ERROR at (%s,%s): %s', [pr.line, pr.col, e.message])
+ if (pr <> nil) then e_LogWritefln('ERROR at (%s,%s): %s', [pr.tokLine, pr.tokCol, e.message])
else e_LogWritefln('ERROR: %s', [e.message]);
pr.Free(); // will free `wst`
result := nil;
FreeMem(Data);
+ if (mapReader = nil) then
+ begin
+ e_LogWritefln('invalid map file: ''%s''', [mapResName]);
+ exit;
+ end;
+
generateExternalResourcesList(mapReader);
mapTextureList := mapReader['texture'];
// get all other lists here too
FreeMem(Data);
+ if (mapReader = nil) then exit;
+
if (mapReader.Width > 0) and (mapReader.Height > 0) then
begin
Result.Name := mapReader.MapName;
end;
begin
+ if g_dbgpan_mplat_step then g_dbgpan_mplat_active := true;
+
UpdatePanelArray(gWalls);
UpdatePanelArray(gRenderBackgrounds);
UpdatePanelArray(gRenderForegrounds);
UpdatePanelArray(gAcid2);
UpdatePanelArray(gSteps);
+ if g_dbgpan_mplat_step then begin g_dbgpan_mplat_step := false; g_dbgpan_mplat_active := false; end;
+
if gGameSettings.GameMode = GM_CTF then
begin
for a := FLAG_RED to FLAG_BLUE do
if j > High(gPlayers) then j := 0;
if gPlayers[j] <> nil then
begin
- if gPlayers[j].Live and g_Obj_Collide(@Obj, @gPlayers[j].Obj) then
+ if gPlayers[j].alive and g_Obj_Collide(@Obj, @gPlayers[j].Obj) then
begin
if gPlayers[j].GetFlag(a) then Break;
end;