Skip to content

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

@sindreslungaard

Description

@sindreslungaard

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions