[Raiguard] [2.0.15] Mod scripts interacting with remote view/driving can make a vehicle undrivable

Gorfiend7
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Jun 16, 2022 5:41 pm
Contact:

[Raiguard] [2.0.15] Mod scripts interacting with remote view/driving can make a vehicle undrivable

Post by Gorfiend7 »

If a mod script executes the following code (given appropriate tank1/tank2/player references):

Code: Select all

        player.set_controller({
            type = defines.controllers.remote,
            position = tank1.position,
            surface = tank1.surface,
        })
        tank1.set_driver(player)

        player.set_controller({
            type = defines.controllers.remote,
            position = tank2.position,
            surface = tank2.surface,
        })
        tank2.set_driver(player)

        player.set_controller({
            type = defines.controllers.remote,
            position = tank1.position,
            surface = tank1.surface,
        })
Then tank1 gets stuck in a state where it can't be driven. Selected in remote view, it will show the green "Drive Remotely" button, but clicking it fails and pops up the "Vehicle already has a driver" message. Entering the tank physically is possible, but it can't be driven.
Xuplus
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Jan 06, 2024 12:31 pm
Contact:

Re: [2.0.15] Mod scripts interacting with remote view/driving can make a vehicle undrivable

Post by Xuplus »

I got this by simply having a tank get destroyed by bitters, a ghost of the tank appears in its location, then letting the logistic network build another one. The tank built by the bots behaves that way, I can't drive remotely and in person it won't move
Post Reply

Return to “Assigned”