Make some IModel fields static

This commit is contained in:
UnknownShadow200 2017-08-18 14:22:00 +10:00
parent 32e24eb914
commit d3fbfb1040
2 changed files with 3 additions and 9 deletions

View File

@ -97,9 +97,6 @@ namespace ClassicalSharp.Model {
protected override void RenderParts(Entity p) {
HumanoidModel human = (HumanoidModel)game.ModelCache.Models[0].Instance;
human.cols = cols;
human.cosHead = cosHead; human.sinHead = sinHead;
human.uScale = uScale; human.vScale = vScale;
vertices = human.vertices;
DrawRotate(-p.HeadXRadians, 0, 0, human.Set.Head, true);
@ -137,9 +134,6 @@ namespace ClassicalSharp.Model {
protected override void RenderParts(Entity p) {
HumanoidModel human = (HumanoidModel)game.ModelCache.Models[0].Instance;
human.cols = cols;
human.cosHead = cosHead; human.sinHead = sinHead;
human.uScale = uScale; human.vScale = vScale;
vertices = human.vertices;
SkinType skinType = p.SkinType;

View File

@ -74,8 +74,9 @@ namespace ClassicalSharp.Model {
/// assuming that the model is not rotated at all.</summary>
public abstract AABB PickingBounds { get; }
protected internal float cosHead, sinHead;
protected internal float uScale, vScale;
protected static float cosHead, sinHead;
protected static float uScale, vScale;
protected static int[] cols = new int[6];
/// <summary> Returns whether the model should be rendered based on the given entity's position. </summary>
public static bool ShouldRender(Entity p, FrustumCulling culling) {
@ -158,7 +159,6 @@ namespace ClassicalSharp.Model {
return p.TransformMatrix(p.ModelScale, pos);
}
protected internal int[] cols = new int[6];
protected internal ModelVertex[] vertices;
protected internal int index, texIndex;