This commit is contained in:
parent
1e78023ee4
commit
fdad30c27f
@ -67,10 +67,14 @@ class EnergyTeleporter {
|
||||
|
||||
float multiplier = (float) newPaddedHeight / (float) oldPaddedHeight;
|
||||
|
||||
y = y - bottomPadding;
|
||||
|
||||
y = (int) (y * multiplier);
|
||||
|
||||
int newMax = newHeight - topPadding;
|
||||
|
||||
y = y + bottomPadding;
|
||||
|
||||
y = MathHelper.clamp(y, bottomPadding, newMax);
|
||||
|
||||
return y;
|
||||
|
Reference in New Issue
Block a user