Skip to content

Unsubscribe all (gun-related) delegates properly #973

@toberge

Description

@toberge

This should fix most of the issues with weapon switching.

We need to refactor all unsubbing to happen in the same class as the subscription happens.
Look at the GunController delegates in particular.

So what we need to do

  • Ensure all GunController delegates have + and - in the same class as where the subscribed method is from
  • Refactor all GunBody/Barrel/Extension classes to have a dedicated subscribe/unsubscribe method? (imo they should all have been modifiers, then much of this would've been solved already...)
  • and ensure that ProjectileModifier.Detach() is actually called (!!!)
  • Find other occurences of this (oh joy)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrefactorThis shid's boutta get rewritten

    Type

    No type

    Projects

    Status

    Ideas

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions