22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#define NUMMONSTERTYPES 8
struct monstertype // see docs for how these values modify behaviour
{
short gun, speed, health, freq, lag, rate, pain, loyalty, mscale,
bscale;
short painsound, diesound;
char *name, *mdlname;
}
monstertypes[NUMMONSTERTYPES] = {
{GUN_FIREBALL, 15, 100, 3, 0, 100, 800, 1, 10, 10, S_PAINO, S_DIE1,
"an ogre", "monster/ogro"},
{GUN_CG, 18, 70, 2, 70, 10, 400, 2, 8, 9, S_PAINR, S_DEATHR, "a rhino",
"monster/rhino"},
{GUN_SG, 14, 120, 1, 100, 300, 400, 4, 14, 14, S_PAINE, S_DEATHE,
"ratamahatta", "monster/rat"},
{GUN_RIFLE, 15, 200, 1, 80, 300, 300, 4, 18, 18, S_PAINS, S_DEATHS,
"a slith", "monster/slith"},
{GUN_RL, 13, 500, 1, 0, 100, 200, 6, 24, 24, S_PAINB, S_DEATHB, "bauul",
"monster/bauul"},
{GUN_BITE, 22, 50, 3, 0, 100, 400, 1, 12, 15, S_PAINP, S_PIGGR2,
"a hellpig", "monster/hellpig"},
{GUN_ICEBALL, 12, 250, 1, 0, 10, 400, 6, 18, 18, S_PAINH, S_DEATHH,
"a knight", "monster/knight"},
{GUN_SLIMEBALL, 15, 100, 1, 0, 200, 400, 2, 13, 10, S_PAIND, S_DEATHD,
"a goblin", "monster/goblin"},
};
dynent *
basicmonster(int type, int yaw, int state, int trigger, int move)
{
if (type >= NUMMONSTERTYPES) {
conoutf(@"warning: unknown monster in spawn: %d", type);
type = 0;
};
dynent *m = newdynent();
monstertype *t = &monstertypes[m->mtype = type];
m->eyeheight = 2.0f;
m->aboveeye = 1.9f;
m->radius *= t->bscale / 10.0f;
m->eyeheight *= t->bscale / 10.0f;
m->aboveeye *= t->bscale / 10.0f;
|
|
|
|
|
|
|
|
|
|
|
|
<
>
|
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#define NUMMONSTERTYPES 8
struct monstertype // see docs for how these values modify behaviour
{
short gun, speed, health, freq, lag, rate, pain, loyalty, mscale,
bscale;
short painsound, diesound;
OFConstantString *name, *mdlname;
}
monstertypes[NUMMONSTERTYPES] = {
{GUN_FIREBALL, 15, 100, 3, 0, 100, 800, 1, 10, 10, S_PAINO, S_DIE1,
@"an ogre", @"monster/ogro"},
{GUN_CG, 18, 70, 2, 70, 10, 400, 2, 8, 9, S_PAINR, S_DEATHR, @"a rhino",
@"monster/rhino"},
{GUN_SG, 14, 120, 1, 100, 300, 400, 4, 14, 14, S_PAINE, S_DEATHE,
@"ratamahatta", @"monster/rat"},
{GUN_RIFLE, 15, 200, 1, 80, 300, 300, 4, 18, 18, S_PAINS, S_DEATHS,
@"a slith", @"monster/slith"},
{GUN_RL, 13, 500, 1, 0, 100, 200, 6, 24, 24, S_PAINB, S_DEATHB, @"bauul",
@"monster/bauul"},
{GUN_BITE, 22, 50, 3, 0, 100, 400, 1, 12, 15, S_PAINP, S_PIGGR2,
@"a hellpig", @"monster/hellpig"},
{GUN_ICEBALL, 12, 250, 1, 0, 10, 400, 6, 18, 18, S_PAINH, S_DEATHH,
@"a knight", @"monster/knight"},
{GUN_SLIMEBALL, 15, 100, 1, 0, 200, 400, 2, 13, 10, S_PAIND, S_DEATHD,
@"a goblin", @"monster/goblin"},
};
dynent *
basicmonster(int type, int yaw, int state, int trigger, int move)
{
if (type >= NUMMONSTERTYPES) {
conoutf(@"warning: unknown monster in spawn: %d", type);
type = 0;
}
dynent *m = newdynent();
monstertype *t = &monstertypes[m->mtype = type];
m->eyeheight = 2.0f;
m->aboveeye = 1.9f;
m->radius *= t->bscale / 10.0f;
m->eyeheight *= t->bscale / 10.0f;
m->aboveeye *= t->bscale / 10.0f;
|