Skip to content

Game reset causes the execution of runtime behaviours during cleanup #884

Open
@Mauller

Description

@Mauller

This will likely end up a more extensive change for later on.

The main issue is that game reset performs the normal destroy operations on objects and drawables, this leads to the execution of code paths that might not be valid anymore by their dependent components.

In the future we likely want to provide a cleaner reset pathway for objects, drawables and all of their dependents.
This reset path should provide the required cleanup without executing runtime logic. And will likely be quicker to execute.

To reinforce this point, some recent fixes have been required due to this behaviour, notably the issue with the deletion of teams and some battleplan bonuses trying to access dangling pointers. And some other behaviours with propaganda towers and their destruction trying to remove bonuses on units within range.

A recent one appears to be a similar issue but with the creation of object debris in response to a runtime action. This was noted by the destruction action on the nuke generals battlemaster that would cause collateral damage, that can result in destroying an object near it triggering the creation of a debris object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DesignIs a matter of game designInvestigateMajorSeverity: Minor < Major < Critical < BlockerStabilityConcerns stability of the runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions