added error print for SetThrusterPower in order to catch nil thruster references
This commit is contained in:
4
main.lua
4
main.lua
@@ -656,6 +656,10 @@ end
|
||||
|
||||
-- thruster is a thruster type, power is a vector from 0.0 to 1.0
|
||||
function SetThrusterPower(thruster, power)
|
||||
if thruster == nil then
|
||||
print("ERROR: SetThrusterPower called with nil thruster.")
|
||||
return
|
||||
end
|
||||
if thruster.type == "rotator" then
|
||||
thruster.power = power
|
||||
local actualPower = 0
|
||||
|
||||
Reference in New Issue
Block a user