Skip to content

Commit

Permalink
Merge pull request runelite#2014 from Abextm/object-varname
Browse files Browse the repository at this point in the history
cache: Name ObjectDefiniton's varpID and configID correctly
  • Loading branch information
Adam- authored Apr 27, 2018
2 parents 7c68044 + 575645f commit a8e2f19
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class ObjectDefinition
private boolean nonFlatShading = false;
private int anInt2088 = -1;
private int animationID = -1;
private int varpID = -1;
private int varbitID = -1;
private int ambient = 0;
private int contrast = 0;
private String[] actions = new String[5];
Expand All @@ -68,7 +68,7 @@ public class ObjectDefinition
private int anInt2106 = -1;
private int[] configChangeDest;
private boolean isRotated = false;
private int configId = -1;
private int varpID = -1;
private int anInt2110 = -1;
private boolean aBool2111 = false;
private int anInt2112 = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,14 @@ else if (opcode == 77)
{
varpID = -1;
}
def.setVarpID(varpID);
def.setVarbitID(varpID);

int configId = is.readUnsignedShort();
if (configId == 0xFFFF)
{
configId = -1;
}
def.setConfigId(configId);
def.setVarpID(configId);

int length = is.readUnsignedByte();
int[] configChangeDest = new int[length + 2];
Expand Down Expand Up @@ -313,14 +313,14 @@ else if (opcode == 92)
{
varpID = -1;
}
def.setVarpID(varpID);
def.setVarbitID(varpID);

int configId = is.readUnsignedShort();
if (configId == 0xFFFF)
{
configId = -1;
}
def.setConfigId(configId);
def.setVarpID(configId);


int var = is.readUnsignedShort();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ else if (!obj.isBlocksProjectile())
if (obj.getConfigChangeDest() != null)
{
out.writeByte(92);
out.writeShort(obj.getVarbitID());
out.writeShort(obj.getVarpID());
out.writeShort(obj.getConfigId());

int[] c = obj.getConfigChangeDest();
out.writeShort(c[c.length - 1]);
Expand Down

0 comments on commit a8e2f19

Please sign in to comment.