Helicopters

by kumpu

Adds a fully animated attack helicopter to the game. Ideal for getting from A to B quickly, exploring the map, building islands and nuking biters from the sky. Now 84% less buggier!

Content
5 years ago
0.15 - 0.17
340
Transportation

g Crash in mulitplayer

Great mod! I have a save breaking crash when a player desyncs in a copter.

Symptom: player is cruising around and looses control (copter flies straight at full speed, can't open gui, can't open player inventory etc). Trying to load the server auto-save crashes with this when any player joins (not just the de-synced pilot):

Error MainLoop.cpp:1166: Exception at tick 23292276: The mod Helicopters caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Helicopters::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
Helicopters/logic/heliBase.lua:991: in function 'updateEntityPositions'
Helicopters/logic/heliBase.lua:262: in function 'OnTick'
Helicopters/logic/util.lua:99: in function 'checkAndTickInGlobal'
Helicopters/control.lua:102: in function <Helicopters/control.lua:101>
stack traceback:
[C]: in function 'index'
__Helicopters
/logic/heliBase.lua:991: in function 'updateEntityPositions'
Helicopters/logic/heliBase.lua:262: in function 'OnTick'
Helicopters/logic/util.lua:99: in function 'checkAndTickInGlobal'
Helicopters/control.lua:102: in function <Helicopters/control.lua:101
65.874 Error ServerMultiplayerManager.cpp:92: MultiplayerManager failed: "The mod Helicopters caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Helicopters::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
Helicopters/logic/heliBase.lua:991: in function 'updateEntityPositions'
Helicopters/logic/heliBase.lua:262: in function 'OnTick'
Helicopters/logic/util.lua:99: in function 'checkAndTickInGlobal'
Helicopters/control.lua:102: in function <Helicopters/control.lua:101>
stack traceback:
[C]: in function 'index'
__Helicopters
/logic/heliBase.lua:991: in function 'updateEntityPositions'
Helicopters/logic/heliBase.lua:262: in function 'OnTick'
Helicopters/logic/util.lua:99: in function 'checkAndTickInGlobal'
Helicopters/control.lua:102: in function <Helicopters/control.lua:101>
65.874 Info ServerMultiplayerManager.cpp:769: updateTick(23292276) changing state from(InGame) to(Failed)
65.884 Quitting: multiplayer error.
67.081 Info ServerMultiplayerManager.cpp:138: Quitting multiplayer connection.
67.081 Info ServerMultiplayerManager.cpp:769: updateTick(4294967295) changing state from(Failed) to(Closed)
67.235 Info UDPSocket.cpp:210: Closing socket
67.235 Info UDPSocket.cpp:240: Socket closed
67.237 Goodbye

5 years ago

add if entity.valid then above line 991 and end after then see what happens

5 years ago

https://i.imgur.com/YYou2lA.png
Like this? or should it be
Line 991: if entity.valid then
Line 992: end

5 years ago

ok just use:
if self.childs.collisionEnt then
if self.childs.collisionEnt.valid then <-- insert after first if
...
end <-- insert before first end
end

5 years ago

Interestingly enough, this seemed to fix the problem when I was remote controlling the helicopters (after they take off, game threw the same error as aoakeley mentioned):

https://i.imgur.com/VuR2xXi.png

I wonder if it'd fix the desync though, haven't really had an opportunity to know if it does or not yet.

New response