Cube  Diff

Differences From Artifact [2e4de9f255]:

To Artifact [81ddf6dcb5]:


1
2
3
4
5
6
7
8
9
10

11
12
13
14
15
16
17
1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
17









-
+







// weapon.cpp: all shooting and effects code

#include "cube.h"

#import "DynamicEntity.h"
#import "OFString+Cube.h"
#import "Projectile.h"

static const int MONSTERDAMAGEFACTOR = 4;
static const int SGRAYS = 20;
#define SGRAYS 20
static const float SGSPREAD = 2;
static OFVector3D sg[SGRAYS];

static const struct {
	short sound, attackdelay, damage, projspeed, part, kickamount;
	OFString *name;
} guns[NUMGUNS] = {
128
129
130
131
132
133
134
135

136
137
138
139
140
141
142
128
129
130
131
132
133
134

135
136
137
138
139
140
141
142







-
+







		if (intersect(player, &o, &worldpos))
			return [player name];
	}

	return nil;
}

static const size_t MAXPROJ = 100;
#define MAXPROJ 100
static Projectile *projs[MAXPROJ];

void
projreset()
{
	for (size_t i = 0; i < MAXPROJ; i++)
		projs[i].inuse = false;