Unit creation, team switch
This commit is contained in:
@@ -292,7 +292,7 @@ public interface BuilderTrait extends Entity, TeamTrait{
|
||||
|
||||
Tile tile = world.tile(request.x, request.y);
|
||||
|
||||
if(dst(tile) > placeDistance){
|
||||
if(dst(tile) > placeDistance && !state.isEditor()){
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -636,7 +636,7 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
|
||||
}
|
||||
|
||||
protected void updateShooting(){
|
||||
if(isShooting() && mech.canShoot(this)){
|
||||
if(!state.isEditor() && isShooting() && mech.canShoot(this)){
|
||||
mech.weapon.update(this, pointerX, pointerY);
|
||||
}
|
||||
}
|
||||
@@ -646,6 +646,10 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
|
||||
target = null;
|
||||
}
|
||||
|
||||
if(state.isEditor()){
|
||||
target = null;
|
||||
}
|
||||
|
||||
float targetX = Core.camera.position.x, targetY = Core.camera.position.y;
|
||||
float attractDst = 15f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user