cancel current use action if pilot is removed (#1954)

install-platforms
Maikel de Vries 2017-11-17 09:22:48 +01:00
parent bc3d0bb29d
commit f6b15a9051
1 changed files with 3 additions and 0 deletions

View File

@ -1172,6 +1172,9 @@ public func PlaneDismount(object clonk)
clonk->StopAnimation(clonk->GetRootAnimation(15));
DetachMesh(clonkmesh);
clonkmesh = nil;
// Ensure the current use is cancelled.
if (clonk == pilot)
ContainedUseCancel(pilot, 0, 0);
pilot = nil;
CancelFlight();
return true;