@@ -327,9 +327,9 @@ user.dest = portal_pick_destination(dev,crc,partner) sorcery.lib.node.preload(user.dest, u.object) end if not user.dest then goto skippad end - local fac = (user.time / constants.portal_jump_time); + local fac = math.min(1,(user.time / constants.portal_jump_time)) minetest.add_particlespawner { time = 1, amount = 100 + (fac * 200); minsize = 0.2 + fac*0.7, maxsize = 0.4 + fac*0.9; minvel = {y = 0.2, x=0,z=0}, maxvel = {y = 0.5, x=0,z=0}; @@ -365,9 +365,12 @@ aspect_w = 16, aspect_h = 16; }; } end - if user.time >= constants.portal_jump_time then + -- hack to try and swat an unkillable fucking impossibug + if user.time > constants.portal_jump_time * 2 then + user.time = 0 + elseif user.time >= constants.portal_jump_time then local dd = portal_disposition(portal_composition(user.dest)) if #dd.freepads > 0 then local destpad = dd.freepads[math.random(#dd.freepads)].pad local rng = function(min,max) @@ -395,11 +398,12 @@ aspect_w = 16, aspect_h = 16; }; } end - u.object:set_pos(vector.add(destpad, {y=0.5,z=0,x=0})) user.dest = nil - portal_context[pname] = nil + user.time = 0 + portal_context.users[pname] = nil + u.object:set_pos(vector.add(destpad, {y=0.5,z=0,x=0})) end else user.time = user.time + delta end