1
2
3
4
5
6
7
8
9
10
11
12
|
// weapon.cpp: all shooting and effects code
#include "cube.h"
#import "DynamicEntity.h"
#import "Projectile.h"
static const int MONSTERDAMAGEFACTOR = 4;
static const int SGRAYS = 20;
static const float SGSPREAD = 2;
static OFVector3D sg[SGRAYS];
|
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// 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;
static const float SGSPREAD = 2;
static OFVector3D sg[SGRAYS];
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
{
return guns[gun].attackdelay;
}
void
weapon(OFString *a1, OFString *a2, OFString *a3)
{
selectgun((a1.length > 0 ? a1.intValue : -1),
(a2.length > 0 ? a2.intValue : -1),
(a3.length > 0 ? a3.intValue : -1));
}
COMMAND(weapon, ARG_3STR)
void
createrays(OFVector3D &from,
OFVector3D &to) // create random spread of rays for the shotgun
{
|
|
|
|
|
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
{
return guns[gun].attackdelay;
}
void
weapon(OFString *a1, OFString *a2, OFString *a3)
{
selectgun((a1.length > 0 ? a1.cube_intValue : -1),
(a2.length > 0 ? a2.cube_intValue : -1),
(a3.length > 0 ? a3.cube_intValue : -1));
}
COMMAND(weapon, ARG_3STR)
void
createrays(OFVector3D &from,
OFVector3D &to) // create random spread of rays for the shotgun
{
|