Skip to content

[Bug?] Component cache retention causes unexpected behaviors #312

Description

@oznogon

Discord thread

Given:

debris=Asteroid():setPosition(0,2000):setRadarTraceIcon("blip.png"):setRadarTraceColor(200,200,200):setDescriptions("Debris. Scan for more info","Explosive"):setScanningParameters(1,1)               
debris:setModel("ammo_box")

The scale of the ammo box is 120x of what's expected.

@GinjaNinja32:

due to 924102c, your asteroid having mesh_render.scale = random(110,130) doesn't get overridden back to default when the component gets overwritten by setModel()

it gets overridden if the model specifies a scale, but not if it doesn't

so you end up with models expecting to inherit scale=1 but instead getting scale=120 or so and ending up a lot bigger than they should be

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