PTCL : fix some material assignments for primitives.
This commit is contained in:
parent
33801bc48c
commit
968ac33d09
@ -50,6 +50,9 @@ namespace FirstPlugin
|
||||
}
|
||||
}
|
||||
|
||||
//Determines if the binary is in a PTCL binary file.
|
||||
public bool IsParticlePrimitive = false;
|
||||
|
||||
public bool DisplayIcons => false;
|
||||
|
||||
public List<STGenericTexture> TextureList
|
||||
@ -914,7 +917,7 @@ namespace FirstPlugin
|
||||
public void Save(System.IO.Stream stream)
|
||||
{
|
||||
var Models = GetModels();
|
||||
if (Models != null)
|
||||
if (Models != null && !IsParticlePrimitive)
|
||||
{
|
||||
foreach (FMDL mdl in Models)
|
||||
{
|
||||
|
@ -611,6 +611,7 @@ namespace FirstPlugin
|
||||
|
||||
reader.Seek(section.BinaryDataOffset + section.Position, SeekOrigin.Begin);
|
||||
BinaryData = new BFRES();
|
||||
((BFRES)BinaryData).IsParticlePrimitive = true;
|
||||
((BFRES)BinaryData).FileName = "model.bfres";
|
||||
((BFRES)BinaryData).Load(new MemoryStream(reader.ReadBytes((int)section.SectionSize)));
|
||||
((BFRES)BinaryData).IFileInfo = new IFileInfo();
|
||||
@ -654,7 +655,7 @@ namespace FirstPlugin
|
||||
case "G3PR":
|
||||
{
|
||||
var mem = new System.IO.MemoryStream();
|
||||
if (BinaryData != null)
|
||||
if (BinaryData != null && ((BFRES)BinaryData).CanSave)
|
||||
{
|
||||
((BFRES)BinaryData).Save(mem);
|
||||
SaveHeader(writer, header, mem.ToArray(), 4096);
|
||||
|
Loading…
x
Reference in New Issue
Block a user