mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
Fix name rendering at wrong height, for a model which is a block with minY = 15 and maxY = 16
This commit is contained in:
parent
e5a051f57c
commit
ce62e8eaf1
@ -1476,19 +1476,18 @@ static void BlockModel_CreateParts(void) { }
|
||||
|
||||
static float BlockModel_GetNameY(struct Entity* e) {
|
||||
BlockID block = e->ModelBlock;
|
||||
float height;
|
||||
float top;
|
||||
|
||||
if (Blocks.Draw[block] == DRAW_GAS) {
|
||||
bModel_minBB = Vector3_Zero();
|
||||
bModel_maxBB = Vector3_One();
|
||||
height = 1.0f;
|
||||
top = 1.0f;
|
||||
} else {
|
||||
bModel_minBB = Blocks.MinBB[block];
|
||||
bModel_maxBB = Blocks.MaxBB[block];
|
||||
/* TODO: Should this just be maxY... */
|
||||
height = bModel_maxBB.Y - bModel_minBB.Y;
|
||||
top = bModel_maxBB.Y;
|
||||
}
|
||||
return height + 0.075f;
|
||||
return top + 0.075f;
|
||||
}
|
||||
|
||||
static float BlockModel_GetEyeY(struct Entity* e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user