diff --git a/automobiles_lib/entities.lua b/automobiles_lib/entities.lua index 660c6ae..963b005 100644 --- a/automobiles_lib/entities.lua +++ b/automobiles_lib/entities.lua @@ -3,21 +3,21 @@ initial_properties = { physical = false, collide_with_objects=false, pointable=false, - visual = "sprite", + visual = "mesh", + mesh = "automobiles_pivot_mesh.b3d", textures = {"automobiles_alpha.png",}, - use_texture_alpha = true, }, - + on_activate = function(self,std) self.sdata = minetest.deserialize(std) or {} if self.sdata.remove then self.object:remove() end end, - + get_staticdata=function(self) self.sdata.remove=true return minetest.serialize(self.sdata) end, - + }) minetest.register_entity('automobiles_lib:pointer',{ @@ -746,7 +746,5 @@ function automobiles_lib.on_step(self, dtime) self.object:set_rotation({x=newpitch,y=newyaw,z=newroll}) - --saves last velocity for collision detection (abrupt stop) - self.lastvelocity = self.object:get_velocity() self._longit_speed = longit_speed end diff --git a/automobiles_lib/physics_lib.lua b/automobiles_lib/physics_lib.lua index 4b4bf60..abc1ad8 100755 --- a/automobiles_lib/physics_lib.lua +++ b/automobiles_lib/physics_lib.lua @@ -147,7 +147,7 @@ function automobiles_lib.get_box_height(self) end function automobiles_lib.stepfunc(self,dtime,colinfo) - self.dtime = min(dtime,0.2) + self.dtime = math.min(dtime,0.2) self.colinfo = colinfo self.height = automobiles_lib.get_box_height(self) @@ -167,9 +167,7 @@ function automobiles_lib.stepfunc(self,dtime,colinfo) self:physics() if self.logic then - if self.view_range then self:sensefunc() end self:logic() - execute_queues(self) end self.lastvelocity = self.object:get_velocity()