mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-07 08:39:17 +00:00
Limit internal GameObject values.
This commit is contained in:
@@ -28,7 +28,7 @@ public final class GameObject extends Entity {
|
|||||||
*/
|
*/
|
||||||
public GameObject(int id, Position position, int type, int orientation) {
|
public GameObject(int id, Position position, int type, int orientation) {
|
||||||
super(position);
|
super(position);
|
||||||
this.packed = id << 8 | type << 2 | orientation;
|
this.packed = id << 8 | (type & 0x3F) << 2 | orientation & 0x3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -89,7 +89,8 @@ public final class GameObject extends Entity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return MoreObjects.toStringHelper(this).add("id", getId()).add("type", getType()).add("orientation", getOrientation()).toString();
|
return MoreObjects.toStringHelper(this).add("id", getId()).add("type", getType()).add("orientation", getOrientation())
|
||||||
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user