Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destroying a furniture or its room context while in motion crashes #128

Open
sindreslungaard opened this issue Feb 19, 2021 · 0 comments
Open

Comments

@sindreslungaard
Copy link
Contributor

Calling room.destroy() or item.destroy() while the item is in motion from a move() command causes the whole application to crash.

Example code to reproduce:

let shroom = Shroom.create({ application: app, resourcePath: "./resources/flash" })

let room = Room.create(shroom, {
    tilemap: `
    xxxxxxxx
    x000000x
    x000000x
    x000000x
    x000000x
    x000000x
    x000000x
    xxxxxxxx
    `,
});


let item = new FloorFurniture({
    roomX: 2,
    roomY: 2,
    roomZ: 0,
    type: "plant_pineapple",
    direction: 2
})

room.addRoomObject(item)

setTimeout(() => {
    item.move(3, 2, 0)
    item.destroy()
}, 2000);

app.stage.addChild(room)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant