mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Fix wf_act_match_to_sshot packet sending (closes #338)
This commit is contained in:
parent
b439774c11
commit
fe78102678
@ -57,7 +57,9 @@ public class WiredEffectMatchFurni extends InteractionWiredEffect {
|
|||||||
|
|
||||||
int oldRotation = item.getRotation();
|
int oldRotation = item.getRotation();
|
||||||
boolean slideAnimation = true;
|
boolean slideAnimation = true;
|
||||||
if (this.direction) {
|
double offsetZ = 0;
|
||||||
|
|
||||||
|
if (this.direction && item.getRotation() != setting.rotation) {
|
||||||
item.setRotation(setting.rotation);
|
item.setRotation(setting.rotation);
|
||||||
slideAnimation = false;
|
slideAnimation = false;
|
||||||
|
|
||||||
@ -73,12 +75,9 @@ public class WiredEffectMatchFurni extends InteractionWiredEffect {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//room.sendComposer(new ItemStateComposer(item).compose());
|
|
||||||
room.sendComposer(new FloorItemUpdateComposer(item).compose());
|
|
||||||
|
|
||||||
if (this.position) {
|
|
||||||
RoomTile t = room.getLayout().getTile((short) setting.x, (short) setting.y);
|
RoomTile t = room.getLayout().getTile((short) setting.x, (short) setting.y);
|
||||||
|
|
||||||
|
if (this.position) {
|
||||||
if (t != null) {
|
if (t != null) {
|
||||||
if (t.state != RoomTileState.INVALID) {
|
if (t.state != RoomTileState.INVALID) {
|
||||||
boolean canMove = true;
|
boolean canMove = true;
|
||||||
@ -111,21 +110,25 @@ public class WiredEffectMatchFurni extends InteractionWiredEffect {
|
|||||||
if (highestZ != -1d) {
|
if (highestZ != -1d) {
|
||||||
tilesToUpdate.addAll(tiles);
|
tilesToUpdate.addAll(tiles);
|
||||||
|
|
||||||
double offsetZ = highestZ - item.getZ();
|
offsetZ = highestZ - item.getZ();
|
||||||
double totalHeight = item.getZ() + offsetZ;
|
double totalHeight = item.getZ() + offsetZ;
|
||||||
if(totalHeight > 40) break;
|
if (totalHeight > 40) break;
|
||||||
tilesToUpdate.addAll(room.getLayout().getTilesAt(room.getLayout().getTile(item.getX(), item.getY()), item.getBaseItem().getWidth(), item.getBaseItem().getLength(), oldRotation));
|
tilesToUpdate.addAll(room.getLayout().getTilesAt(room.getLayout().getTile(item.getX(), item.getY()), item.getBaseItem().getWidth(), item.getBaseItem().getLength(), oldRotation));
|
||||||
|
|
||||||
if (!slideAnimation) {
|
if (!slideAnimation) {
|
||||||
item.setX(t.x);
|
item.setX(t.x);
|
||||||
item.setY(t.y);
|
item.setY(t.y);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (slideAnimation && t != null) {
|
||||||
room.sendComposer(new FloorItemOnRollerComposer(item, null, t, offsetZ, room).compose());
|
room.sendComposer(new FloorItemOnRollerComposer(item, null, t, offsetZ, room).compose());
|
||||||
}
|
} else {
|
||||||
}
|
room.updateItem(item);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
item.needsUpdate(true);
|
item.needsUpdate(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user