mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-24 05:10:42 -04:00
Fix wrong name offset if two entities both had block models, but of differeing height
This commit is contained in:
parent
cbaca0c922
commit
7c0bec9bf2
@ -67,7 +67,7 @@ namespace ClassicalSharp.Entities {
|
||||
/// <summary> Returns the size of the model that is used for collision detection. </summary>
|
||||
public Vector3 Size;
|
||||
|
||||
void UpdateModel() {
|
||||
protected void UpdateModel() {
|
||||
BlockModel model = Model as BlockModel;
|
||||
if (model != null)
|
||||
model.CalcState(Utils.FastByte(ModelName));
|
||||
|
@ -82,7 +82,8 @@ namespace ClassicalSharp.Entities {
|
||||
IGraphicsApi gfx = game.Graphics;
|
||||
gfx.BindTexture(nameTex.ID);
|
||||
|
||||
Vector3 pos;
|
||||
Vector3 pos;
|
||||
UpdateModel();
|
||||
Vector3.TransformY(Model.NameYOffset, ref transform, out pos);
|
||||
float scale = Math.Min(1, Model.NameScale * ModelScale) / 70f;
|
||||
|
||||
|
@ -11,12 +11,21 @@
|
||||
Copyright 2014-2017 ClassicalSharp | Licensed under BSD-3
|
||||
*/
|
||||
|
||||
#define IModel_QuadVertices 4
|
||||
#define IModel_BoxVertices (Face_Count * IModel_QuadVertices)
|
||||
|
||||
/* Order in which axis rotations are applied to a part. */
|
||||
typedef Int32 RotateOrder;
|
||||
#define RotateOrder_ZYX 0
|
||||
#define RotateOrder_XZY 1
|
||||
|
||||
/* Skin layout a humanoid skin texture can have. */
|
||||
typedef Int32 SkinType;
|
||||
#define SkinType_64x32 0
|
||||
#define SkinType_64x64 1
|
||||
#define SkinType_64x64Slim 2
|
||||
#define SkinType_Invalid 3
|
||||
|
||||
|
||||
/* Describes a vertex within a model. */
|
||||
typedef struct ModelVertex {
|
||||
|
Loading…
x
Reference in New Issue
Block a user