Fixed setProp x/y not teleporting on strict servers

This commit is contained in:
Anuken
2023-09-22 10:06:43 -04:00
parent 71e049d92d
commit f633fb0af5
13 changed files with 37 additions and 30 deletions
+8
View File
@@ -31,6 +31,14 @@ public class UnitCommand{
switchToMove = false;
drawTarget = true;
resetTarget = false;
}},
loadPayloadCommand = new UnitCommand("loadPayload", "download", u -> null){{
switchToMove = false;
drawTarget = true;
}},
unloadPayloadCommand = new UnitCommand("unloadPayload", "upload", u -> null){{
switchToMove = false;
drawTarget = true;
}};
/** Unique ID number. */
+3 -3
View File
@@ -11,9 +11,9 @@ public class UnitStance{
public static final UnitStance
stopStance = new UnitStance("stop", "cancel"), //not a real stance, cannot be selected, just cancels ordewrs
shootStance = new UnitStance("shoot", "commandAttack"),
holdFireStance = new UnitStance("holdfire", "none"),
stop = new UnitStance("stop", "cancel"), //not a real stance, cannot be selected, just cancels ordewrs
shoot = new UnitStance("shoot", "commandAttack"),
holdFire = new UnitStance("holdfire", "none"),
pursueTarget = new UnitStance("pursuetarget", "right"),
patrol = new UnitStance("patrol", "refresh"),
ram = new UnitStance("ram", "rightOpen");
+3 -3
View File
@@ -31,7 +31,7 @@ public class CommandAI extends AIController{
protected boolean flocked;
/** Stance, usually related to firing mode. */
public UnitStance stance = UnitStance.shootStance;
public UnitStance stance = UnitStance.shoot;
/** Current command this unit is following. */
public @Nullable UnitCommand command;
/** Current controller instance based on command. */
@@ -65,7 +65,7 @@ public class CommandAI extends AIController{
@Override
public void updateUnit(){
//this should not be possible
if(stance == UnitStance.stopStance) stance = UnitStance.shootStance;
if(stance == UnitStance.stop) stance = UnitStance.shoot;
if(stance == UnitStance.pursueTarget && target != null && attackTarget == null && targetPos == null){
commandTarget(target, false);
@@ -279,7 +279,7 @@ public class CommandAI extends AIController{
@Override
public boolean shouldFire(){
return stance != UnitStance.holdFireStance;
return stance != UnitStance.holdFire;
}
@Override