Portable Half-Life SDK. GoldSource and Xash3D. Crossplatform.
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.

50 lines
2.2 KiB

9 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.
*
****/
// Base class for flying monsters. This overrides the movement test & execution code from CBaseMonster
#pragma once
4 years ago
#if !defined(FLYINGMONSTER_H)
9 years ago
#define FLYINGMONSTER_H
class CFlyingMonster : public CBaseMonster
{
public:
9 years ago
int CheckLocalMove( const Vector &vecStart, const Vector &vecEnd, CBaseEntity *pTarget, float *pflDist );// check validity of a straight move through space
BOOL FTriangulate( const Vector &vecStart, const Vector &vecEnd, float flDist, CBaseEntity *pTargetEnt, Vector *pApex );
9 years ago
Activity GetStoppedActivity( void );
void Killed( entvars_t *pevAttacker, int iGib );
void Stop( void );
float ChangeYaw( int speed );
void HandleAnimEvent( MonsterEvent_t *pEvent );
void MoveExecute( CBaseEntity *pTargetEnt, const Vector &vecDir, float flInterval );
void Move( float flInterval = 0.1 );
BOOL ShouldAdvanceRoute( float flWaypointDist );
inline void SetFlyingMomentum( float momentum ) { m_momentum = momentum; }
inline void SetFlyingFlapSound( const char *pFlapSound ) { m_pFlapSound = pFlapSound; }
inline void SetFlyingSpeed( float speed ) { m_flightSpeed = speed; }
float CeilingZ( const Vector &position );
float FloorZ( const Vector &position );
BOOL ProbeZ( const Vector &position, const Vector &probe, float *pFraction );
9 years ago
// UNDONE: Save/restore this stuff!!!
protected:
Vector m_vecTravel; // Current direction
float m_flightSpeed; // Current flight speed (decays when not flapping or gliding)
float m_stopTime; // Last time we stopped (to avoid switching states too soon)
float m_momentum; // Weight for desired vs. momentum velocity
const char *m_pFlapSound;
};
#endif //FLYINGMONSTER_H