Differences From
Artifact [5fb5b13994]:
324 324 local cap = sorcery.ley.netcaps(pos,delta)
325 325 local jc = (constants.portal_jump_cost_local*delta)
326 326 if not user.dest and cap.freepower >= jc then
327 327 user.dest = portal_pick_destination(dev,crc,partner)
328 328 sorcery.lib.node.preload(user.dest, u.object)
329 329 end
330 330 if not user.dest then goto skippad end
331 - local fac = (user.time / constants.portal_jump_time);
331 + local fac = math.min(1,(user.time / constants.portal_jump_time))
332 332 minetest.add_particlespawner {
333 333 time = 1, amount = 100 + (fac * 200);
334 334 minsize = 0.2 + fac*0.7, maxsize = 0.4 + fac*0.9;
335 335 minvel = {y = 0.2, x=0,z=0}, maxvel = {y = 0.5, x=0,z=0};
336 336 minacc = {y = 0.0, x=0,z=0}, maxacc = {y = 0.3, x=0,z=0};
337 337 minpos = vector.add(n.pad,{x = -0.5, y = 0.5, z = -0.5});
338 338 maxpos = vector.add(n.pad,{x = 0.5, y = 0.5, z = 0.5});
................................................................................
362 362 attached = u.object;
363 363 animation = {
364 364 type = 'vertical_frames', length = 2.1;
365 365 aspect_w = 16, aspect_h = 16;
366 366 };
367 367 }
368 368 end
369 - if user.time >= constants.portal_jump_time then
369 + -- hack to try and swat an unkillable fucking impossibug
370 + if user.time > constants.portal_jump_time * 2 then
371 + user.time = 0
372 + elseif user.time >= constants.portal_jump_time then
370 373 local dd = portal_disposition(portal_composition(user.dest))
371 374 if #dd.freepads > 0 then
372 375 local destpad = dd.freepads[math.random(#dd.freepads)].pad
373 376 local rng = function(min,max)
374 377 return (math.random() * (max - min)) + min
375 378 end
376 379 local oldpos = u.object:get_pos()
................................................................................
392 395 glow = 14;
393 396 animation = {
394 397 type = 'vertical_frames', length = life + 0.1;
395 398 aspect_w = 16, aspect_h = 16;
396 399 };
397 400 }
398 401 end
399 - u.object:set_pos(vector.add(destpad, {y=0.5,z=0,x=0}))
400 402 user.dest = nil
401 - portal_context[pname] = nil
403 + user.time = 0
404 + portal_context.users[pname] = nil
405 + u.object:set_pos(vector.add(destpad, {y=0.5,z=0,x=0}))
402 406 end
403 407 else
404 408 user.time = user.time + delta
405 409 end
406 410
407 411 break
408 412 end