perpetual movement machine fixed

This commit is contained in:
2025-03-18 21:29:01 -05:00
parent 5626255b12
commit 537a30710a
2 changed files with 7 additions and 2 deletions
+4 -1
View File
@@ -432,7 +432,10 @@ public enum CombatManager {
//Source can attack. //Source can attack.
//NOTE Don't 'return;' beyond this point until timer created //NOTE Don't 'return;' beyond this point until timer created
if(abstractCharacter.getObjectType().equals(GameObjectType.PlayerCharacter)){
PlayerCharacter pc = (PlayerCharacter)abstractCharacter;
pc.updateMovementState();
}
boolean attackFailure = (wb != null) && (wb.getRange() > 35f) && abstractCharacter.isMoving(); boolean attackFailure = (wb != null) && (wb.getRange() > 35f) && abstractCharacter.isMoving();
//Target can't attack on move with ranged weapons. //Target can't attack on move with ranged weapons.
+3 -1
View File
@@ -24,6 +24,7 @@ import engine.jobs.TrackJob;
import engine.math.AtomicFloat; import engine.math.AtomicFloat;
import engine.math.Bounds; import engine.math.Bounds;
import engine.math.Vector3fImmutable; import engine.math.Vector3fImmutable;
import engine.mobileAI.utilities.CombatUtilities;
import engine.net.ByteBufferWriter; import engine.net.ByteBufferWriter;
import engine.net.DispatchMessage; import engine.net.DispatchMessage;
import engine.net.client.msg.UpdateStateMsg; import engine.net.client.msg.UpdateStateMsg;
@@ -819,7 +820,8 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
//TODO who the fuck wrote changeHeightJob. FIX THIS. //TODO who the fuck wrote changeHeightJob. FIX THIS.
if (this.endLoc.equals(Vector3fImmutable.ZERO) || this.endLoc.equals(this.bindLoc)) float distance = this.loc.distance2D(this.endLoc);
if (this.endLoc.equals(Vector3fImmutable.ZERO) || this.endLoc.equals(this.bindLoc) || distance < 1)
return false; return false;
if (this.takeOffTime != 0) if (this.takeOffTime != 0)