2019-09-19 22:42:45 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
|
|
Copyright (C) 2019 Nuke.YKT
|
|
|
|
|
|
|
|
This file is part of NBlood.
|
|
|
|
|
|
|
|
NBlood is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License version 2
|
|
|
|
as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
#pragma once
|
2019-09-22 06:39:22 +00:00
|
|
|
|
|
|
|
BEGIN_BLD_NS
|
|
|
|
|
2019-09-19 22:42:45 +00:00
|
|
|
// By NoOne: renamed dude struct
|
|
|
|
struct DUDEINFO {
|
2021-12-29 19:45:55 +00:00
|
|
|
int16_t seqStartID; // seq
|
|
|
|
int16_t startHealth; // health
|
|
|
|
uint16_t mass; // mass
|
|
|
|
int at6; // unused?
|
|
|
|
uint8_t clipdist; // clipdist
|
|
|
|
int eyeHeight;
|
|
|
|
int aimHeight; // used by just Cerberus
|
|
|
|
int hearDist; // hear radius
|
|
|
|
int seeDist; // sight radius
|
|
|
|
int periphery; // periphery
|
|
|
|
int meleeDist; // unused?
|
|
|
|
int fleeHealth; // at which hp level enemy will turn in burning dude
|
|
|
|
int hinderDamage; // recoil damage
|
|
|
|
int changeTarget; // chance to change target when attacked someone else
|
|
|
|
int changeTargetKin; // chance to change target when attacked by same type
|
|
|
|
int alertChance;
|
|
|
|
uint8_t lockOut; // indicates if this dude can trigger something via trigger flags
|
|
|
|
int frontSpeed; // acceleration
|
|
|
|
int sideSpeed; // dodge
|
|
|
|
int backSpeed; // backward speed (unused)
|
|
|
|
int angSpeed; // turn speed
|
|
|
|
int nGibType[3]; // which gib used when explode dude
|
|
|
|
int startDamage[7]; // start damage shift
|
|
|
|
int damageVal[7]; // real damage? Hmm?
|
|
|
|
int at8c; // unused ?
|
|
|
|
int at90; // unused ?
|
2022-09-16 21:04:46 +00:00
|
|
|
|
|
|
|
// converters to floating point format
|
2022-09-28 10:32:28 +00:00
|
|
|
inline double HearDist() const
|
2022-09-16 21:04:46 +00:00
|
|
|
{
|
|
|
|
return hearDist * maptoworld;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline double SeeDist() const
|
|
|
|
{
|
|
|
|
return seeDist * maptoworld;
|
|
|
|
}
|
|
|
|
|
2022-09-26 22:44:51 +00:00
|
|
|
inline double MeleeDist() const
|
|
|
|
{
|
|
|
|
return meleeDist * maptoworld;
|
|
|
|
}
|
|
|
|
|
2022-09-25 17:32:14 +00:00
|
|
|
inline DAngle Periphery() const
|
2022-09-25 13:34:29 +00:00
|
|
|
{
|
2022-09-25 17:32:14 +00:00
|
|
|
return mapangle(periphery);
|
2022-09-25 13:34:29 +00:00
|
|
|
}
|
|
|
|
|
2022-09-25 17:32:14 +00:00
|
|
|
inline double FrontSpeed() const
|
2022-09-16 21:04:46 +00:00
|
|
|
{
|
2022-09-25 17:32:14 +00:00
|
|
|
return FixedToFloat(frontSpeed);
|
2022-09-16 21:04:46 +00:00
|
|
|
}
|
2022-09-26 22:20:44 +00:00
|
|
|
|
|
|
|
inline DAngle TurnRange() const
|
|
|
|
{
|
|
|
|
return DAngle::fromQ16(angSpeed << 3);
|
|
|
|
}
|
2022-10-04 17:18:09 +00:00
|
|
|
|
|
|
|
double fClipdist() const { return clipdist * 0.25; }
|
|
|
|
|
2019-09-19 22:42:45 +00:00
|
|
|
};
|
|
|
|
|
2021-12-29 19:45:55 +00:00
|
|
|
extern DUDEINFO dudeInfo[kDudeMax - kDudeBase];
|
2019-09-22 06:39:22 +00:00
|
|
|
extern DUDEINFO gPlayerTemplate[4];
|
2020-02-05 21:17:05 +00:00
|
|
|
extern DUDEINFO fakeDudeInfo;
|
|
|
|
|
2021-12-29 19:45:55 +00:00
|
|
|
inline DUDEINFO* getDudeInfo(int const nType)
|
2020-02-05 21:17:05 +00:00
|
|
|
{
|
2021-12-29 19:45:55 +00:00
|
|
|
if (nType >= kDudeBase && nType < kDudeMax)
|
|
|
|
return &dudeInfo[nType - kDudeBase];
|
|
|
|
return &fakeDudeInfo;
|
2020-02-05 21:17:05 +00:00
|
|
|
}
|
2019-09-22 06:39:22 +00:00
|
|
|
|
|
|
|
END_BLD_NS
|