From 20f9e20e8f78251a0b1b908f06218ddf57ad7e82 Mon Sep 17 00:00:00 2001 From: Major- Date: Fri, 1 Aug 2014 15:10:44 +0100 Subject: [PATCH] Cleanup small parts of ItemDefinitionDecoder and StaticObjectDecoder. --- src/org/apollo/fs/decoder/ItemDefinitionDecoder.java | 2 +- src/org/apollo/fs/decoder/StaticObjectDecoder.java | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/org/apollo/fs/decoder/ItemDefinitionDecoder.java b/src/org/apollo/fs/decoder/ItemDefinitionDecoder.java index ce28391a..05e26355 100644 --- a/src/org/apollo/fs/decoder/ItemDefinitionDecoder.java +++ b/src/org/apollo/fs/decoder/ItemDefinitionDecoder.java @@ -148,7 +148,7 @@ public final class ItemDefinitionDecoder { } else if (opcode == 113) { buffer.get(); } else if (opcode == 114) { - buffer.getShort(); + buffer.get(); } else if (opcode == 115) { definition.setTeam(buffer.get() & 0xFF); } diff --git a/src/org/apollo/fs/decoder/StaticObjectDecoder.java b/src/org/apollo/fs/decoder/StaticObjectDecoder.java index 75497dc3..2a144546 100644 --- a/src/org/apollo/fs/decoder/StaticObjectDecoder.java +++ b/src/org/apollo/fs/decoder/StaticObjectDecoder.java @@ -105,11 +105,12 @@ public final class StaticObjectDecoder { int info = buffer.get() & 0xFF; int type = info >> 2; int rotation = info & 3; + if (type >= 0 && type <= 3 || type >= 9 && type <= 21) { + Position pos = new Position(x + localX, y + localY, height); - Position pos = new Position(x + localX, y + localY, height); - - GameObject object = new GameObject(id, pos, type, rotation); - objects.add(object); + GameObject object = new GameObject(id, pos, type, rotation); + objects.add(object); + } } }