VehicleSnap

by Zaflis

Smoothly snaps movement angle when driving cars or tanks.

Content
a month ago
0.13 - 2.0
244K
Transportation

b Crash when player teleported by another mod in on_player_created

5 years ago

On line 83 of control.lua, 1.16.2, VehicleSnap may crash if the player changed position before it has added it to its global.players. This is most likely to occur if the player is teleported by a mod in on_player_created, but before VehicleSnap has had its on_player_created event handler run. This has been reported with Ribbon World which does teleport new players (see https://forums.factorio.com/viewtopic.php?f=190&t=63617#p388393).

local pdata = global.players[event.player_index]
if pdata.driving then

Perhaps change to:

local pdata = global.players[event.player_index]
if pdata and pdata.driving then

5 years ago

Yeah, can you test if it works? Applied it to 0.16.3.

5 years ago

now it works, thnx!:)

5 years ago

Confirmed. Added to the list of compatible mods in Ribbon Maze :)

New response