mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-19 14:07:43 +01:00
Fix problem with mare colors not resetting, reduce redraws again, use material texture instead of GPU.
This commit is contained in:
parent
d36e4f891b
commit
80a6e89aa5
8 changed files with 20 additions and 26 deletions
|
|
@ -301,11 +301,11 @@ public class StateApplier(
|
|||
}
|
||||
}
|
||||
|
||||
public ActorData ChangeMaterialValues(ActorState state, bool apply)
|
||||
public ActorData ChangeMaterialValue(ActorState state, MaterialValueIndex index, bool apply)
|
||||
{
|
||||
var data = GetData(state);
|
||||
if (apply)
|
||||
ChangeMaterialValues(data, state.Materials, state.IsLocked);
|
||||
ChangeMaterialValue(data, index, state.Materials.TryGetValue(index, out var v) ? v.Model : null, state.IsLocked);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
@ -326,7 +326,7 @@ public class StateApplier(
|
|||
if (!mainKey.TryGetTexture(actor, out var texture))
|
||||
continue;
|
||||
|
||||
if (!_directX.TryGetColorTable(*texture, out var table))
|
||||
if (!PrepareColorSet.TryGetColorTable(actor, mainKey, out var table))
|
||||
continue;
|
||||
|
||||
foreach (var (key, value) in values)
|
||||
|
|
@ -337,14 +337,6 @@ public class StateApplier(
|
|||
}
|
||||
}
|
||||
|
||||
public ActorData ChangeMaterialValue(ActorState state, MaterialValueIndex index, bool apply)
|
||||
{
|
||||
var data = GetData(state);
|
||||
if (apply)
|
||||
ChangeMaterialValue(data, index, state.Materials.TryGetValue(index, out var v) ? v.Model : null, state.IsLocked);
|
||||
return data;
|
||||
}
|
||||
|
||||
/// <summary> Apply the entire state of an actor to all relevant actors, either via immediate redraw or piecewise. </summary>
|
||||
/// <param name="state"> The state to apply. </param>
|
||||
/// <param name="redraw"> Whether a redraw should be forced. </param>
|
||||
|
|
@ -377,7 +369,6 @@ public class StateApplier(
|
|||
ChangeMetaState(actors, MetaIndex.VisorState, state.ModelData.IsVisorToggled());
|
||||
ChangeCrests(actors, state.ModelData.CrestVisibility);
|
||||
ChangeParameters(actors, state.OnlyChangedParameters(), state.ModelData.Parameters, state.IsLocked);
|
||||
// This should never be applied when caused through IPC, then redraw should be true.
|
||||
ChangeMaterialValues(actors, state.Materials, state.IsLocked);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue