mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
Fixed, MODELDEF parser: fixed a crash when model definition didn't contain the "Path" property.
Fixed, MODELDEF parser: forward slash in Model/Skin/SurfaceSkin paths wasn't supported.
This commit is contained in:
parent
2ea72437be
commit
14fa99515e
1 changed files with 4 additions and 3 deletions
|
@ -72,6 +72,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
|
||||
internal ModeldefStructure()
|
||||
{
|
||||
path = string.Empty;
|
||||
skinnames = new string[MAX_MODELS];
|
||||
modelnames = new string[MAX_MODELS];
|
||||
frames = new Dictionary<string, HashSet<FrameStructure>>(StringComparer.OrdinalIgnoreCase);
|
||||
|
@ -156,7 +157,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
}
|
||||
|
||||
// GZDoom allows models with identical index, it uses the last one encountered
|
||||
modelnames[index] = Path.Combine(path, token);
|
||||
modelnames[index] = Path.Combine(path, token).Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
|
||||
break;
|
||||
|
||||
case "skin":
|
||||
|
@ -201,7 +202,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
}
|
||||
|
||||
// GZDoom allows skins with identical index, it uses the last one encountered
|
||||
skinnames[skinindex] = Path.Combine(path, token);
|
||||
skinnames[skinindex] = Path.Combine(path, token).Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
|
||||
break;
|
||||
|
||||
// SurfaceSkin <int modelindex> <int surfaceindex> <string skinfile>
|
||||
|
@ -266,7 +267,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
}
|
||||
|
||||
// Store
|
||||
surfaceskinenames[modelindex][surfaceindex] = Path.Combine(path, token);
|
||||
surfaceskinenames[modelindex][surfaceindex] = Path.Combine(path, token).Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
|
||||
break;
|
||||
|
||||
case "scale":
|
||||
|
|
Loading…
Reference in a new issue