Added proper object size calculations.
Removed old objectDistance code.
Added current task support, allows easy creation of player tasks that cannot duplicate.
This commit is contained in:
Michael Sasse
2019-10-26 19:43:19 -05:00
parent 365e4a13be
commit a9d45373e0
156 changed files with 218 additions and 799 deletions
@@ -28,7 +28,21 @@ public class Region {
public static boolean blockedShot(int x, int y, int z) {
return (getClipping(x, y, z) & 0x20000) == 0;
}
public static Objects getObject(int id, int x, int y, int z) {
Region r = getRegion(x, y);
if (r == null)
return null;
for (Objects o : r.realObjects) {
if (o.objectId == id) {
if (o.objectX == x && o.objectY == y && o.objectHeight == z) {
return o;
}
}
}
return null;
}
public static boolean objectExists(int id, int x, int y, int z) {
Region r = getRegion(x, y);
if (r == null)