Merge pull request #655 from deathbeam/hunter-maniacal-monkeys

Hunter maniacal monkeys
This commit is contained in:
Adam
2018-02-24 13:08:08 -05:00
committed by GitHub
6 changed files with 103 additions and 36 deletions

View File

@@ -58,6 +58,9 @@ public abstract class RSTileMixin implements RSTile
@Shadow("clientInstance")
private static RSClient client;
@Inject
private static GameObject lastGameObject;
@Inject
private WallObject previousWallObject;
@@ -208,12 +211,25 @@ public abstract class RSTileMixin implements RSTile
// Previous game object
GameObject previous = previousGameObjects[idx];
// GameObject that was changed.
RSGameObject current = (RSGameObject) getGameObjects()[idx];
// Last game object
GameObject last = lastGameObject;
// Update last game object
lastGameObject = current;
// Update previous object to current
previousGameObjects[idx] = current;
// Duplicate event, return
if (current != null && current.equals(last))
{
return;
}
// Characters seem to generate a constant stream of new GameObjects
if (current == null || !(current.getRenderable() instanceof Actor))
{