mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Fixed incorrect eye height in vehicles when filly cam is turned off
This commit is contained in:
parent
73cc5ecc54
commit
21a70d205a
1 changed files with 9 additions and 6 deletions
|
@ -47,14 +47,17 @@ abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity implem
|
|||
IPony pony = MineLittlePony.getInstance().getManager().getPony(this);
|
||||
|
||||
if (!pony.getRace(false).isHuman()) {
|
||||
value *= pony.getMetadata().getSize().getEyeHeightFactor();
|
||||
float factor = pony.getMetadata().getSize().getEyeHeightFactor();
|
||||
if (factor != 1) {
|
||||
value *= factor;
|
||||
|
||||
if (hasVehicle()) {
|
||||
value += getVehicle().getEyeHeight(getVehicle().getPose());
|
||||
value -= getVehicle().getMountedHeightOffset();
|
||||
if (hasVehicle()) {
|
||||
value += getVehicle().getEyeHeight(getVehicle().getPose());
|
||||
value -= getVehicle().getMountedHeightOffset();
|
||||
}
|
||||
|
||||
return Math.max(value, 0.1F);
|
||||
}
|
||||
|
||||
return Math.max(value, 0.1F);
|
||||
}
|
||||
|
||||
return value;
|
||||
|
|
Loading…
Reference in a new issue