wiremod / wire

Garry's Mod add-on that allows users to wire up components in order to make more elaborate automatic and user-controlled contraptions.
http://www.wiremod.com
Apache License 2.0
551 stars 331 forks source link

Pod Controller not accounting for :ejectPod() #3017

Open deltamolfar opened 5 months ago

deltamolfar commented 5 months ago

Describe the bug Controler Pod -> CP When ejecting a player from CP-linked vehicle using E2 :ejectPod() method, the "Active", "Driver" and other outputs of CP isn't being refreshed to represent the absence of a driver.

To Reproduce

  1. Spawn a vehicle, CP, and link them
  2. Place E2 with this code:
    event playerEnteredVehicle(Player:entity, Vehicle:entity) {
    Vehicle:ejectPod()
    }
  3. Press debug on Pod Controller, or get it outputs in any other way
  4. Sit in the vehicle, get ejected, look at outputs

Expected behavior The outputs should be reset in the same way as when you ejecting a driver using CP's eject input/when driver exits a vehicle himself

Screenshots image

deltamolfar commented 5 months ago

Checked the code for quick fix, never found it.

ENT:PlayerExited() is executing fine in terms the hook, and all if statements are as expected. The problematic part as far as I see is that WireLib.TriggerOutput have no effect. But as I'm unfamiliar with wiremo code base, it's hard for me to go further