Cube  Diff

Differences From Artifact [5796e07781]:

To Artifact [ec6a711714]:


144
145
146
147
148
149
150
151

152
153

154
155
156
157
158
159
160
161
144
145
146
147
148
149
150

151


152

153
154
155
156
157
158
159







-
+
-
-
+
-







void
newprojectile(OFVector3D &from, OFVector3D &to, float speed, bool local,
    DynamicEntity *owner, int gun)
{
	for (size_t i = 0; i < MAXPROJ; i++) {
		Projectile *p = projs[i];

		if (p == nil) {
		if (p == nil)
			p = [[Projectile alloc] init];
			projs[i] = p;
			projs[i] = p = [Projectile projectile];
		}

		if (p.inuse)
			continue;

		p.inuse = true;
		p.o = from;
		p.to = to;
350
351
352
353
354
355
356
357
358


359
360
361
362
363
364
365
348
349
350
351
352
353
354


355
356
357
358
359
360
361
362
363







-
-
+
+







	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)
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)