Cube  Diff

Differences From Artifact [c14fa40d91]:

To Artifact [5796e07781]:


341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
		particle_trail(1, 500, from, to);
		break;
	}
}

void
hitpush(int target, int damage, DynamicEntity *d, DynamicEntity *at,
    OFVector3D &from, OFVector3D &to)
{
	hit(target, damage, d, at);
	vdist(dist, v, from, to);
	vmul(v, damage / dist / 50);
	vadd(d.vel, v);
}

void
raydamage(
    DynamicEntity *o, OFVector3D &from, OFVector3D &to, DynamicEntity *d, int i)
{
	if (o.state != CS_ALIVE)
		return;
	int qdam = guns[d.gunselect].damage;
	if (d.quadmillis)
		qdam *= 4;
	if (d.monsterstate)







|









|







341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
		particle_trail(1, 500, from, to);
		break;
	}
}

void
hitpush(int target, int damage, DynamicEntity *d, DynamicEntity *at,
    const OFVector3D &from, const OFVector3D &to)
{
	hit(target, damage, d, at);
	vdist(dist, v, from, to);
	vmul(v, damage / dist / 50);
	vadd(d.vel, v);
}

void
raydamage(
    DynamicEntity *o, const OFVector3D &from, const OFVector3D &to, DynamicEntity *d, int i)
{
	if (o.state != CS_ALIVE)
		return;
	int qdam = guns[d.gunselect].damage;
	if (d.quadmillis)
		qdam *= 4;
	if (d.monsterstate)
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
		    (int)(from.y * DMF), (int)(from.z * DMF), (int)(to.x * DMF),
		    (int)(to.y * DMF), (int)(to.z * DMF));
	d.gunwait = guns[d.gunselect].attackdelay;

	if (guns[d.gunselect].projspeed)
		return;

	size_t i = 0;
	for (id player in players) {
		if (player != [OFNull null])
			raydamage(player, from, to, d, i);
		i++;
	}

	for (DynamicEntity *monster in getmonsters())
		if (monster != d)
			raydamage(monster, from, to, d, -2);

	if (d.monsterstate)
		raydamage(player1, from, to, d, -1);
}







|
<


<
|








420
421
422
423
424
425
426
427

428
429

430
431
432
433
434
435
436
437
438
		    (int)(from.y * DMF), (int)(from.z * DMF), (int)(to.x * DMF),
		    (int)(to.y * DMF), (int)(to.z * DMF));
	d.gunwait = guns[d.gunselect].attackdelay;

	if (guns[d.gunselect].projspeed)
		return;

	[players enumerateObjectsUsingBlock:^(id player, size_t i, bool *stop) {

		if (player != [OFNull null])
			raydamage(player, from, to, d, i);

	}];

	for (DynamicEntity *monster in getmonsters())
		if (monster != d)
			raydamage(monster, from, to, d, -2);

	if (d.monsterstate)
		raydamage(player1, from, to, d, -1);
}