mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-12-06 03:07:19 +00:00
Limit internal GameObject values.
This commit is contained in:
1 parent
de697d99f4
commit
b8016e16c1
1 file changed
+3
-2
@@ -28,7 +28,7 @@ public final class GameObject extends Entity {
|
||||
*/
|
||||
public GameObject(int id, Position position, int type, int orientation) {
|
||||
super(position);
|
||||
this.packed = id << 8 | type << 2 | orientation;
|
||||
this.packed = id << 8 | (type & 0x3F) << 2 | orientation & 0x3;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,7 +89,8 @@ public final class GameObject extends Entity {
|
||||
|
||||
@Override
|
||||
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