1 //-------------------------------------------------------------------------
2 /*
3 Copyright (C) 2010-2019 EDuke32 developers and contributors
4 Copyright (C) 2019 Nuke.YKT
5 
6 This file is part of NBlood.
7 
8 NBlood is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License version 2
10 as published by the Free Software Foundation.
11 
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 
16 See the GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 */
22 //-------------------------------------------------------------------------
23 #pragma once
24 #include "blood.h"
25 struct DUDEINFO {
26     short seqStartID; // seq
27     short startHealth; // health
28     unsigned short mass; // mass
29     int at6; // unused?
30     unsigned char clipdist; // clipdist
31     int eyeHeight;
32     int aimHeight; // used by just Cerberus
33     int hearDist; // hear radius
34     int seeDist; // sight radius
35     int periphery; // periphery
36     int meleeDist; // unused?
37     int fleeHealth; // at which hp level enemy will turn in burning dude
38     int hinderDamage; // recoil damage
39     int changeTarget; // chance to change target when attacked someone else
40     int changeTargetKin; // chance to change target when attacked by same type
41     int alertChance;
42     char lockOut; // indicates if this dude can trigger something via trigger flags
43     int frontSpeed; // acceleration
44     int sideSpeed; // dodge
45     int backSpeed; // backward speed (unused)
46     int angSpeed; // turn speed
47     int nGibType[3]; // which gib used when explode dude
48     int startDamage[7]; // start damage shift
49     int at70[7]; // real damage? Hmm?
50     int at8c; // unused ?
51     int at90; // unused ?
52 };
53 
54 extern DUDEINFO dudeInfo[kDudeMax-kDudeBase];
55 extern DUDEINFO gPlayerTemplate[4];
56 extern DUDEINFO fakeDudeInfo;
57 
getDudeInfo(int const nType)58 inline DUDEINFO *getDudeInfo(int const nType)
59 {
60     if (nType >= kDudeBase && nType < kDudeMax)
61         return &dudeInfo[nType - kDudeBase];
62     return &fakeDudeInfo;
63 }
64