Enabled AI stepping with basic velocity adder system

Enabled AI stepping with basic velocity adder system
Created ServerAudio implementation of Audio which ignores Riiablo.audio calls
This commit is contained in:
Collin Smith
2019-12-28 01:25:44 -08:00
parent 788df90239
commit dd6dbca0f6
3 changed files with 33 additions and 2 deletions

View File

@ -172,7 +172,7 @@ public class Npc extends AI {
} else if (actionTimer > 0) {
actionTimer -= delta;
actionPerformed = actionTimer < 0;
if (!actionPerformed) {
if (!actionPerformed && Riiablo.game != null) { // FIXME: checking Riiablo.game != null for server instances
int player = Riiablo.game.player;
Vector2 targetPos = mPosition.get(player).position;
Vector2 entityPos = mPosition.get(entityId).position;

View File

@ -0,0 +1,25 @@
package com.riiablo.audio;
import com.badlogic.gdx.assets.AssetManager;
import com.riiablo.codec.excel.Sounds;
public class ServerAudio extends Audio {
public ServerAudio(AssetManager assets) {
super(assets);
}
@Override
public Instance play(int id, boolean global) {
return null;
}
@Override
public Instance play(String id, boolean global) {
return null;
}
@Override
public synchronized Instance play(Sounds.Entry sound, boolean global) {
return null;
}
}