[1.1.72] If 2 car entities are on top of each other the player can't get out

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
Post Reply
User avatar
Muppet9010
Filter Inserter
Filter Inserter
Posts: 278
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

[1.1.72] If 2 car entities are on top of each other the player can't get out

Post by Muppet9010 »

When 2 cars are created on top of each other and the player is driving one of them things go a bit odd when trying to leave. I appreciate this is an odd situation, but encountered when modding and swapping a vehicle a player was in for another one and wanting to eject the player during this process.


If the player tries to leave the car by pressing "enter" they are unable too. Effectively stuck inside their vehicle. Same if you use a script to set the player to not be driving.

Code: Select all

/sc
local character = game.player.character
local surface = character.surface
local carPosition = {10,10}
local car1 = surface.create_entity({ name = "car", position = carPosition, force = character.force, create_build_effect_smoke = false, raise_built = true })
car1.set_driver(character)
--[[ Without car2 this places the player normally --]]
local car2 = surface.create_entity({ name = "car", position = carPosition, force = character.force, create_build_effect_smoke = false, raise_built = true })
game.player.driving = false

If you kick the player out via script from the car by setting the driver to nil the player is placed inside the collision box of the car.

Code: Select all

/sc
local character = game.player.character
local surface = character.surface
local carPosition = {10,10}
local car1 = surface.create_entity({ name = "car", position = carPosition, force = character.force, create_build_effect_smoke = false, raise_built = true })
car1.set_driver(character)
--[[ Without car2 this places the player normally --]]
local car2 = surface.create_entity({ name = "car", position = carPosition, force = character.force, create_build_effect_smoke = false, raise_built = true })
car1.set_driver(nil)
Last edited by Muppet9010 on Fri Nov 18, 2022 7:33 pm, edited 2 times in total.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.72] If 2 car entities are on top of each other all sorts of odd things happen

Post by Rseding91 »

Thanks for the report however this is "working correctly" The issue is when leaving or entering a vehicle the player is not allowed to teleport over other entities. Because there are two cars directly on top of each other the player collides with the car it isn't in and as a result there's a colliding entity in all directions from the vehicle. The same will happen if you teleport the car directly on top of something like a rocket silo or assembling machine.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Minor issues”