Make the boat immortal and turn better on laggy server

master
PilzAdam 2012-12-09 20:56:39 +01:00
parent 8dc5a68ebf
commit ea548b0cf6
1 changed files with 3 additions and 2 deletions

View File

@ -56,6 +56,7 @@ function boat:on_rightclick(clicker)
end
function boat:on_activate(staticdata, dtime_s)
self.object:set_armor_groups({immortal=1})
if staticdata then
self.v = tonumber(staticdata)
end
@ -83,10 +84,10 @@ function boat:on_step(dtime)
self.v = self.v-0.08
end
if ctrl.left then
self.object:setyaw(self.object:getyaw()+math.pi/120)
self.object:setyaw(self.object:getyaw()+math.pi/120+dtime*math.pi/120)
end
if ctrl.right then
self.object:setyaw(self.object:getyaw()-math.pi/120)
self.object:setyaw(self.object:getyaw()-math.pi/120-dtime*math.pi/120)
end
end
local s = get_sign(self.v)