2015-06-30 12:46:07 +03:00
/*
*
* This program is free software ; you can redistribute it and / or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation ; either version 2 of the License , or ( at
* your option ) any later version .
*
* 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 . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA
*
* In addition , as a special exception , the author gives permission to
* link the code of this program with the Half - Life Game Engine ( " HL
* Engine " ) and Modified Game Libraries ( " MODs " ) developed by Valve,
* L . L . C ( " Valve " ) . You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve . If you modify this file , you may extend this exception
* to your version of the file , but you are not obligated to do so . If
* you do not wish to do so , delete this exception statement from your
* version .
*
*/
# pragma once
2017-07-04 15:31:14 +03:00
# include "utlmap.h"
2015-06-30 12:46:07 +03:00
class CFrictionModifier : public CBaseEntity
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
virtual int Save ( CSave & save ) ;
virtual int Restore ( CRestore & restore ) ;
2016-02-04 03:18:26 +03:00
virtual int ObjectCaps ( ) { return ( CBaseEntity : : ObjectCaps ( ) & ~ FCAP_ACROSS_TRANSITION ) ; }
2015-06-30 12:46:07 +03:00
public :
2015-09-16 23:19:21 +03:00
void EXPORT ChangeFriction ( CBaseEntity * pOther ) ;
2017-10-19 20:12:02 +03:00
static TYPEDESCRIPTION m_SaveData [ ] ;
2015-06-30 12:46:07 +03:00
float m_frictionFraction ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
# define SF_AUTO_FIREONCE BIT(0)
# define SF_AUTO_NORESET BIT(1)
2015-12-09 01:39:54 +03:00
// This trigger will fire when the level spawns (or respawns if not fire once)
2017-10-12 17:50:56 +03:00
// It will check a global state before firing. It supports delay and killtargets
2015-06-30 12:46:07 +03:00
class CAutoTrigger : public CBaseDelay
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
virtual int Save ( CSave & save ) ;
virtual int Restore ( CRestore & restore ) ;
2016-02-04 03:18:26 +03:00
virtual int ObjectCaps ( ) { return ( CBaseDelay : : ObjectCaps ( ) & ~ FCAP_ACROSS_TRANSITION ) ; }
virtual void Think ( ) ;
2015-06-30 12:46:07 +03:00
2016-09-15 14:27:39 +03:00
# ifdef REGAMEDLL_FIXES
virtual void Restart ( ) ;
# endif
2015-06-30 12:46:07 +03:00
public :
2017-10-19 20:12:02 +03:00
static TYPEDESCRIPTION m_SaveData [ ] ;
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
int m_globalstate ;
2017-10-12 17:50:56 +03:00
USE_TYPE m_triggerType ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
# define SF_RELAY_FIREONCE BIT(0)
2015-06-30 12:46:07 +03:00
class CTriggerRelay : public CBaseDelay
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
virtual int Save ( CSave & save ) ;
virtual int Restore ( CRestore & restore ) ;
2016-02-04 03:18:26 +03:00
virtual int ObjectCaps ( ) { return ( CBaseDelay : : ObjectCaps ( ) & ~ FCAP_ACROSS_TRANSITION ) ; }
2015-09-16 23:19:21 +03:00
virtual void Use ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
2015-06-30 12:46:07 +03:00
2015-07-05 14:05:26 +03:00
public :
2017-10-19 20:12:02 +03:00
static TYPEDESCRIPTION m_SaveData [ ] ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
USE_TYPE m_triggerType ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
const int MAX_MM_TARGETS = 16 ; // maximum number of targets a single multi_manager entity may be assigned.
# define SF_MULTIMAN_THREAD BIT(0)
# define SF_MULTIMAN_CLONE BIT(31)
// This entity when fire, will fire up to 16 targets at specified times.
2015-12-09 01:39:54 +03:00
// at specified times.
// FLAG: THREAD (create clones when triggered)
2015-09-16 23:19:21 +03:00
// FLAG: CLONE (this is a clone for a threaded execution)
2015-06-30 12:46:07 +03:00
class CMultiManager : public CBaseToggle
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Restart ( ) ;
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
virtual int Save ( CSave & save ) ;
virtual int Restore ( CRestore & restore ) ;
2016-02-04 03:18:26 +03:00
virtual int ObjectCaps ( ) { return ( CBaseToggle : : ObjectCaps ( ) & ~ FCAP_ACROSS_TRANSITION ) ; }
2015-09-16 23:19:21 +03:00
virtual BOOL HasTarget ( string_t targetname ) ;
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
public :
2016-02-04 03:18:26 +03:00
void EXPORT ManagerThink ( ) ;
2015-09-16 23:19:21 +03:00
void EXPORT ManagerUse ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
2015-07-05 14:05:26 +03:00
2015-06-30 12:46:07 +03:00
private :
2016-02-04 03:18:26 +03:00
BOOL IsClone ( )
2015-06-30 12:46:07 +03:00
{
2015-07-12 23:32:09 +03:00
if ( pev - > spawnflags & SF_MULTIMAN_CLONE )
2015-09-16 23:19:21 +03:00
{
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-09-16 23:19:21 +03:00
}
2015-06-30 12:46:07 +03:00
return FALSE ;
}
2016-02-04 03:18:26 +03:00
BOOL ShouldClone ( )
2015-06-30 12:46:07 +03:00
{
2015-07-12 23:32:09 +03:00
if ( IsClone ( ) )
2015-09-16 23:19:21 +03:00
{
2015-06-30 12:46:07 +03:00
return FALSE ;
2015-09-16 23:19:21 +03:00
}
2015-07-12 23:32:09 +03:00
if ( pev - > spawnflags & SF_MULTIMAN_THREAD )
2015-09-16 23:19:21 +03:00
{
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-09-16 23:19:21 +03:00
}
2015-06-30 12:46:07 +03:00
return FALSE ;
}
2016-02-04 03:18:26 +03:00
CMultiManager * Clone ( ) ;
2015-06-30 12:46:07 +03:00
2015-07-05 14:05:26 +03:00
public :
2017-10-19 20:12:02 +03:00
static TYPEDESCRIPTION m_SaveData [ ] ;
2015-06-30 12:46:07 +03:00
2016-02-04 03:18:26 +03:00
int m_cTargets ;
2015-06-30 12:46:07 +03:00
int m_index ;
float m_startTime ;
2017-10-12 17:50:56 +03:00
int m_iTargetName [ MAX_MM_TARGETS ] ;
float m_flTargetDelay [ MAX_MM_TARGETS ] ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
// Flags to indicate masking off various render parameters that are normally copied to the targets
# define SF_RENDER_MASKFX BIT(0)
# define SF_RENDER_MASKAMT BIT(1)
# define SF_RENDER_MASKMODE BIT(2)
# define SF_RENDER_MASKCOLOR BIT(3)
2015-12-09 01:39:54 +03:00
// Render parameters trigger
// This entity will copy its render parameters (renderfx, rendermode, rendercolor, renderamt)
2015-09-16 23:19:21 +03:00
// to its targets when triggered.
2015-06-30 12:46:07 +03:00
class CRenderFxManager : public CBaseEntity
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-09-16 23:19:21 +03:00
virtual void Use ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
2017-07-04 15:31:14 +03:00
# ifdef REGAMEDLL_FIXES
virtual void Restart ( ) ;
virtual void UpdateOnRemove ( ) ;
public :
struct RenderGroup_t
{
int rendermode ;
float renderamt ;
Vector rendercolor ;
int renderfx ;
} ;
CUtlMap < int , RenderGroup_t > m_RenderGroups ;
# endif
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
# define SF_TRIGGER_ALLOWMONSTERS BIT(0) // monsters allowed to fire this trigger
# define SF_TRIGGER_NOCLIENTS BIT(1) // players not allowed to fire this trigger
# define SF_TRIGGER_PUSHABLES BIT(2) // only pushables can fire this trigger
# define SF_TRIGGER_NORESET BIT(6) // it is not allowed to be resetting on a new round
2015-06-30 12:46:07 +03:00
class CBaseTrigger : public CBaseToggle
{
public :
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
2016-02-04 03:18:26 +03:00
virtual int ObjectCaps ( ) { return ( CBaseToggle : : ObjectCaps ( ) & ~ FCAP_ACROSS_TRANSITION ) ; }
2015-06-30 12:46:07 +03:00
public :
2015-09-16 23:19:21 +03:00
void EXPORT TeleportTouch ( CBaseEntity * pOther ) ;
void EXPORT MultiTouch ( CBaseEntity * pOther ) ;
void EXPORT HurtTouch ( CBaseEntity * pOther ) ;
2016-02-23 02:13:52 +03:00
void EXPORT CDAudioTouch ( CBaseEntity * pOther ) ;
2015-09-16 23:19:21 +03:00
void ActivateMultiTrigger ( CBaseEntity * pActivator ) ;
2016-02-04 03:18:26 +03:00
void EXPORT MultiWaitOver ( ) ;
2015-09-16 23:19:21 +03:00
void EXPORT CounterUse ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
void EXPORT ToggleUse ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
2016-02-04 03:18:26 +03:00
void InitTrigger ( ) ;
} ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
# define SF_TRIGGER_HURT_TARGETONCE BIT(0) // Only fire hurt target once
# define SF_TRIGGER_HURT_START_OFF BIT(1) // spawnflag that makes trigger_push spawn turned OFF
# define SF_TRIGGER_HURT_NO_CLIENTS BIT(3) // spawnflag that makes trigger_push spawn turned OFF
# define SF_TRIGGER_HURT_CLIENTONLYFIRE BIT(4) // trigger hurt will only fire its target if it is hurting a client
# define SF_TRIGGER_HURT_CLIENTONLYTOUCH BIT(5) // only clients may touch this trigger.
// Hurts anything that touches it.
// If the trigger has a targetname, firing it will toggle state
2015-06-30 12:46:07 +03:00
class CTriggerHurt : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-06-30 12:46:07 +03:00
2016-10-07 23:57:07 +03:00
# ifdef REGAMEDLL_FIXES
virtual void Restart ( ) ;
virtual int ObjectCaps ( ) { return ( CBaseTrigger : : ObjectCaps ( ) | FCAP_MUST_RESET ) ; }
# endif
2016-02-04 03:18:26 +03:00
void EXPORT RadiationThink ( ) ;
} ;
2015-06-30 12:46:07 +03:00
class CTriggerMonsterJump : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Think ( ) ;
2015-09-16 23:19:21 +03:00
virtual void Touch ( CBaseEntity * pOther ) ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
// Starts/stops cd audio tracks
2015-06-30 12:46:07 +03:00
class CTriggerCDAudio : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-09-16 23:19:21 +03:00
virtual void Touch ( CBaseEntity * pOther ) ;
virtual void Use ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
2015-06-30 12:46:07 +03:00
public :
2017-05-24 19:07:37 +03:00
void PlayTrack ( edict_t * pEdict ) ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
// This plays a CD track when fired or when the player enters it's radius
2015-06-30 12:46:07 +03:00
class CTargetCDAudio : public CPointEntity
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
2016-02-04 03:18:26 +03:00
virtual void Think ( ) ;
2015-09-16 23:19:21 +03:00
virtual void Use ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
2015-06-30 12:46:07 +03:00
public :
2017-05-24 19:07:37 +03:00
void Play ( edict_t * pEdict ) ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
# define SF_TRIGGER_MULTIPLE_NOTOUCH BIT(0)
// Variable sized repeatable trigger. Must be targeted at one or more entities.
2015-12-09 01:39:54 +03:00
// If "health" is set, the trigger must be killed to activate each time.
// If "delay" is set, the trigger waits some time after activating before firing.
// "wait" : Seconds between triggerings. (.2 default)
// If notouch is set, the trigger is only fired by other entities, not by touching.
// NOTOUCH has been obsoleted by trigger_relay!
// sounds
// 1) secret
// 2) beep beep
// 3) large switch
// 4)
// NEW
// if a trigger has a NETNAME, that NETNAME will become the TARGET of the triggered object.
2015-06-30 12:46:07 +03:00
class CTriggerMultiple : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
} ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
// Variable sized trigger. Triggers once, then removes itself. You must set the key "target" to the name of another object in the level that has a matching
// "targetname". If "health" is set, the trigger must be killed to activate.
2015-12-09 01:39:54 +03:00
// If notouch is set, the trigger is only fired by other entities, not by touching.
// if "killtarget" is set, any objects that have a matching "target" will be removed when the trigger is fired.
2017-10-12 17:50:56 +03:00
// if "angle" is set, the trigger will only fire when someone is facing the direction of the angle. Use "360" for an angle of 0.
2015-12-09 01:39:54 +03:00
// sounds
// 1) secret
// 2) beep beep
// 3) large switch
2015-09-16 23:19:21 +03:00
// 4)
2015-06-30 12:46:07 +03:00
class CTriggerOnce : public CTriggerMultiple
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-06-30 12:46:07 +03:00
2016-09-08 13:04:00 +03:00
# ifdef REGAMEDLL_FIXES
virtual void Restart ( ) ;
# endif
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
# define SF_TRIGGER_COUNTER_NOMESSAGE BIT(0)
2015-12-09 01:39:54 +03:00
// Acts as an intermediary for an action that takes multiple inputs.
// If nomessage is not set, it will print "1 more.. " etc when triggered and
2017-10-12 17:50:56 +03:00
// "sequence complete" when finished. After the counter has been triggered "cTriggersLeft"
2015-12-09 01:39:54 +03:00
// times (default 2), it will fire all of it's targets and remove itself.
2015-06-30 12:46:07 +03:00
class CTriggerCounter : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
} ;
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
// Derive from point entity so this doesn't move across levels
2015-06-30 12:46:07 +03:00
class CTriggerVolume : public CPointEntity
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
} ;
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
// Fires a target after level transition and then dies
2015-06-30 12:46:07 +03:00
class CFireAndDie : public CBaseDelay
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
virtual int ObjectCaps ( ) { return ( CBaseDelay : : ObjectCaps ( ) | FCAP_FORCE_TRANSITION ) ; } // Always go across transitions
virtual void Think ( ) ;
} ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
# define SF_CHANGELEVEL_USEONLY BIT(1)
// When the player touches this, he gets sent to the map listed in the "map" variable.
// Unless the NO_INTERMISSION flag is set, the view will go to the info_intermission spot and display stats.
2015-06-30 12:46:07 +03:00
class CChangeLevel : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
virtual int Save ( CSave & save ) ;
virtual int Restore ( CRestore & restore ) ;
2015-06-30 12:46:07 +03:00
public :
2015-09-16 23:19:21 +03:00
void EXPORT UseChangeLevel ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
2016-02-23 02:13:52 +03:00
void EXPORT TriggerChangeLevel ( ) ;
2016-02-04 03:18:26 +03:00
void EXPORT ExecuteChangeLevel ( ) ;
2015-09-16 23:19:21 +03:00
void EXPORT TouchChangeLevel ( CBaseEntity * pOther ) ;
void ChangeLevelNow ( CBaseEntity * pActivator ) ;
2015-06-30 12:46:07 +03:00
2015-08-20 13:35:01 +03:00
static edict_t * FindLandmark ( const char * pLandmarkName ) ;
static int ChangeList ( LEVELLIST * pLevelList , int maxList ) ;
static int AddTransitionToList ( LEVELLIST * pLevelList , int listCount , const char * pMapName , const char * pLandmarkName , edict_t * pentLandmark ) ;
static int InTransitionVolume ( CBaseEntity * pEntity , char * pVolumeName ) ;
2015-06-30 12:46:07 +03:00
2015-07-05 14:05:26 +03:00
public :
2017-10-19 20:12:02 +03:00
static TYPEDESCRIPTION m_SaveData [ ] ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
char m_szMapName [ MAX_MAPNAME_LENGHT ] ; // next map
char m_szLandmarkName [ MAX_MAPNAME_LENGHT ] ; // landmark on next map
2015-06-30 12:46:07 +03:00
int m_changeTarget ;
float m_changeTargetDelay ;
2017-10-13 13:12:26 +03:00
# ifdef REGAMEDLL_FIXES
float m_flPercentOfPlayers ;
# endif
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CLadder : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
# define SF_TRIGGER_PUSH_ONCE BIT(0)
# define SF_TRIGGER_PUSH_START_OFF BIT(1) // spawnflag that makes trigger_push spawn turned OFF
2015-06-30 12:46:07 +03:00
class CTriggerPush : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
virtual void Touch ( CBaseEntity * pOther ) ;
2015-06-30 12:46:07 +03:00
2017-06-11 13:53:53 +03:00
# ifdef REGAMEDLL_FIXES
virtual void Restart ( ) ;
# endif
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CTriggerTeleport : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
} ;
2015-06-30 12:46:07 +03:00
class CBuyZone : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
void EXPORT BuyTouch ( CBaseEntity * pOther ) ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CBombTarget : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-06-30 12:46:07 +03:00
public :
2015-09-16 23:19:21 +03:00
void EXPORT BombTargetTouch ( CBaseEntity * pOther ) ;
void EXPORT BombTargetUse ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CHostageRescue : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-06-30 12:46:07 +03:00
public :
2015-09-16 23:19:21 +03:00
void EXPORT HostageRescueTouch ( CBaseEntity * pOther ) ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CEscapeZone : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
void EXPORT EscapeTouch ( CBaseEntity * pOther ) ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CVIP_SafetyZone : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
void EXPORT VIP_SafetyTouch ( CBaseEntity * pOther ) ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CTriggerSave : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
void EXPORT SaveTouch ( CBaseEntity * pOther ) ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
# define SF_ENDSECTION_USEONLY BIT(0)
2015-06-30 12:46:07 +03:00
class CTriggerEndSection : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
2015-06-30 12:46:07 +03:00
public :
2015-09-16 23:19:21 +03:00
void EXPORT EndSectionTouch ( CBaseEntity * pOther ) ;
void EXPORT EndSectionUse ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CTriggerGravity : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
void EXPORT GravityTouch ( CBaseEntity * pOther ) ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
// this is a really bad idea.
2015-06-30 12:46:07 +03:00
class CTriggerChangeTarget : public CBaseDelay
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
virtual int Save ( CSave & save ) ;
virtual int Restore ( CRestore & restore ) ;
2016-02-04 03:18:26 +03:00
virtual int ObjectCaps ( ) { return ( CBaseEntity : : ObjectCaps ( ) & ~ FCAP_ACROSS_TRANSITION ) ; }
2015-09-16 23:19:21 +03:00
virtual void Use ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
2015-06-30 12:46:07 +03:00
public :
2017-10-19 20:12:02 +03:00
static TYPEDESCRIPTION m_SaveData [ ] ;
2015-07-05 14:05:26 +03:00
2015-06-30 12:46:07 +03:00
private :
int m_iszNewTarget ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
# define SF_CAMERA_PLAYER_POSITION BIT(0)
# define SF_CAMERA_PLAYER_TARGET BIT(1)
# define SF_CAMERA_PLAYER_TAKECONTROL BIT(2)
2015-06-30 12:46:07 +03:00
class CTriggerCamera : public CBaseDelay
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
virtual int Save ( CSave & save ) ;
virtual int Restore ( CRestore & restore ) ;
2016-02-04 03:18:26 +03:00
virtual int ObjectCaps ( ) { return ( CBaseEntity : : ObjectCaps ( ) & ~ FCAP_ACROSS_TRANSITION ) ; }
2015-09-16 23:19:21 +03:00
virtual void Use ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
2015-06-30 12:46:07 +03:00
public :
2016-02-04 03:18:26 +03:00
void EXPORT FollowTarget ( ) ;
void Move ( ) ;
2015-06-30 12:46:07 +03:00
2017-10-19 20:12:02 +03:00
static TYPEDESCRIPTION m_SaveData [ ] ;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
EntityHandle < CBasePlayer > m_hPlayer ;
EntityHandle < CBaseEntity > m_hTarget ;
2015-06-30 12:46:07 +03:00
CBaseEntity * m_pentPath ;
int m_sPath ;
float m_flWait ;
float m_flReturnTime ;
float m_flStopTime ;
float m_moveDistance ;
float m_targetSpeed ;
float m_initialSpeed ;
float m_acceleration ;
float m_deceleration ;
int m_state ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CWeather : public CBaseTrigger
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
} ;
2015-06-30 12:46:07 +03:00
class CClientFog : public CBaseEntity
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
2015-06-30 12:46:07 +03:00
public :
int m_iStartDist ;
int m_iEndDist ;
float m_fDensity ;
2016-02-04 03:18:26 +03:00
} ;
2015-09-16 23:19:21 +03:00
2017-05-24 19:07:37 +03:00
void PlayCDTrack ( edict_t * pClient , int iTrack ) ;
2016-03-17 20:44:52 +03:00
int BuildChangeList ( LEVELLIST * pLevelList , int maxList ) ;
2016-02-23 02:13:52 +03:00
void NextLevel ( ) ;