mirror of
https://github.com/squeek502/Squake.git
synced 2025-09-11 13:08:46 -04:00
Fix not using the return of quake_moveEntityWithHeading
This commit is contained in:
parent
9c4115ba6c
commit
ca8c1b1079
@ -50,6 +50,7 @@ public class QuakeClientPlayer
|
|||||||
if (!player.world.isRemote)
|
if (!player.world.isRemote)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
boolean didQuakeMovement;
|
||||||
double d0 = player.posX;
|
double d0 = player.posX;
|
||||||
double d1 = player.posY;
|
double d1 = player.posY;
|
||||||
double d2 = player.posZ;
|
double d2 = player.posZ;
|
||||||
@ -57,10 +58,12 @@ public class QuakeClientPlayer
|
|||||||
if ((player.capabilities.isFlying || player.isElytraFlying()) && player.getRidingEntity() == null)
|
if ((player.capabilities.isFlying || player.isElytraFlying()) && player.getRidingEntity() == null)
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
quake_moveEntityWithHeading(player, sidemove, forwardmove);
|
didQuakeMovement = quake_moveEntityWithHeading(player, sidemove, forwardmove);
|
||||||
|
|
||||||
|
if (didQuakeMovement)
|
||||||
player.addMovementStat(player.posX - d0, player.posY - d1, player.posZ - d2);
|
player.addMovementStat(player.posX - d0, player.posY - d1, player.posZ - d2);
|
||||||
return true;
|
|
||||||
|
return didQuakeMovement;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void beforeOnLivingUpdate(EntityPlayer player)
|
public static void beforeOnLivingUpdate(EntityPlayer player)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user