mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 10:20:26 +01:00
496 lines
20 KiB
C++
496 lines
20 KiB
C++
/*
|
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
|
*/
|
|
|
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
|
|
#include "StdH.h"
|
|
#include "Models/Enemies/Werebull/Werebull.h"
|
|
|
|
#include <EntitiesMP/Werebull.h>
|
|
#include <EntitiesMP/Werebull_tables.h>
|
|
#line 17 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
|
|
// info structure
|
|
static EntityInfo eiWerebull = {
|
|
EIBT_FLESH, 500.0f,
|
|
0.0f, 3.0f, 0.0f, // source (eyes)
|
|
0.0f, 1.5f, 0.0f, // target (body)
|
|
};
|
|
|
|
#define HIT_DISTANCE 5.0f
|
|
|
|
void CWerebull::SetDefaultProperties(void) {
|
|
m_bRunAttack = FALSE ;
|
|
m_bHornHit = FALSE ;
|
|
m_penLastTouched = NULL;
|
|
m_soFeet.SetOwner(this);
|
|
m_soFeet.Stop_internal();
|
|
m_bRunSoundPlaying = FALSE ;
|
|
CEnemyRunInto::SetDefaultProperties();
|
|
}
|
|
CTString CWerebull::GetPlayerKillDescription(const CTString & strPlayerName,const EDeath & eDeath)
|
|
#line 58 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
{
|
|
#line 59 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
CTString str ;
|
|
#line 60 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
str . PrintF (TRANS ("Sirian werebull sent %s flying") , strPlayerName );
|
|
#line 61 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
return str ;
|
|
#line 62 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 64 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::Precache(void) {
|
|
#line 65 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
CEnemyBase :: Precache ();
|
|
#line 66 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
PrecacheSound (SOUND_IDLE );
|
|
#line 67 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
PrecacheSound (SOUND_SIGHT );
|
|
#line 68 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
PrecacheSound (SOUND_KICKHORN );
|
|
#line 69 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
PrecacheSound (SOUND_IMPACT );
|
|
#line 70 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
PrecacheSound (SOUND_DEATH );
|
|
#line 71 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
PrecacheSound (SOUND_RUN );
|
|
#line 72 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 75 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void * CWerebull::GetEntityInfo(void) {
|
|
#line 76 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
return & eiWerebull ;
|
|
#line 77 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 79 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
FLOAT CWerebull::GetCrushHealth(void)
|
|
#line 80 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
{
|
|
#line 81 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
return 60.0f;
|
|
#line 82 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
const CTFileName & CWerebull::GetComputerMessageName(void)const {
|
|
#line 85 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
static DECLARE_CTFILENAME (fnm , "Data\\Messages\\Enemies\\Bull.txt");
|
|
#line 86 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
return fnm ;
|
|
#line 87 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 90 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::RenderParticles(void)
|
|
#line 91 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
{
|
|
#line 92 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
Particles_RunningDust (this );
|
|
#line 93 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
CEnemyBase :: RenderParticles ();
|
|
#line 94 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 97 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::ReceiveDamage(CEntity * penInflictor,enum DamageType dmtType,
|
|
#line 98 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
FLOAT fDamageAmmount,const FLOAT3D & vHitPoint,const FLOAT3D & vDirection)
|
|
#line 99 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
{
|
|
#line 101 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
if(! IsOfClass (penInflictor , "Werebull")){
|
|
#line 102 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
CEnemyBase :: ReceiveDamage (penInflictor , dmtType , fDamageAmmount , vHitPoint , vDirection );
|
|
#line 103 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
#line 104 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 106 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::AdjustDifficulty(void)
|
|
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
{
|
|
#line 109 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 112 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
INDEX CWerebull::AnimForDeath(void) {
|
|
#line 113 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
INDEX iAnim ;
|
|
#line 114 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
if(en_vCurrentTranslationAbsolute . Length () > 5.0f){
|
|
#line 115 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
iAnim = WEREBULL_ANIM_DEATHRUN ;
|
|
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}else {
|
|
#line 117 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
iAnim = WEREBULL_ANIM_DEATH ;
|
|
#line 118 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
#line 119 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
StartModelAnim (iAnim , 0);
|
|
#line 120 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
DeactivateRunningSound ();
|
|
#line 121 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
return iAnim ;
|
|
#line 122 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 124 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
FLOAT CWerebull::WaitForDust(FLOAT3D & vStretch) {
|
|
#line 125 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
if(GetModelObject () -> GetAnim () == WEREBULL_ANIM_DEATHRUN )
|
|
#line 126 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
{
|
|
#line 127 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
vStretch = FLOAT3D (1 , 1 , 2) * 2.0f;
|
|
#line 128 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
return 0.6f;
|
|
#line 129 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
#line 130 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
else if(GetModelObject () -> GetAnim () == WEREBULL_ANIM_DEATH )
|
|
#line 131 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
{
|
|
#line 132 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
vStretch = FLOAT3D (1 , 1 , 2) * 2.0f;
|
|
#line 133 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
return 0.7f;
|
|
#line 134 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
#line 135 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
return - 1.0f;
|
|
#line 136 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::DeathNotify() {
|
|
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
ChangeCollisionBoxIndexWhenPossible (WEREBULL_COLLISION_BOX_DEATH );
|
|
#line 140 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
SetCollisionFlags (ECF_MODEL );
|
|
#line 141 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::StandingAnim(void) {
|
|
#line 145 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
StartModelAnim (WEREBULL_ANIM_IDLE , AOF_LOOPING | AOF_NORESTART );
|
|
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
DeactivateRunningSound ();
|
|
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 148 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::WalkingAnim(void) {
|
|
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
StartModelAnim (WEREBULL_ANIM_WALK , AOF_LOOPING | AOF_NORESTART );
|
|
#line 150 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
DeactivateRunningSound ();
|
|
#line 151 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 152 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::RunningAnim(void) {
|
|
#line 153 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
StartModelAnim (WEREBULL_ANIM_RUN , AOF_LOOPING | AOF_NORESTART );
|
|
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
ActivateRunningSound ();
|
|
#line 155 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 156 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::RotatingAnim(void) {
|
|
#line 157 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
StartModelAnim (WEREBULL_ANIM_RUN , AOF_LOOPING | AOF_NORESTART );
|
|
#line 159 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
ActivateRunningSound ();
|
|
#line 160 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 163 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::IdleSound(void) {
|
|
#line 164 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
PlaySound (m_soSound , SOUND_IDLE , SOF_3D );
|
|
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::SightSound(void) {
|
|
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
PlaySound (m_soSound , SOUND_SIGHT , SOF_3D );
|
|
#line 168 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 169 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::WoundSound(void) {
|
|
#line 170 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 171 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::DeathSound(void) {
|
|
#line 172 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
PlaySound (m_soSound , SOUND_DEATH , SOF_3D );
|
|
#line 173 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 177 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::ActivateRunningSound(void)
|
|
#line 178 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
{
|
|
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
if(! m_bRunSoundPlaying ){
|
|
#line 180 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
PlaySound (m_soFeet , SOUND_RUN , SOF_3D | SOF_LOOP );
|
|
#line 181 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_bRunSoundPlaying = TRUE ;
|
|
#line 182 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
#line 183 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 184 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::DeactivateRunningSound(void)
|
|
#line 185 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
{
|
|
#line 186 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_soFeet . Stop ();
|
|
#line 187 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_bRunSoundPlaying = FALSE ;
|
|
#line 188 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 195 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::LiveEntityTouched(ETouch etouch) {
|
|
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
if(m_penLastTouched != etouch . penOther || _pTimer -> CurrentTick () >= m_fLastTouchedTime + 0.25f){
|
|
#line 198 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
FLOAT3D vDirection = en_vCurrentTranslationAbsolute ;
|
|
#line 199 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
vDirection . Normalize ();
|
|
#line 200 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
ANGLE aHitAngle = FLOAT3D (etouch . plCollision ) % vDirection ;
|
|
#line 202 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
if(aHitAngle < 0.0f){
|
|
#line 204 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
if(! IsOfSameClass (this , etouch . penOther )){
|
|
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
IncreaseKickedMass (etouch . penOther );
|
|
#line 206 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
#line 207 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
PlaySound (m_soSound , SOUND_IMPACT , SOF_3D );
|
|
#line 209 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_penLastTouched = etouch . penOther ;
|
|
#line 210 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fLastTouchedTime = _pTimer -> CurrentTick ();
|
|
#line 212 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
FLOAT3D vDirection = m_penEnemy -> GetPlacement () . pl_PositionVector - GetPlacement () . pl_PositionVector ;
|
|
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
vDirection . Normalize ();
|
|
#line 214 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
InflictDirectDamage (etouch . penOther , this , DMT_CLOSERANGE , - aHitAngle * 40.0f ,
|
|
#line 215 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
FLOAT3D (0 , 0 , 0) , vDirection );
|
|
#line 217 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
FLOAT3D vSpeed = - FLOAT3D (etouch . plCollision );
|
|
#line 218 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
vSpeed = vSpeed * 10.0f;
|
|
#line 219 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
const FLOATmatrix3D & m = GetRotationMatrix ();
|
|
#line 220 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
FLOAT3D vSpeedRel = vSpeed * ! m ;
|
|
#line 221 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
if(vSpeedRel (1) < - 0.1f){
|
|
#line 222 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
vSpeedRel (1) -= 15.0f;
|
|
#line 223 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}else {
|
|
#line 224 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
vSpeedRel (1) += 15.0f;
|
|
#line 225 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
#line 226 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
vSpeedRel (2) = 15.0f;
|
|
#line 228 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
vSpeed = vSpeedRel * m ;
|
|
#line 229 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
KickEntity (etouch . penOther , vSpeed );
|
|
#line 230 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
#line 231 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
#line 232 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 235 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
BOOL CWerebull::HigherMass(void) {
|
|
#line 236 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
return (m_fMassKicked > 500.0f);
|
|
#line 237 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
|
|
#line 240 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
void CWerebull::EnemyPostInit(void)
|
|
#line 241 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
{
|
|
#line 243 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_soFeet . Set3DParameters (500.0f , 50.0f , 1.0f , 1.0f);
|
|
#line 244 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_bRunSoundPlaying = FALSE ;
|
|
#line 245 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_soSound . Set3DParameters (160.0f , 50.0f , 1.0f , 1.0f);
|
|
#line 246 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
BOOL CWerebull::
|
|
#line 253 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
Hit(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CWerebull_Hit
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CWerebull::Hit expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 254 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
if(!(CalcDist (m_penEnemy ) < HIT_DISTANCE )){ Jump(STATE_CURRENT,0x01330007, FALSE, EInternal());return TRUE;}
|
|
#line 256 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
StartModelAnim (WEREBULL_ANIM_ATTACKHORNS , 0);
|
|
#line 257 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
DeactivateRunningSound ();
|
|
#line 258 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_bHornHit = FALSE ;
|
|
#line 259 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
SetTimerAfter(0.4f);
|
|
Jump(STATE_CURRENT, 0x01330001, FALSE, EBegin());return TRUE;}BOOL CWerebull::H0x01330001_Hit_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01330001
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01330002, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CWerebull::H0x01330002_Hit_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01330002
|
|
;
|
|
#line 260 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
PlaySound (m_soSound , SOUND_KICKHORN , SOF_3D );
|
|
#line 261 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
if(CalcDist (m_penEnemy ) < HIT_DISTANCE ){m_bHornHit = TRUE ;}
|
|
#line 262 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
SetTimerAfter(0.1f);
|
|
Jump(STATE_CURRENT, 0x01330003, FALSE, EBegin());return TRUE;}BOOL CWerebull::H0x01330003_Hit_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01330003
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01330004, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CWerebull::H0x01330004_Hit_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01330004
|
|
;
|
|
#line 263 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
if(CalcDist (m_penEnemy ) < HIT_DISTANCE ){m_bHornHit = TRUE ;}
|
|
#line 264 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
SetTimerAfter(0.1f);
|
|
Jump(STATE_CURRENT, 0x01330005, FALSE, EBegin());return TRUE;}BOOL CWerebull::H0x01330005_Hit_05(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01330005
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01330006, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CWerebull::H0x01330006_Hit_06(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01330006
|
|
;
|
|
#line 265 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
if(CalcDist (m_penEnemy ) < HIT_DISTANCE ){m_bHornHit = TRUE ;}
|
|
#line 266 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
if(m_bHornHit ){
|
|
#line 267 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
FLOAT3D vDirection = m_penEnemy -> GetPlacement () . pl_PositionVector - GetPlacement () . pl_PositionVector ;
|
|
#line 268 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
vDirection . Normalize ();
|
|
#line 269 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
InflictDirectDamage (m_penEnemy , this , DMT_CLOSERANGE , 20.0f , FLOAT3D (0 , 0 , 0) , vDirection );
|
|
#line 270 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
FLOAT3D vSpeed ;
|
|
#line 271 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
GetPitchDirection (AngleDeg (90.0f) , vSpeed );
|
|
#line 272 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
vSpeed = vSpeed * 10.0f;
|
|
#line 273 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
KickEntity (m_penEnemy , vSpeed );
|
|
#line 274 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}Jump(STATE_CURRENT,0x01330007, FALSE, EInternal());return TRUE;}BOOL CWerebull::H0x01330007_Hit_07(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01330007
|
|
|
|
#line 278 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fShootTime = _pTimer -> CurrentTick () + 0.5f;
|
|
#line 279 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
Return(STATE_CURRENT,EReturn ());
|
|
#line 279 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CWerebull::
|
|
#line 287 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
Main(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CWerebull_Main
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CWerebull::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 289 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
InitAsModel ();
|
|
#line 290 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
SetPhysicsFlags (EPF_MODEL_WALKING );
|
|
#line 291 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
SetCollisionFlags (ECF_MODEL );
|
|
#line 292 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
SetFlags (GetFlags () | ENF_ALIVE );
|
|
#line 293 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
SetHealth (250.0f);
|
|
#line 294 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fMaxHealth = 250.0f;
|
|
#line 295 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
en_fDensity = 2000.0f;
|
|
#line 298 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
SetModel (MODEL_WEREBULL );
|
|
#line 300 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
SetModelMainTexture (TEXTURE_WEREBULL_SUMMER );
|
|
#line 304 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
StandingAnim ();
|
|
#line 306 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fWalkSpeed = FRnd () + 2.5f;
|
|
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_aWalkRotateSpeed = AngleDeg (FRnd () * 25.0f + 45.0f);
|
|
#line 308 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fAttackRunSpeed = FRnd () * 5.0f + 22.5f;
|
|
#line 309 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fAttackRotateRunInto = AngleDeg (FRnd () * 60 + 100.0f);
|
|
#line 310 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_aAttackRotateSpeed = m_fAttackRotateRunInto ;
|
|
#line 311 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fCloseRunSpeed = FRnd () * 5.0f + 15.0f;
|
|
#line 312 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_aCloseRotateSpeed = AngleDeg (FRnd () * 50 + 500.0f);
|
|
#line 314 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fAttackDistance = 100.0f;
|
|
#line 315 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fCloseDistance = 7.0f;
|
|
#line 316 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fStopDistance = 0.0f;
|
|
#line 317 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fAttackFireTime = 0.05f;
|
|
#line 318 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fCloseFireTime = 1.0f;
|
|
#line 319 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fIgnoreRange = 250.0f;
|
|
#line 321 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fBlowUpAmount = 1E10f;
|
|
#line 322 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fBodyParts = 12;
|
|
#line 323 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fDamageWounded = 100000.0f;
|
|
#line 324 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_iScore = 2000;
|
|
#line 325 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
if(m_fStepHeight == - 1){
|
|
#line 326 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
m_fStepHeight = 4.0f;
|
|
#line 327 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
}
|
|
#line 329 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
Particles_RunningDust_Prepare (this );
|
|
#line 332 "D:/SE1_GPL/Sources/EntitiesMP/Werebull.es"
|
|
Jump(STATE_CURRENT, STATE_CEnemyRunInto_MainLoop, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;}; |