initial
This commit is contained in:
43
public/game/client/IGameClientExports.h
Normal file
43
public/game/client/IGameClientExports.h
Normal file
@@ -0,0 +1,43 @@
|
||||
//========= Copyright (c) 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef IGAMECLIENTEXPORTS_H
|
||||
#define IGAMECLIENTEXPORTS_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "interface.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Exports a set of functions for the GameUI interface to interact with the game client
|
||||
//-----------------------------------------------------------------------------
|
||||
abstract_class IGameClientExports : public IBaseInterface
|
||||
{
|
||||
public:
|
||||
// ingame voice manipulation
|
||||
virtual bool IsPlayerGameVoiceMuted(int playerIndex) = 0;
|
||||
virtual void MutePlayerGameVoice(int playerIndex) = 0;
|
||||
virtual void UnmutePlayerGameVoice(int playerIndex) = 0;
|
||||
|
||||
// notification of gameui state changes
|
||||
virtual void OnGameUIActivated() = 0;
|
||||
virtual void OnGameUIHidden() = 0;
|
||||
|
||||
virtual void CreateAchievementsPanel( vgui::Panel* pParent ) = 0;
|
||||
virtual void DisplayAchievementPanel( ) = 0;
|
||||
virtual void ShutdownAchievementPanel( ) = 0;
|
||||
virtual int GetAchievementsPanelMinWidth( void ) const = 0;
|
||||
|
||||
// if true, the gameui applies the blur effect
|
||||
virtual bool ClientWantsBlurEffect( void ) = 0;
|
||||
};
|
||||
|
||||
#define GAMECLIENTEXPORTS_INTERFACE_VERSION "GameClientExports001"
|
||||
|
||||
|
||||
#endif // IGAMECLIENTEXPORTS_H
|
||||
41
public/game/client/iclientrendertargets.h
Normal file
41
public/game/client/iclientrendertargets.h
Normal file
@@ -0,0 +1,41 @@
|
||||
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: Exposes interfaces to the engine which allow the client to setup their own render targets
|
||||
// during the proper period of material system's init.
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef ICLIENTRENDERTARGETS_H
|
||||
#define ICLIENTRENDERTARGETS_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "interface.h" // For base interface
|
||||
|
||||
class IMaterialSystem;
|
||||
class IMaterialSystemHardwareConfig;
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
// Purpose: Exposes interfaces to the engine which allow the client to setup their own render targets
|
||||
// during the proper period of material system's init.
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
abstract_class IClientRenderTargets
|
||||
{
|
||||
public:
|
||||
// Pass the material system interface to the client-- Their Material System singleton has not been created
|
||||
// at the time they receive this call.
|
||||
virtual void InitClientRenderTargets( IMaterialSystem* pMaterialSystem, IMaterialSystemHardwareConfig* pHardwareConfig ) = 0;
|
||||
|
||||
// Call shutdown on every created refrence-- Clients keep track of this themselves
|
||||
// and should add shutdown code to this function whenever they add a new render target.
|
||||
virtual void ShutdownClientRenderTargets( void ) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define CLIENTRENDERTARGETS_INTERFACE_VERSION "ClientRenderTargets001"
|
||||
|
||||
extern IClientRenderTargets * g_pClientRenderTargets;
|
||||
|
||||
#endif // ICLIENTRENDERTARGETS_H
|
||||
35
public/game/client/irendercaptureconfiguration.h
Normal file
35
public/game/client/irendercaptureconfiguration.h
Normal file
@@ -0,0 +1,35 @@
|
||||
//====== Copyright c 1996-20013, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef IRENDERCAPTURECONFIGURATION_H
|
||||
#define IRENDERCAPTURECONFIGURATION_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
class ITexture;
|
||||
class IVRenderView;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generic interface to capture shadow in a render target
|
||||
//
|
||||
|
||||
class CRenderCaptureConfigurationState
|
||||
{
|
||||
public:
|
||||
FlashlightState_t m_renderFlashlightState;
|
||||
VMatrix m_renderMatrixWorldToShadow;
|
||||
ITexture *m_pFlashlightDepthTexture;
|
||||
ITexture *m_pDummyColorBufferTexture;
|
||||
IVRenderView *m_pIVRenderView;
|
||||
};
|
||||
|
||||
|
||||
#endif // IRENDERCAPTURECONFIGURATION_H
|
||||
|
||||
73
public/game/client/iviewport.h
Normal file
73
public/game/client/iviewport.h
Normal file
@@ -0,0 +1,73 @@
|
||||
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// $Log: $
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#if !defined( IVIEWPORT_H )
|
||||
#define IVIEWPORT_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <vgui/vgui.h>
|
||||
|
||||
#include "viewport_panel_names.h"
|
||||
|
||||
class KeyValues;
|
||||
|
||||
abstract_class IViewPortPanel
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~IViewPortPanel() {};
|
||||
|
||||
virtual const char *GetName( void ) = 0;// return identifer name
|
||||
virtual void SetData(KeyValues *data) = 0; // set ViewPortPanel data
|
||||
virtual void Reset( void ) = 0; // clears internal state, deactivates it
|
||||
virtual void Update( void ) = 0; // updates all (size, position, content, etc)
|
||||
virtual bool NeedsUpdate( void ) = 0; // query panel if content needs to be updated
|
||||
virtual bool HasInputElements( void ) = 0; // true if panel contains elments which accepts input
|
||||
virtual void ReloadScheme( void ) {}
|
||||
virtual bool CanReplace( const char *panelName ) const { return true; } // returns true if this panel can appear on top of the given panel
|
||||
virtual bool CanBeReopened( void ) const { return true; } // returns true if this panel can be re-opened after being hidden by another panel
|
||||
|
||||
virtual void ShowPanel( bool state ) = 0; // activate VGUI Frame
|
||||
|
||||
// VGUI functions:
|
||||
virtual vgui::VPANEL GetVPanel( void ) = 0; // returns VGUI panel handle
|
||||
virtual bool IsVisible() = 0; // true if panel is visible
|
||||
virtual void SetParent( vgui::VPANEL parent ) = 0;
|
||||
|
||||
virtual bool WantsBackgroundBlurred( void ) = 0;
|
||||
|
||||
virtual void UpdateVisibility( void ) {}
|
||||
virtual void ViewportThink( void ) {}
|
||||
virtual void LevelInit( void ) {}
|
||||
};
|
||||
|
||||
abstract_class IViewPort
|
||||
{
|
||||
public:
|
||||
virtual void UpdateAllPanels( void ) = 0;
|
||||
virtual void ShowPanel( const char *pName, bool state, KeyValues *data, bool autoDeleteData = true ) = 0;
|
||||
virtual void ShowPanel( const char *pName, bool state ) = 0;
|
||||
virtual void ShowPanel( IViewPortPanel* pPanel, bool state ) = 0;
|
||||
virtual void ShowBackGround(bool bShow) = 0;
|
||||
virtual IViewPortPanel* FindPanelByName(const char *szPanelName) = 0;
|
||||
virtual IViewPortPanel* GetActivePanel( void ) = 0;
|
||||
virtual void LevelInit( void ) = 0;
|
||||
virtual void RecreatePanel( const char *szPanelName ) = 0;
|
||||
virtual void PostMessageToPanel( const char *pName, KeyValues *pKeyValues ) = 0;
|
||||
};
|
||||
|
||||
extern IViewPort *GetViewPortInterface();
|
||||
extern IViewPort *GetFullscreenViewPortInterface();
|
||||
|
||||
#endif // IVIEWPORT_H
|
||||
26
public/game/client/left4dead/xui/xuiclientinfo.h
Normal file
26
public/game/client/left4dead/xui/xuiclientinfo.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//XUIClientInfo.h
|
||||
//
|
||||
//Copyright Certain Affinity 2007
|
||||
//
|
||||
|
||||
#ifndef _XUICLIENT_INFO_H_
|
||||
#define _XUICLIENT_INFO_H_
|
||||
|
||||
#define INTERFACEVERSION_XUIClientInfo "XUIClientInterface1"
|
||||
|
||||
//This is intended to be an interface between the XUI system and the main game.
|
||||
class IXUIClientInfo
|
||||
{
|
||||
public:
|
||||
virtual bool IsPlayerSurvivor() = 0;
|
||||
virtual bool IsPlayerInfected() = 0;
|
||||
virtual bool IsPlayerSpectator() = 0;
|
||||
// presence info functions
|
||||
virtual unsigned int GetScenarioCount() = 0;
|
||||
virtual const char* GetScenarioDisplayString(unsigned int index) = 0;
|
||||
virtual const char* GetScenarioValueString(unsigned int index) = 0;
|
||||
virtual unsigned int GetScenarioID(unsigned int index) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
150
public/game/server/ientityinfo.h
Normal file
150
public/game/server/ientityinfo.h
Normal file
@@ -0,0 +1,150 @@
|
||||
//============ Copyright <20> 1996-2008, Valve Corporation, All rights reserved. ===================//
|
||||
//
|
||||
// Purpose: provides an interface for plugins to query information about entities from the game dll
|
||||
//
|
||||
//===============================================================================================//
|
||||
#ifndef IENTITYINFO_H
|
||||
#define IENTITYINFO_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "mathlib/vector.h"
|
||||
#include "pluginvariant.h"
|
||||
|
||||
abstract_class IEntityInfo
|
||||
{
|
||||
public:
|
||||
// returns true if entity is a player
|
||||
virtual const int EntityIndex() = 0;
|
||||
virtual const char *GetEntityName() = 0;
|
||||
virtual const char *GetClassname() = 0;
|
||||
virtual const char *GetModelName() = 0;
|
||||
//TODO
|
||||
virtual const char *GetTargetName() = 0;
|
||||
virtual void SetModel(const char *modelName) = 0;
|
||||
virtual bool IsPlayer() = 0;
|
||||
virtual bool IsNPC() = 0;
|
||||
virtual bool IsDead() = 0;
|
||||
virtual bool IsAlive() = 0;
|
||||
virtual bool IsInWorld() = 0;
|
||||
virtual bool IsTemplate() = 0;
|
||||
virtual int GetEFlags() = 0;
|
||||
virtual void SetEFlags( int iEFlags ) = 0;
|
||||
virtual void AddEFlags( int nEFlagMask ) = 0;
|
||||
virtual bool IsEFlagSet( int EFlagMask ) = 0;
|
||||
|
||||
virtual const int GetEffects( void ) = 0;
|
||||
virtual void AddEffects( int nEffects ) = 0;
|
||||
virtual void RemoveEffects( int nEffects ) = 0;
|
||||
virtual void ClearEffects( void ) = 0;
|
||||
virtual void SetEffects( int nEffects ) = 0;
|
||||
virtual bool IsEffectActive( int nEffects ) = 0;
|
||||
virtual int GetRenderMode() = 0;
|
||||
virtual void SetRenderMode( int nRenderMode ) = 0;
|
||||
|
||||
virtual void SetBlocksLOS( bool bBlocksLOS ) = 0;
|
||||
virtual bool BlocksLOS( void ) = 0;
|
||||
|
||||
virtual const int GetHealth() = 0;
|
||||
virtual const int GetMaxHealth() = 0;
|
||||
virtual void SetHealth( int iHealth ) = 0;
|
||||
virtual void SetMaxHealth( int iMaxHealth ) = 0;
|
||||
|
||||
// returns the team the entity is on
|
||||
virtual int GetTeamIndex() = 0;
|
||||
// changes the entity to a new team (if the game dll logic allows it)
|
||||
virtual void ChangeTeam( int iTeamNum ) = 0;
|
||||
|
||||
// positioning and sizes
|
||||
virtual const Vector GetAbsOrigin() = 0;
|
||||
virtual void SetAbsOrigin( Vector & vec ) = 0;
|
||||
virtual const QAngle GetAbsAngles() = 0;
|
||||
virtual void SetAbsAngles( QAngle & ang ) = 0;
|
||||
virtual const Vector GetLocalOrigin() = 0;
|
||||
virtual void SetLocalOrigin( const Vector& origin ) = 0;
|
||||
virtual const QAngle GetLocalAngles() = 0;
|
||||
virtual void SetLocalAngles( const QAngle& angles ) = 0;
|
||||
virtual const Vector GetAbsVelocity() = 0;
|
||||
virtual const Vector GetLocalVelocity() = 0;
|
||||
virtual const QAngle GetLocalAngularVelocity() = 0;
|
||||
virtual void EntityToWorldSpace( const Vector &in, Vector *pOut ) = 0;
|
||||
virtual void WorldToEntitySpace( const Vector &in, Vector *pOut ) = 0;
|
||||
virtual Vector EyePosition() = 0;
|
||||
virtual QAngle EyeAngles() = 0;
|
||||
virtual QAngle LocalEyeAngles() = 0;
|
||||
virtual Vector EarPosition() = 0;
|
||||
|
||||
// returns world aligned mins/maxs of this entity
|
||||
virtual const Vector GetWorldMins() = 0;
|
||||
virtual const Vector GetWorldMaxs() = 0;
|
||||
virtual const Vector WorldSpaceCenter() = 0;
|
||||
|
||||
virtual int GetWaterLevel() = 0;
|
||||
|
||||
// if this entity has an owner, it returns their edict_t.
|
||||
virtual edict_t *GetOwner() = 0;
|
||||
virtual edict_t *GetParent() = 0;
|
||||
virtual edict_t *GetMoveParent() = 0;
|
||||
virtual edict_t *GetRootMoveParent() = 0;
|
||||
|
||||
// if this entity is following another, returns that entities edict_t.
|
||||
virtual edict_t *GetFollowedEntity() = 0;
|
||||
virtual edict_t *GetGroundEntity() = 0; //returns the entity that this one is standing on - if set.
|
||||
|
||||
// accessor to hook mod specific information about the entity.
|
||||
virtual bool GetCustomInfo(int valueType, pluginvariant &outValue, pluginvariant options) = 0;
|
||||
|
||||
// entity debugging stuff.
|
||||
virtual const char *GetDebugName() = 0;
|
||||
virtual void EntityText( int text_offset, const char *text, float flDuration, int r = 255, int g = 255, int b = 255, int a = 255 ) = 0;
|
||||
|
||||
//Keyvalues
|
||||
virtual bool GetKeyValue( const char *szKeyName, char *szValue, int iMaxLen ) = 0;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#define INTERFACEVERSION_ENTITYINFOMANAGER "EntityInfoManager001"
|
||||
abstract_class IEntityInfoManager
|
||||
{
|
||||
public:
|
||||
virtual IEntityInfo *GetEntityInfo( edict_t *pEdict ) = 0;
|
||||
virtual IEntityInfo *GetEntityInfo( int index ) = 0; //Retrieves the info
|
||||
|
||||
//Experiment..
|
||||
virtual IServerUnknown *GetServerEntity( edict_t *pEdict ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Iterates the entities with a given classname.
|
||||
// Input : pStartEntity - Last entity found, NULL to start a new iteration.
|
||||
// szName - Classname to search for.
|
||||
//-----------------------------------------------------------------------------
|
||||
virtual edict_t *FindEntityByClassname( edict_t *pStartEntity, const char *szName ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Iterates the entities with a given name.
|
||||
// Input : pStartEntity - Last entity found, NULL to start a new iteration.
|
||||
// szName - Name to search for.
|
||||
//-----------------------------------------------------------------------------
|
||||
virtual edict_t *FindEntityByName( edict_t *pStartEntity, const char *szName ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Iterates the entities with a given model name.
|
||||
// Input : pStartEntity - Last entity found, NULL to start a new iteration.
|
||||
// szModelName - Model Name to search for.
|
||||
//-----------------------------------------------------------------------------
|
||||
virtual edict_t *FindEntityByModel( edict_t *pStartEntity, const char *szModelName ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Used to iterate all the entities within a sphere.
|
||||
// Input : pStartEntity -
|
||||
// vecCenter -
|
||||
// flRadius -
|
||||
//-----------------------------------------------------------------------------
|
||||
virtual edict_t *FindEntityInSphere( edict_t *pStartEntity, const Vector &vecCenter, float flRadius ) = 0;
|
||||
|
||||
virtual void GetWorldBounds( Vector &mins, Vector &maxs ) = 0;
|
||||
};
|
||||
#endif // IENTITYINFO_H
|
||||
45
public/game/server/igameinfo.h
Normal file
45
public/game/server/igameinfo.h
Normal file
@@ -0,0 +1,45 @@
|
||||
//============ Copyright <20> 1996-2008, Valve Corporation, All rights reserved. ===================//
|
||||
//
|
||||
// Purpose: provides an interface for plugins to query information about the gamerules in a simple
|
||||
// and organized mannor.
|
||||
//
|
||||
//===============================================================================================//
|
||||
#ifndef IGAMEINFO_H
|
||||
#define IGAMEINFO_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "mathlib/vector.h"
|
||||
#include "pluginvariant.h"
|
||||
|
||||
//Tony; prefixing everything in this so that i can make IGameInfo an extension of CGameRules and not stomp on anything, since gamerules isn't an entity.
|
||||
abstract_class IGameInfo
|
||||
{
|
||||
public:
|
||||
// returns an enumerated id for the current game type
|
||||
virtual const int GetInfo_GameType() = 0;
|
||||
// returns a name associated with the gametype, if defined.
|
||||
virtual const char *GetInfo_GameTypeName() = 0;
|
||||
// returns the team name associated with the number
|
||||
virtual const char *GetInfo_GetTeamName(int teamNumber) = 0;
|
||||
// returns how many teams the game has (typically always 4; 0 = unassigned, 1 = spectator, 2 = team1, 3 = team2)
|
||||
virtual const int GetInfo_GetTeamCount() = 0;
|
||||
// returns how many players are on a given team
|
||||
virtual const int GetInfo_NumPlayersOnTeam(int teamNumber) = 0;
|
||||
|
||||
// accessor to hook mod specific information about the rules. for TF2, fields such as
|
||||
virtual bool GetInfo_Custom(int valueType, pluginvariant &outValue, pluginvariant options) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//Interface is very simple, there's not much really needed for the manager, this stuff is just in it's own interface so it's not mixed up with the entity
|
||||
//or player managers.
|
||||
#define INTERFACEVERSION_GAMEINFOMANAGER "GameInfoManager001"
|
||||
abstract_class IGameInfoManager
|
||||
{
|
||||
public:
|
||||
virtual IGameInfo *GetGameInfo() = 0;
|
||||
};
|
||||
#endif // IGAMEINFO_H
|
||||
198
public/game/server/iplayerinfo.h
Normal file
198
public/game/server/iplayerinfo.h
Normal file
@@ -0,0 +1,198 @@
|
||||
//========= Copyright (c) 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: provides an interface for dlls to query information about players from the game dll
|
||||
//
|
||||
//=============================================================================//
|
||||
#ifndef IPLAYERINFO_H
|
||||
#define IPLAYERINFO_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "mathlib/vector.h"
|
||||
|
||||
// helper class for user commands
|
||||
class CBotCmd
|
||||
{
|
||||
public:
|
||||
CBotCmd()
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
virtual ~CBotCmd() { };
|
||||
|
||||
void Reset()
|
||||
{
|
||||
command_number = 0;
|
||||
tick_count = 0;
|
||||
viewangles.Init();
|
||||
forwardmove = 0.0f;
|
||||
sidemove = 0.0f;
|
||||
upmove = 0.0f;
|
||||
buttons = 0;
|
||||
impulse = 0;
|
||||
weaponselect = 0;
|
||||
weaponsubtype = 0;
|
||||
random_seed = 0;
|
||||
mousedx = 0;
|
||||
mousedy = 0;
|
||||
|
||||
hasbeenpredicted = false;
|
||||
}
|
||||
|
||||
CBotCmd& operator =( const CBotCmd& src )
|
||||
{
|
||||
if ( this == &src )
|
||||
return *this;
|
||||
|
||||
command_number = src.command_number;
|
||||
tick_count = src.tick_count;
|
||||
viewangles = src.viewangles;
|
||||
forwardmove = src.forwardmove;
|
||||
sidemove = src.sidemove;
|
||||
upmove = src.upmove;
|
||||
buttons = src.buttons;
|
||||
impulse = src.impulse;
|
||||
weaponselect = src.weaponselect;
|
||||
weaponsubtype = src.weaponsubtype;
|
||||
random_seed = src.random_seed;
|
||||
mousedx = src.mousedx;
|
||||
mousedy = src.mousedy;
|
||||
hasbeenpredicted = src.hasbeenpredicted;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// For matching server and client commands for debugging
|
||||
int command_number;
|
||||
|
||||
// the tick the client created this command
|
||||
int tick_count;
|
||||
|
||||
// Player instantaneous view angles.
|
||||
QAngle viewangles;
|
||||
// Intended velocities
|
||||
// forward velocity.
|
||||
float forwardmove;
|
||||
// sideways velocity.
|
||||
float sidemove;
|
||||
// upward velocity.
|
||||
float upmove;
|
||||
// Attack button states
|
||||
int buttons;
|
||||
// Impulse command issued.
|
||||
byte impulse;
|
||||
// Current weapon id
|
||||
int weaponselect;
|
||||
int weaponsubtype;
|
||||
|
||||
int random_seed; // For shared random functions
|
||||
|
||||
short mousedx; // mouse accum in x from create move
|
||||
short mousedy; // mouse accum in y from create move
|
||||
|
||||
// Client only, tracks whether we've predicted this command at least once
|
||||
bool hasbeenpredicted;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
abstract_class IPlayerInfo
|
||||
{
|
||||
public:
|
||||
// returns the players name (UTF-8 encoded)
|
||||
virtual const char *GetName() = 0;
|
||||
// returns the userid (slot number)
|
||||
virtual int GetUserID() = 0;
|
||||
// returns the string of their network (i.e Steam) ID
|
||||
virtual const char *GetNetworkIDString() = 0;
|
||||
// returns the team the player is on
|
||||
virtual int GetTeamIndex() = 0;
|
||||
// changes the player to a new team (if the game dll logic allows it)
|
||||
virtual void ChangeTeam( int iTeamNum ) = 0;
|
||||
// returns the number of kills this player has (exact meaning is mod dependent)
|
||||
virtual int GetFragCount() = 0;
|
||||
// returns the number of deaths this player has (exact meaning is mod dependent)
|
||||
virtual int GetDeathCount() = 0;
|
||||
// returns if this player slot is actually valid
|
||||
virtual bool IsConnected() = 0;
|
||||
// returns the armor/health of the player (exact meaning is mod dependent)
|
||||
virtual int GetArmorValue() = 0;
|
||||
|
||||
// extensions added to V2
|
||||
|
||||
// various player flags
|
||||
virtual bool IsHLTV() = 0;
|
||||
#if defined( REPLAY_ENABLED )
|
||||
virtual bool IsReplay() = 0;
|
||||
#endif
|
||||
virtual bool IsPlayer() = 0;
|
||||
virtual bool IsFakeClient() = 0;
|
||||
virtual bool IsDead() = 0;
|
||||
virtual bool IsInAVehicle() = 0;
|
||||
virtual bool IsObserver() = 0;
|
||||
|
||||
// player position and size
|
||||
virtual const Vector GetAbsOrigin() = 0;
|
||||
virtual const QAngle GetAbsAngles() = 0;
|
||||
virtual const Vector GetPlayerMins() = 0;
|
||||
virtual const Vector GetPlayerMaxs() = 0;
|
||||
// the name of the weapon currently being carried
|
||||
virtual const char *GetWeaponName() = 0;
|
||||
// the name of the player model in use
|
||||
virtual const char *GetModelName() = 0;
|
||||
// current player health
|
||||
virtual const int GetHealth() = 0;
|
||||
// max health value
|
||||
virtual const int GetMaxHealth() = 0;
|
||||
// the last user input from this player
|
||||
virtual CBotCmd GetLastUserCommand() = 0;
|
||||
};
|
||||
|
||||
|
||||
#define INTERFACEVERSION_PLAYERINFOMANAGER "PlayerInfoManager002"
|
||||
abstract_class IPlayerInfoManager
|
||||
{
|
||||
public:
|
||||
virtual IPlayerInfo *GetPlayerInfo( edict_t *pEdict ) = 0;
|
||||
virtual CGlobalVars *GetGlobalVars() = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
abstract_class IBotController
|
||||
{
|
||||
public:
|
||||
// change the bots position
|
||||
virtual void SetAbsOrigin( Vector & vec ) = 0;
|
||||
virtual void SetAbsAngles( QAngle & ang ) = 0;
|
||||
virtual void SetLocalOrigin( const Vector& origin ) = 0;
|
||||
virtual const Vector GetLocalOrigin( void ) = 0;
|
||||
virtual void SetLocalAngles( const QAngle& angles ) = 0;
|
||||
virtual const QAngle GetLocalAngles( void ) = 0;
|
||||
|
||||
// strip them of weapons, etc
|
||||
virtual void RemoveAllItems( bool removeSuit ) = 0;
|
||||
// give them a weapon
|
||||
virtual void SetActiveWeapon( const char *WeaponName ) = 0;
|
||||
// called after running a move command
|
||||
virtual void PostClientMessagesSent( void ) = 0;
|
||||
// check various effect flags
|
||||
virtual bool IsEFlagSet( int nEFlagMask ) = 0;
|
||||
// fire a virtual move command to the bot
|
||||
virtual void RunPlayerMove( CBotCmd *ucmd ) = 0;
|
||||
};
|
||||
|
||||
|
||||
#define INTERFACEVERSION_PLAYERBOTMANAGER "BotManager001"
|
||||
abstract_class IBotManager
|
||||
{
|
||||
public:
|
||||
virtual IBotController *GetBotController( edict_t *pEdict ) = 0;
|
||||
// create a new bot and spawn it into the server
|
||||
virtual edict_t *CreateBot( const char *botname ) = 0;
|
||||
};
|
||||
|
||||
#endif // IPLAYERINFO_H
|
||||
158
public/game/server/pluginvariant.h
Normal file
158
public/game/server/pluginvariant.h
Normal file
@@ -0,0 +1,158 @@
|
||||
//========= Copyright 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef PLUGINVARIANT_H
|
||||
#define PLUGINVARIANT_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "stdstring.h"
|
||||
#include "mathlib/vmatrix.h"
|
||||
|
||||
//
|
||||
// A modified variant class for that functions almost identically to variant_t, for plugins to pass data back and forth.
|
||||
//
|
||||
class pluginvariant
|
||||
{
|
||||
union
|
||||
{
|
||||
bool bVal;
|
||||
int iVal;
|
||||
float flVal;
|
||||
float vecVal[3];
|
||||
color32 rgbaVal;
|
||||
};
|
||||
//Tony; neither of these can be in the union because of constructors.
|
||||
edict_t *eVal;
|
||||
char iszVal[1024];
|
||||
|
||||
fieldtype_t fieldType;
|
||||
|
||||
public:
|
||||
|
||||
// constructor
|
||||
pluginvariant() : fieldType(FIELD_VOID), iVal(0) {}
|
||||
|
||||
inline bool Bool( void ) const { return( fieldType == FIELD_BOOLEAN ) ? bVal : false; }
|
||||
inline const char *String( void ) const { return( ToString() ); }
|
||||
inline int Int( void ) const { return( fieldType == FIELD_INTEGER ) ? iVal : 0; }
|
||||
inline float Float( void ) const { return( fieldType == FIELD_FLOAT ) ? flVal : 0; }
|
||||
inline const edict_t *Edict(void) const;
|
||||
inline color32 Color32(void) const { return rgbaVal; }
|
||||
inline void Vector3D(Vector &vec) const;
|
||||
|
||||
fieldtype_t FieldType( void ) { return fieldType; }
|
||||
|
||||
void SetBool( bool b ) { bVal = b; fieldType = FIELD_BOOLEAN; }
|
||||
void SetString( char *str ) { Q_snprintf(iszVal, 1024, str); fieldType = FIELD_STRING; }
|
||||
void SetInt( int val ) { iVal = val, fieldType = FIELD_INTEGER; }
|
||||
void SetFloat( float val ) { flVal = val, fieldType = FIELD_FLOAT; }
|
||||
void SetEdict( edict_t *val ) { eVal = val; fieldType = FIELD_EHANDLE; }
|
||||
void SetVector3D( const Vector &val ) { vecVal[0] = val[0]; vecVal[1] = val[1]; vecVal[2] = val[2]; fieldType = FIELD_VECTOR; }
|
||||
void SetPositionVector3D( const Vector &val ) { vecVal[0] = val[0]; vecVal[1] = val[1]; vecVal[2] = val[2]; fieldType = FIELD_POSITION_VECTOR; }
|
||||
void SetColor32( color32 val ) { rgbaVal = val; fieldType = FIELD_COLOR32; }
|
||||
void SetColor32( int r, int g, int b, int a ) { rgbaVal.r = r; rgbaVal.g = g; rgbaVal.b = b; rgbaVal.a = a; fieldType = FIELD_COLOR32; }
|
||||
|
||||
protected:
|
||||
|
||||
//
|
||||
// Returns a string representation of the value without modifying the variant.
|
||||
//
|
||||
const char *ToString( void ) const
|
||||
{
|
||||
static char szBuf[512];
|
||||
|
||||
switch (fieldType)
|
||||
{
|
||||
case FIELD_STRING:
|
||||
{
|
||||
return (const char *)iszVal;
|
||||
}
|
||||
|
||||
case FIELD_BOOLEAN:
|
||||
{
|
||||
if (bVal == 0)
|
||||
{
|
||||
Q_strncpy(szBuf, "false",sizeof(szBuf));
|
||||
}
|
||||
else
|
||||
{
|
||||
Q_strncpy(szBuf, "true",sizeof(szBuf));
|
||||
}
|
||||
return(szBuf);
|
||||
}
|
||||
|
||||
case FIELD_INTEGER:
|
||||
{
|
||||
Q_snprintf( szBuf, sizeof( szBuf ), "%i", iVal );
|
||||
return(szBuf);
|
||||
}
|
||||
|
||||
case FIELD_FLOAT:
|
||||
{
|
||||
Q_snprintf(szBuf,sizeof(szBuf), "%g", flVal);
|
||||
return(szBuf);
|
||||
}
|
||||
|
||||
case FIELD_COLOR32:
|
||||
{
|
||||
Q_snprintf(szBuf,sizeof(szBuf), "%d %d %d %d", (int)rgbaVal.r, (int)rgbaVal.g, (int)rgbaVal.b, (int)rgbaVal.a);
|
||||
return(szBuf);
|
||||
}
|
||||
|
||||
case FIELD_VECTOR:
|
||||
{
|
||||
Q_snprintf(szBuf,sizeof(szBuf), "[%g %g %g]", (double)vecVal[0], (double)vecVal[1], (double)vecVal[2]);
|
||||
return(szBuf);
|
||||
}
|
||||
|
||||
case FIELD_VOID:
|
||||
{
|
||||
szBuf[0] = '\0';
|
||||
return(szBuf);
|
||||
}
|
||||
}
|
||||
|
||||
return("No conversion to string");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
////////////////////////// pluginvariant implementation //////////////////////////
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Returns this variant as a vector.
|
||||
//-----------------------------------------------------------------------------
|
||||
inline void pluginvariant::Vector3D(Vector &vec) const
|
||||
{
|
||||
if (( fieldType == FIELD_VECTOR ) || ( fieldType == FIELD_POSITION_VECTOR ))
|
||||
{
|
||||
vec[0] = vecVal[0];
|
||||
vec[1] = vecVal[1];
|
||||
vec[2] = vecVal[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
vec = vec3_origin;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Returns this variant as an edict_t
|
||||
//-----------------------------------------------------------------------------
|
||||
inline const edict_t *pluginvariant::Edict(void) const
|
||||
{
|
||||
if ( fieldType == FIELD_EHANDLE )
|
||||
return eVal;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
#endif // pluginvariant_H
|
||||
251
public/game/shared/econ/iecon_item_system.h
Normal file
251
public/game/shared/econ/iecon_item_system.h
Normal file
@@ -0,0 +1,251 @@
|
||||
//====== Copyright <20> 1996-2010, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef __ECON_ITEM_SYSTEM_INTERFACE_H
|
||||
#define __ECON_ITEM_SYSTEM_INTERFACE_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "utlmap.h"
|
||||
#include "econ/econ_item_constants.h"
|
||||
|
||||
class KeyValues;
|
||||
class IEconItemSchema;
|
||||
class CEconItemDefinition;
|
||||
struct item_list_entry_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Particle system attachments exposed for editors.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct attachedparticlecontrolpoint_t
|
||||
{
|
||||
short nControlPoint;
|
||||
byte nAttachType;
|
||||
const char *pszAttachmentName;
|
||||
Vector vecPosition;
|
||||
};
|
||||
|
||||
enum attachedparticle_toent_t
|
||||
{
|
||||
ATTPART_TO_SELF,
|
||||
ATTPART_TO_PARENT,
|
||||
};
|
||||
|
||||
struct attachedparticlesystem_t
|
||||
{
|
||||
const char *pszResourceName;
|
||||
const char *pszSystemName;
|
||||
const char *pszAttachmentName;
|
||||
bool bFollowRootBone;
|
||||
bool bFlyingCourier;
|
||||
int iCustomType;
|
||||
int iCount;
|
||||
int nSystemID;
|
||||
KeyValues* pEffectKV;
|
||||
|
||||
// Advanced particle controlling
|
||||
byte nRootAttachType;
|
||||
attachedparticle_toent_t nAttachToEntity;
|
||||
CCopyableUtlVector<attachedparticlecontrolpoint_t> vecControlPoints;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Item Attribute
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class IEconItemAttributeDefinition
|
||||
{
|
||||
public:
|
||||
virtual uint16 GetDefinitionIndex( void ) const = 0;
|
||||
virtual const char *GetDefinitionName( void ) const = 0;
|
||||
|
||||
virtual const char *GetDescriptionString( void ) const = 0;
|
||||
virtual const char *GetAttributeClass( void ) const = 0;
|
||||
|
||||
virtual KeyValues* GetRawDefinition( void ) const = 0;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Loot List
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class IEconLootListDefinition
|
||||
{
|
||||
public:
|
||||
virtual const char *GetName() const = 0;
|
||||
virtual const CUtlVector<item_list_entry_t>& GetLootListContents() const = 0;
|
||||
virtual float GetWeight( int iIdx ) const = 0;
|
||||
virtual KeyValues* GenerateKeyValues() const = 0;
|
||||
virtual bool IsServerList() const = 0;
|
||||
|
||||
// Additional Drops
|
||||
virtual int GetAdditionalDropCount( void ) const = 0;
|
||||
virtual bool GetAdditionalDrop( int iIndex, CUtlString& strLootList, float& flChance ) const = 0;
|
||||
|
||||
// Random Attributes
|
||||
virtual int GetRandomAttributeGroupCount( void ) const = 0;
|
||||
virtual bool GetRandomAttributeGroup( int iIndex, float& flChance, float& flTotalWeight ) const = 0;
|
||||
virtual int GetRandomAttributeCount( int iGroup ) const = 0;
|
||||
virtual bool GetRandomAttribute( int iGroup, int iIndex, float& flWeight, int& iValue, int& iDefIndex ) const = 0;
|
||||
|
||||
// Editable Interface
|
||||
virtual void PurgeItems( void ) = 0;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Item Set
|
||||
//-----------------------------------------------------------------------------
|
||||
class IEconItemSetDefinition
|
||||
{
|
||||
public:
|
||||
virtual const char* GetName( void ) const = 0;
|
||||
virtual const char* GetLocKey( void ) const = 0;
|
||||
virtual const char* GetUnlocalizedName( void ) const = 0;
|
||||
virtual int GetBundle( void ) const = 0;
|
||||
virtual int GetItemCount( void ) const = 0;
|
||||
virtual int GetItemDef( int iIndex ) const = 0;
|
||||
virtual int GetItemPaintKit( int iIndex ) const = 0;
|
||||
virtual item_definition_index_t GetCraftReward( void ) const = 0;
|
||||
virtual int GetItemRarity( int iIndex ) const = 0;
|
||||
virtual int GetHighestItemRarityValue( void ) const = 0;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Static Item Data
|
||||
//-----------------------------------------------------------------------------
|
||||
class IEconItemDefinition
|
||||
{
|
||||
public:
|
||||
virtual item_definition_index_t GetDefinitionIndex( void ) const = 0;
|
||||
virtual const char* GetPrefabName( void ) const = 0;
|
||||
virtual const char* GetItemBaseName( void ) const = 0;
|
||||
virtual const char* GetItemTypeName( void ) const = 0;
|
||||
virtual const char* GetItemDesc( void ) const = 0;
|
||||
virtual const char* GetInventoryImage( void ) const = 0;
|
||||
virtual const char* GetBasePlayerDisplayModel() const = 0;
|
||||
virtual const char* GetWorldDisplayModel() const = 0;
|
||||
virtual const char* GetExtraWearableModel( void ) const = 0;
|
||||
virtual int GetLoadoutSlot( void ) const = 0;
|
||||
virtual KeyValues* GetRawDefinition( void ) const = 0;
|
||||
virtual int GetHeroID( void ) const = 0;
|
||||
virtual uint8 GetRarity( void ) const = 0;
|
||||
virtual const CUtlVector< int >& GetItemSets( void ) const = 0;
|
||||
|
||||
virtual int GetBundleItemCount( void ) const = 0;
|
||||
virtual int GetBundleItem( int iIndex ) const = 0;
|
||||
|
||||
virtual bool IsBaseItem( void ) const = 0;
|
||||
virtual bool IsPublicItem( void ) const = 0;
|
||||
virtual bool IsBundle( void ) const = 0;
|
||||
virtual bool IsPackBundle( void ) const = 0;
|
||||
virtual bool IsPackItem( void ) const = 0;
|
||||
|
||||
virtual void BInitVisualBlockFromKV( KeyValues *pKVItem, IEconItemSchema &pschema, CUtlVector<CUtlString> *pVecErrors = NULL ) = 0;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Item Schema
|
||||
//-----------------------------------------------------------------------------
|
||||
class IEconItemSchema
|
||||
{
|
||||
public:
|
||||
// Schema Parsing
|
||||
virtual bool BInit( const char *fileName, const char *pathID, CUtlVector<CUtlString> *pVecErrors = NULL ) = 0;
|
||||
virtual bool BInitLootLists( KeyValues *pKVLootLists, KeyValues *pKVRandomAttributeTemplates, CUtlVector<CUtlString> *pVecErrors, bool bServerLists ) = 0;
|
||||
|
||||
virtual KeyValues* GetRawDefinition( void ) const = 0;
|
||||
|
||||
virtual int GetItemDefinitionCount() = 0;
|
||||
virtual IEconItemDefinition* GetItemDefinitionInterface( int iDefIndex ) = 0;
|
||||
virtual IEconItemDefinition* GetDefaultItemDefinitionInterface() = 0;
|
||||
|
||||
virtual int GetLoadoutSlotCount() = 0;
|
||||
virtual const char* GetLoadoutSlotName( int iSlot ) = 0;
|
||||
virtual int GetLoadoutSlot( const char* pszSlotName ) = 0;
|
||||
virtual int GetCharacterSlotType( int iCharacter, int iSlot ) = 0;
|
||||
virtual int GetCharacterID( const char* pszCharacterName ) = 0;
|
||||
virtual int GetCharacterCount( void ) = 0;
|
||||
virtual const char* GetCharacterName( int iCharacter ) = 0;
|
||||
virtual const char* GetCharacterModel( int iCharacter ) = 0;
|
||||
|
||||
// Particle Systems
|
||||
virtual attachedparticlesystem_t* GetAttributeControlledParticleSystem( int id ) = 0;
|
||||
virtual attachedparticlesystem_t* GetAttributeControlledParticleSystemByIndex( int id ) = 0;
|
||||
virtual attachedparticlesystem_t* FindAttributeControlledParticleSystem( const char *pchSystemName, int *outID = NULL ) = 0;
|
||||
virtual int GetNumAttributeControlledParticleSystems() const = 0;
|
||||
|
||||
// Quality
|
||||
virtual int GetQualityDefinitionCount( void ) = 0;
|
||||
virtual const char* GetQualityName( uint8 iQuality ) = 0;
|
||||
virtual int GetQualityIndex( const char* pszQuality ) = 0;
|
||||
|
||||
// Rarity
|
||||
virtual int GetRarityDefinitionCount( void ) const = 0;
|
||||
virtual const char* GetRarityName( uint8 iRarity ) = 0;
|
||||
virtual const char* GetRarityLocKey( uint8 iRarity ) = 0;
|
||||
virtual const char* GetRarityColor( uint8 iRarity ) = 0;
|
||||
virtual const char* GetRarityLootList( uint8 iRarity ) = 0;
|
||||
virtual int GetRarityIndex( const char* pszRarity ) = 0;
|
||||
|
||||
// Attributes
|
||||
virtual const IEconItemAttributeDefinition *GetAttributeDefinitionInterface( int iAttribIndex ) const = 0;
|
||||
|
||||
// Item Sets
|
||||
virtual int GetItemSetCount( void ) const = 0;
|
||||
virtual const IEconItemSetDefinition* GetItemSet( int iIndex ) const = 0;
|
||||
|
||||
// Loot Lists
|
||||
virtual void PurgeLootLists( void ) = 0;
|
||||
virtual const IEconLootListDefinition* GetLootListInterfaceByName( const char* pListName, int *out_piIndex = NULL ) = 0;
|
||||
virtual const IEconLootListDefinition* GetLootListInterfaceByIndex( int iIdx ) const = 0;
|
||||
virtual const int GetLootListIndex( const char* pListName ) = 0;
|
||||
virtual const int GetLootListInterfaceCount( void ) const = 0;
|
||||
|
||||
virtual KeyValues *FindDefinitionPrefabByName( const char *pszPrefabName ) const = 0;
|
||||
|
||||
// Schema Init, for Editing
|
||||
virtual attachedparticlesystem_t GetAttachedParticleSystemInfo( KeyValues* pParticleSystemKV, int32 nItemIndex ) const = 0;
|
||||
virtual bool BInitAttributeControlledParticleSystems( KeyValues *pKVParticleSystems, CUtlVector<CUtlString> *pVecErrors ) = 0;
|
||||
virtual bool BInitItems( KeyValues *pKVAttributes, CUtlVector<CUtlString> *pVecErrors ) = 0;
|
||||
virtual bool BInitItemSets( KeyValues *pKVItemSets, CUtlVector<CUtlString> *pVecErrors ) = 0;
|
||||
|
||||
virtual bool DeleteItemDefinition( int iDefIndex ) = 0;
|
||||
|
||||
// Iterating over the item definitions.
|
||||
virtual CEconItemDefinition *GetItemDefinitionByName( const char *pszDefName ) = 0;
|
||||
virtual const CEconItemDefinition *GetItemDefinitionByName( const char *pszDefName ) const = 0;
|
||||
|
||||
#if defined(CLIENT_DLL) || defined(GAME_DLL) || defined(CLIENT_EDITOR_DLL)
|
||||
virtual void ItemTesting_CreateTestDefinition( int iCloneFromItemDef, int iNewDef, KeyValues *pNewKV ) = 0;
|
||||
virtual void ItemTesting_DiscardTestDefinition( int iDef ) = 0;
|
||||
#endif
|
||||
|
||||
// sound materials
|
||||
virtual const char* GetSoundMaterialNameByID( int nSoundMaterialID ) = 0;
|
||||
virtual int GetSoundMaterialID( const char* pszSoundMaterial ) = 0;
|
||||
|
||||
// iterating sound materials
|
||||
virtual int GetSoundMaterialCount( void ) = 0;
|
||||
virtual int GetSoundMaterialIDByIndex( int nIndex ) = 0; // returns the Nth sound material ID
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Item System
|
||||
//-----------------------------------------------------------------------------
|
||||
class IEconItemSystem
|
||||
{
|
||||
public:
|
||||
virtual IEconItemSchema* GetItemSchemaInterface() = 0;
|
||||
|
||||
// Item Reservations
|
||||
virtual void RequestReservedItemDefinitionList() = 0;
|
||||
virtual void ReserveItemDefinition( uint32 nDefIndex, const char* pszUserName ) = 0;
|
||||
virtual void ReleaseItemDefReservation( uint32 nDefIndex, const char* pszUserName ) = 0;
|
||||
};
|
||||
|
||||
#endif // __ECON_ITEM_SYSTEM_INTERFACE_H
|
||||
29
public/game/shared/portal2/paint_enum.h
Normal file
29
public/game/shared/portal2/paint_enum.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef PAINT_ENUM_H
|
||||
#define PAINT_ENUM_H
|
||||
|
||||
//=============================================================================
|
||||
// Paint Power Type Constants
|
||||
// Note: This ordering is currently used for priority when determining the
|
||||
// active paint power, so keep that in mind when modifying it.
|
||||
//=============================================================================
|
||||
enum PaintPowerType
|
||||
{
|
||||
BOUNCE_POWER,
|
||||
REFLECT_POWER,
|
||||
SPEED_POWER,
|
||||
|
||||
// Add new powers here
|
||||
PORTAL_POWER,
|
||||
|
||||
|
||||
NO_POWER,
|
||||
PAINT_POWER_TYPE_COUNT = NO_POWER, // Note: Do not change this. We almost always
|
||||
PAINT_POWER_TYPE_COUNT_PLUS_NO_POWER, // just want the actual number of powers, but
|
||||
// in PaintPowerUser the array of deactivating
|
||||
// powers has an extra slot, so we don't have to
|
||||
// branch to queue up the active power for
|
||||
// deactivation (the active power can be NO_POWER).
|
||||
INVALID_PAINT_POWER
|
||||
};
|
||||
|
||||
#endif // PAINT_ENUM_H
|
||||
Reference in New Issue
Block a user