Page MenuHomeFeedback Tracker

[2.06.148221] Setting a vehicle's tow parent via setTowParent to itself leaves a "ghost" vehicle upon deletion
New, NormalPublic

Description

Title. While playing with BIS_fnc_unitPlay, I attempted to disable a vehicle's brakes by setting itself as its own tow parent, via the setTowParent command. Doing so didn't seem to work, which is understandable, but also had the interesting - and problematic - side effect of leaving a "ghost" vehicle behind.

These "ghost" vehicles will still show actions to get in, open inventory, etc at the last position where they were prior to deletion; opening the inventory shows its contents, but you cannot interact with anything inside, or deposit any items. Attempting to get into the vehicle is successful, however, immediately locking you in place and turning your screen black; this effectively softlocks your game, preventing you from using the "Get Out" or "Eject" actions (similar to being inside a vehicle with disabled simulation), though the moveOut command works correctly. Entering Curator works as intended, and will display your unit as the driver of a vehicle which shares a bounding box with the vehicle's last location prior to deletion. The vehicle cannot be added as a Curator-editable object, and in fact doesn't appear at all using allMissionObjects "", preventing it from ever being fully removed.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
10.0.19042 Build 19042
Category
Engine
Steps To Reproduce
  1. Place any vehicle and any playable unit in the editor.
  2. Observe the vehicle appears in the list of allMissionObjects ""
  3. Set the vehicle's tow parent to itself via cursorObject setTowParent cursorObject
  4. Delete the vehicle by any means, such as via Curator or deleteVehicle cursorObject
  5. Observe the vehicle no longer appears in allMissionObjects ""
  6. Go to where the vehicle used to be; all related actions still appear
Additional Information

Destroying a vehicle under the same conditions and then deleting the wreck will also cause the fire and smoke to linger instead of being deleted as normal. Additionally, there also seems to be a lingering performance impact to vehicles deleted in this state! As seen in the video below, 500 vehicles bring framerate down to an average of approximately 70, and deleting them all brings performance back up to an average of 120 FPS. However, setting the vehicle's tow parent to themselves and deleting them causes a return to only 100 FPS, approximately a 17% decrease.

Theoretically, nobody should actually be doing this anyways... but, y'know.

https://www.youtube.com/watch?v=G12LD9yAuRQ

DxDiag:

Event Timeline

zman6258 created this task.Nov 6 2021, 12:31 PM
dedmen added a subscriber: dedmen.EditedNov 6 2021, 3:20 PM
by setting itself as its own tow parent

Yeah just don't do that. Its useless and serves no purpose, and causes a bug. So just don't do it and all is well.
I'll add check to block that for 2.08 maybe