mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 13:51:40 +00:00
- Fixed a bug where textures for internal model skin names did not load when "Path" was specified in MODELDEF
This commit is contained in:
parent
70b2be5e73
commit
c2b18a913e
4 changed files with 10 additions and 2 deletions
|
@ -37,6 +37,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data
|
|||
internal List<Dictionary<int, string>> SurfaceSkinNames;
|
||||
internal List<string> FrameNames;
|
||||
internal List<int> FrameIndices;
|
||||
internal string Path; // biwa
|
||||
|
||||
internal GZModel Model;
|
||||
|
||||
|
@ -71,6 +72,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data
|
|||
SurfaceSkinNames = new List<Dictionary<int, string>>();
|
||||
FrameNames = new List<string>();
|
||||
FrameIndices = new List<int>();
|
||||
Path = string.Empty;
|
||||
transform = Matrix.Identity;
|
||||
transformstretched = Matrix.Identity;
|
||||
hashcode = hashcounter++;
|
||||
|
|
|
@ -185,7 +185,12 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
|
|||
continue;
|
||||
}
|
||||
|
||||
Texture t = GetTexture(containers, result.Skins[m], device);
|
||||
string path = result.Skins[m].Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
|
||||
|
||||
if(!String.IsNullOrEmpty(mde.Path))
|
||||
path = Path.Combine(mde.Path, path);
|
||||
|
||||
Texture t = GetTexture(containers, path, device);
|
||||
|
||||
if(t == null)
|
||||
{
|
||||
|
|
|
@ -187,7 +187,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
if(mds.Frames.ContainsKey(targetsprite))
|
||||
{
|
||||
// Create model data
|
||||
ModelData md = new ModelData { InheritActorPitch = mds.InheritActorPitch, UseActorPitch = mds.UseActorPitch, UseActorRoll = mds.UseActorRoll };
|
||||
ModelData md = new ModelData { InheritActorPitch = mds.InheritActorPitch, UseActorPitch = mds.UseActorPitch, UseActorRoll = mds.UseActorRoll, Path = mds.DataPath };
|
||||
|
||||
// Things are complicated in GZDoom...
|
||||
Matrix moffset = Matrix.Translation(mds.Offset.Y, -mds.Offset.X, mds.Offset.Z);
|
||||
|
|
|
@ -63,6 +63,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
public bool InheritActorPitch { get { return inheritactorpitch; } }
|
||||
public bool UseActorPitch { get { return useactorpitch; } }
|
||||
public bool UseActorRoll { get { return useactorroll; } }
|
||||
public string DataPath { get { return path; } } // biwa
|
||||
|
||||
public Dictionary<string, HashSet<FrameStructure>> Frames { get { return frames; } }
|
||||
|
||||
|
|
Loading…
Reference in a new issue