mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 10:17:23 +01:00
Fix previous fix for weapons.
This commit is contained in:
parent
b98cb31fd2
commit
096d82741d
1 changed files with 11 additions and 6 deletions
|
|
@ -157,19 +157,23 @@ public sealed unsafe class MaterialManager : IRequiredService, IDisposable
|
||||||
/// <summary> Find the type of the given draw object by checking the actors pointers. </summary>
|
/// <summary> Find the type of the given draw object by checking the actors pointers. </summary>
|
||||||
private static bool FindType(CharacterBase* characterBase, Actor actor, out MaterialValueIndex.DrawObjectType type)
|
private static bool FindType(CharacterBase* characterBase, Actor actor, out MaterialValueIndex.DrawObjectType type)
|
||||||
{
|
{
|
||||||
type = MaterialValueIndex.DrawObjectType.Invalid;
|
|
||||||
if (!((Model)characterBase).IsHuman)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
type = type = MaterialValueIndex.DrawObjectType.Human;
|
|
||||||
if (!actor.Valid)
|
if (!actor.Valid)
|
||||||
|
{
|
||||||
|
type = MaterialValueIndex.DrawObjectType.Invalid;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (actor.Model.AsCharacterBase == characterBase)
|
if (actor.Model.AsCharacterBase == characterBase && ((Model)characterBase).IsHuman)
|
||||||
|
{
|
||||||
|
type = MaterialValueIndex.DrawObjectType.Human;
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!actor.AsObject->IsCharacter())
|
if (!actor.AsObject->IsCharacter())
|
||||||
|
{
|
||||||
|
type = MaterialValueIndex.DrawObjectType.Invalid;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (actor.AsCharacter->DrawData.WeaponData[0].DrawObject == characterBase)
|
if (actor.AsCharacter->DrawData.WeaponData[0].DrawObject == characterBase)
|
||||||
{
|
{
|
||||||
|
|
@ -183,6 +187,7 @@ public sealed unsafe class MaterialManager : IRequiredService, IDisposable
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type = MaterialValueIndex.DrawObjectType.Invalid;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue