Autogenerated interpolation

This commit is contained in:
Anuken 2020-05-24 14:00:53 -04:00
parent 1acb5fc56c
commit 7c06ba94c1
36 changed files with 252 additions and 183 deletions

View file

@ -209,6 +209,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
if(controlledType != null && player.dead()){
Unitc unit = Units.closest(player.team(), player.x(), player.y(), u -> !u.isPlayer() && u.type() == controlledType);
if(unit != null){
Call.onUnitControl(player, unit);
}
@ -218,6 +219,10 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
public void checkUnit(){
if(controlledType != null){
Unitc unit = Units.closest(player.team(), player.x(), player.y(), u -> !u.isPlayer() && u.type() == controlledType);
if(unit == null && controlledType == UnitTypes.block){
unit = world.entWorld(player.x(), player.y()) instanceof ControlBlock ? ((ControlBlock)world.entWorld(player.x(), player.y())).unit() : null;
}
if(unit != null){
if(net.client()){
Call.onUnitControl(player, unit);