remoteControl is very problematic.
- There is no getter for it, I'd like to request a getter commands to avoid using dirty hacks. Suggested syntax:
getRemoteControlling ENTITY - return a unit or null that provided unit controls
getRemoteControlled ENTITY - return a unit that controls provided unit
Alternative names to be more readable:
getRemoteControlBy - return unit who controls provided unit
getRemoteControlUnit - return remote controlled unit for provided unit
- If remote controlled unit is deleted, remote controlling is forever stuck. Repro code for the issue:
unit = group player createUnit [typeOf player, getPos player, [], 0, ""]; player remoteControl unit; deleteVehicle unit;
Its impossible to get back control for the unit from this point, objNull remoteControl player, player remoteControl objNull, player remoteControl player, player switchCamera "INTERNAL", selectPlayer player, selectPlayer to another unit and back, nothing helps.
- Apparently command is unable to stop remote control if right operand is null. player remoteControl objNull should remove remote control from left operand and disconnect remote control from right operand if there is any.