Skip to content

Game crashes when vehicle selected for camera to follow is deleted #2817

@DanBodell

Description

@DanBodell

Version information:

  • Platform: Windows build (via Linux x64 with WINE compatibility layer)
  • Version: 24.12
  • Build/commit: master

Describe the bug
See title. When a vehicle is being followed by the camera, if it is deleted the camera bugs out, then the game crashes.

To Reproduce
Steps to reproduce the behaviour:

  1. Open a scenario
  2. Create a vehicle
  3. Click on vehicle to get tracking window
  4. Press the center on vehicle button in the bottom right of the tracking window, select "Follow vehicle on main view"
  5. Delete vehicle

Expected behaviour
Camera defaults back to basic behaviour

Screenshots
N/A?, can be added if needed

Additional context
Likely due to the camera not being notified of the vehicle deletion, causing it to try and render from an unusable context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-openlocoA problem or bug in OpenLoco (but not vanilla)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions