Re-added tap event for servers

This commit is contained in:
Anuken
2020-09-30 15:01:46 -04:00
parent 059c729a2c
commit d07c74b60f
5 changed files with 30 additions and 2 deletions
@@ -274,6 +274,15 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
Core.app.post(() -> Events.fire(new ConfigEvent(tile, player, value)));
}
//only useful for servers or local mods, and is not replicated across clients
//uses unreliable packets due to high frequency
@Remote(targets = Loc.both, called = Loc.both, unreliable = true)
public static void tileTap(@Nullable Player player, Tile tile){
if(tile == null) return;
Events.fire(new TapEvent(player, tile));
}
@Remote(targets = Loc.both, called = Loc.both, forward = true)
public static void unitControl(Player player, @Nullable Unit unit){
if(player == null) return;