sorcery  Diff

Differences From Artifact [5fb5b13994]:

To Artifact [78ebe4acb9]:


324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
...
362
363
364
365
366
367
368



369
370
371
372
373
374
375
376
...
392
393
394
395
396
397
398
399
400

401

402
403
404
405
406
407
408
					local cap = sorcery.ley.netcaps(pos,delta)
					local jc = (constants.portal_jump_cost_local*delta)
					if not user.dest and cap.freepower >= jc  then
						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);
					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};
						minacc = {y = 0.0, x=0,z=0}, maxacc = {y = 0.3, x=0,z=0};
						minpos = vector.add(n.pad,{x = -0.5, y = 0.5, z = -0.5});
						maxpos = vector.add(n.pad,{x =  0.5, y = 0.5, z =  0.5});
................................................................................
							attached = u.object;
							animation = {
								type = 'vertical_frames', length = 2.1;
								aspect_w = 16, aspect_h = 16;
							};
						}
					end



					if 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)
								return (math.random() * (max - min)) + min
							end
							local oldpos = u.object:get_pos()
................................................................................
									glow = 14;
									animation = {
										type = 'vertical_frames', length = life + 0.1;
										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

						end
					else
						user.time = user.time + delta
					end

					break
				end







|







 







>
>
>
|







 







<

>
|
>







324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
...
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
...
395
396
397
398
399
400
401

402
403
404
405
406
407
408
409
410
411
412
					local cap = sorcery.ley.netcaps(pos,delta)
					local jc = (constants.portal_jump_cost_local*delta)
					if not user.dest and cap.freepower >= jc  then
						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 = 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};
						minacc = {y = 0.0, x=0,z=0}, maxacc = {y = 0.3, x=0,z=0};
						minpos = vector.add(n.pad,{x = -0.5, y = 0.5, z = -0.5});
						maxpos = vector.add(n.pad,{x =  0.5, y = 0.5, z =  0.5});
................................................................................
							attached = u.object;
							animation = {
								type = 'vertical_frames', length = 2.1;
								aspect_w = 16, aspect_h = 16;
							};
						}
					end
					-- 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)
								return (math.random() * (max - min)) + min
							end
							local oldpos = u.object:get_pos()
................................................................................
									glow = 14;
									animation = {
										type = 'vertical_frames', length = life + 0.1;
										aspect_w = 16, aspect_h = 16;
									};
								}
							end

							user.dest = 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

					break
				end