Pirates fuel problem

Post Reply
Posts: 10
Joined: Sat May 31, 2014 2:12 pm

Pirates fuel problem

Post by bmaxa » Sat May 31, 2014 2:19 pm

I found out that pirates are stranded because they run out of fuel. So I made
changes to Pirates.lua and added :P

Code: Select all

local onShipFuelChanged = function (ship, fuelStatus)
--      if ship:IsPlayer() then return end
        print(ship.label..' fuel status changed to '..fuelStatus)
and I got floating point exceptions.
Then fired gdb and found out that program gets exception in
function Ship::GetSpeedReachedWithFuel() because of negative log argument.
Problem i that SetFuel does not calls UpdateFuelStats() and that is problem
on refueling.
So I just mad call inside SetFuel and everything is fine ;)
Made pirates spawn closer relative to ship and make some police
spawn to chase pirates.
Game is fun1!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests