acemod / ACE3

Open-source realism mod for Arma 3
https://ace3.acemod.org
Other
995 stars 735 forks source link

Fuel nozzle remains when removing vehicle #3327

Closed bux closed 8 years ago

bux commented 8 years ago

ACE3 3.4.2 Stable

Mods:

Description:

image

image

Steps to reproduce:

Where did the issue occur?

RPT log file: https://gist.github.com/bux578/a91760d1ef6e09c3b345

bux commented 8 years ago

Tagging @GitHawk

GitHawk commented 8 years ago

I can use the PFH players get while carrying the nozzle, but there are still loop holes.

If the player interacting with the fuel truck disconnects, no one else is running that PFH. So the Zeus can delete the vehicle and the nozzle will remain.

Anyone having a better idea? I'd love to have a pre-delete event, in which I could call fnc_reset on the fuel truck.

nicolasbadano commented 8 years ago

If the player interacting with the fuel truck disconnects

On the server:

addMissionEventHandler ["HandleDisconnect", {
    params ["_disconnectedPlayer"];
    // If the player was refuelling, cleanup
}];

Of course you'd need to set some public variables on the refuelling unit indicating to the server what should be cleanedup.

Various ACE modules do exactly this, like captives, dragging, etc

Anyone having a better idea? I'd love to have a pre-delete event,

Nah, I don't think we can do that reliably.