[0.16.16] Player death on vehicle swap
Posted: Tue Jan 16, 2018 1:42 am
Creating a vehicle on top of a player is fine.
Calling .destroy() on a vehicle with a player inside is fine.
Creating a vehicle on top of a vehicle and calling .destroy() is fine.
Creating a vehicle on top of a vehicle with a player inside and calling .destroy() kills the player.
Also, if you try to move the driver/passenger into the vehicle that is not being destroyed the player still dies, even though it shouldn't be in that vehicle anymore:
Calling .destroy() on a vehicle with a player inside is fine.
Creating a vehicle on top of a vehicle and calling .destroy() is fine.
Creating a vehicle on top of a vehicle with a player inside and calling .destroy() kills the player.
Code: Select all
/c p = game.player s = p.surface v1 = s.create_entity{name="car", position=p.position, force=p.force} v1.set_driver(p) v2 = s.create_entity{name="car", position=p.position, force=p.force} v1.destroy()
Code: Select all
/c p = game.player s = p.surface v1 = s.create_entity{name="car", position=p.position, force=p.force} v1.set_driver(p) v2 = s.create_entity{name="car", position=p.position, force=p.force} v2.set_driver(p) v1.destroy()