When mortar operator dies, his name & supply status remain visible above mortar until it gets destroyed a few seconds later

Issue #360 resolved
Matt Hands created an issue

No description provided.

Comments (1)

  1. Matt Hands reporter

    Fixed in commit c0e6ade.

    VehicleBase.PlayerReplicationInfo is hacked to WeaponPawn's PlayerReplicationInfo when player enters. Gets reset when player exits, but not when player dies (KDriverLeave() is not called when player dies). Easy to fix by resetting in DriverDies(), which is the equivalent of KDLeave() when player dies,

    But ..... I think hacking the PRI this is some old/unimplemented/unnecessary functionality. I don't see if being used anywhere. So have removed it. Easy to reverse if there is any problem or downside, & reset in DriverDied().

    In doing this, it's also apparent that DriverDied() is a reliable way of initiating the timed (5 second) auto-desctruction of the mortar when the player dies. Currently it's called from DHPawn's Died() function, which requires OwnedMortar to be recorded by the DHPawn, itself requiring other stuff in mortar classes.

    So have simplified by removing all that and just having DriverDied() send the mortar to state PendingDestruction. SetMortarOwner() has become redundant & removed, with KDriverEnter() cancelling any pending destruction if another mortar operator enters during the 5 second countdown.

  2. Log in to comment