You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
2.9 KiB
97 lines
2.9 KiB
7 years ago
|
/***
|
||
|
*
|
||
|
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
||
|
*
|
||
|
* This product contains software technology licensed from Id
|
||
|
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||
|
* All Rights Reserved.
|
||
|
*
|
||
|
* This source code contains proprietary and confidential information of
|
||
|
* Valve LLC and its suppliers. Access to this code is restricted to
|
||
|
* persons who have executed a written SDK license with Valve. Any access,
|
||
|
* use or distribution of this code by or to any unlicensed person is illegal.
|
||
|
*
|
||
|
****/
|
||
|
//=========================================================
|
||
|
// Alien slave monster
|
||
|
//=========================================================
|
||
|
#include "extdll.h"
|
||
|
#include "util.h"
|
||
|
#include "cbase.h"
|
||
|
#include "monsters.h"
|
||
|
#include "squadmonster.h"
|
||
|
#include "schedule.h"
|
||
|
#include "effects.h"
|
||
|
#include "weapons.h"
|
||
|
#include "soundent.h"
|
||
|
//#include "islave.h"
|
||
|
|
||
|
extern DLL_GLOBAL int g_iSkillLevel;
|
||
|
|
||
|
//=========================================================
|
||
|
// Monster's Anim Events Go Here
|
||
|
//=========================================================
|
||
|
#define ISLAVE_AE_CLAW ( 1 )
|
||
|
#define ISLAVE_AE_CLAWRAKE ( 2 )
|
||
|
#define ISLAVE_AE_ZAP_POWERUP ( 3 )
|
||
|
#define ISLAVE_AE_ZAP_SHOOT ( 4 )
|
||
|
#define ISLAVE_AE_ZAP_DONE ( 5 )
|
||
|
|
||
|
#define ISLAVE_MAX_BEAMS 8
|
||
|
|
||
|
class CISlave : public CSquadMonster
|
||
|
{
|
||
|
public:
|
||
|
void Spawn( void );
|
||
|
void Precache( void );
|
||
|
void UpdateOnRemove();
|
||
|
void SetYawSpeed( void );
|
||
|
int ISoundMask( void );
|
||
|
int Classify( void );
|
||
|
int IRelationship( CBaseEntity *pTarget );
|
||
|
void HandleAnimEvent( MonsterEvent_t *pEvent );
|
||
|
BOOL CheckRangeAttack1( float flDot, float flDist );
|
||
|
BOOL CheckRangeAttack2( float flDot, float flDist );
|
||
|
void CallForHelp( const char *szClassname, float flDist, EHANDLE hEnemy, Vector &vecLocation );
|
||
|
void TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType );
|
||
|
int TakeDamage( entvars_t* pevInflictor, entvars_t* pevAttacker, float flDamage, int bitsDamageType );
|
||
|
|
||
|
void DeathSound( void );
|
||
|
void PainSound( void );
|
||
|
void AlertSound( void );
|
||
|
void IdleSound( void );
|
||
|
|
||
|
void Killed( entvars_t *pevAttacker, int iGib );
|
||
|
|
||
|
void StartTask( Task_t *pTask );
|
||
|
Schedule_t *GetSchedule( void );
|
||
|
Schedule_t *GetScheduleOfType( int Type );
|
||
|
CUSTOM_SCHEDULES
|
||
|
|
||
|
int Save( CSave &save );
|
||
|
int Restore( CRestore &restore );
|
||
|
static TYPEDESCRIPTION m_SaveData[];
|
||
|
|
||
|
virtual void ClearBeams();
|
||
|
virtual void ArmBeam( int side );
|
||
|
virtual void WackBeam( int side, CBaseEntity *pEntity );
|
||
|
void ZapBeam( int side );
|
||
|
void BeamGlow( void );
|
||
|
|
||
|
int m_iBravery;
|
||
|
|
||
|
CBeam *m_pBeam[ISLAVE_MAX_BEAMS];
|
||
|
|
||
|
int m_iBeams;
|
||
|
float m_flNextAttack;
|
||
|
|
||
|
int m_voicePitch;
|
||
|
|
||
|
EHANDLE m_hDead;
|
||
|
|
||
|
static const char *pAttackHitSounds[];
|
||
|
static const char *pAttackMissSounds[];
|
||
|
static const char *pPainSounds[];
|
||
|
static const char *pDeathSounds[];
|
||
|
};
|