mirror of
https://github.com/fortressforever/fortressforever-2013.git
synced 2024-11-23 04:42:24 +00:00
Made everything comply with the naming scheme we're going with (subject to change?)
- All classes are named CFF_<CL/SV/SH>_ClassName - All files are named ff_<cl/sv/sh>_filename Conflicts: mp/src/game/shared/ff/ff_sh_scriptman.h
This commit is contained in:
parent
03ec8eec87
commit
2c2d486a9d
25 changed files with 232 additions and 225 deletions
|
@ -569,7 +569,7 @@ private:
|
||||||
friend class CDODGameMovement;
|
friend class CDODGameMovement;
|
||||||
friend class CPortalGameMovement;
|
friend class CPortalGameMovement;
|
||||||
// FF -->
|
// FF -->
|
||||||
friend class C_FF_SH_GameMovement;
|
friend class CFF_SH_GameMovement;
|
||||||
// FF <--
|
// FF <--
|
||||||
|
|
||||||
// Accessors for gamemovement
|
// Accessors for gamemovement
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "gamestringpool.h"
|
#include "gamestringpool.h"
|
||||||
|
|
||||||
#ifdef HL2MP
|
#ifdef HL2MP
|
||||||
#include "ff_gamerules_shared.h"
|
#include "ff_sh_gamerules.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// memdbgon must be the last include file in a .cpp file!!!
|
// memdbgon must be the last include file in a .cpp file!!!
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "c_hl2mp_player.h"
|
#include "c_hl2mp_player.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
#include "takedamageinfo.h"
|
#include "takedamageinfo.h"
|
||||||
#include "ff_gamerules_shared.h"
|
#include "ff_sh_gamerules.h"
|
||||||
#include "in_buttons.h"
|
#include "in_buttons.h"
|
||||||
#include "iviewrender_beams.h" // flashlight beam
|
#include "iviewrender_beams.h" // flashlight beam
|
||||||
#include "r_efx.h"
|
#include "r_efx.h"
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include "c_team.h"
|
#include "c_team.h"
|
||||||
#include "c_playerresource.h"
|
#include "c_playerresource.h"
|
||||||
#include "c_hl2mp_player.h"
|
#include "c_hl2mp_player.h"
|
||||||
#include "ff_gamerules_shared.h"
|
#include "ff_sh_gamerules.h"
|
||||||
#include "ihudlcd.h"
|
#include "ihudlcd.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "vgui_entitypanel.h"
|
#include "vgui_entitypanel.h"
|
||||||
#include "iclientmode.h"
|
#include "iclientmode.h"
|
||||||
#include "vgui/ILocalize.h"
|
#include "vgui/ILocalize.h"
|
||||||
#include "ff_gamerules_shared.h"
|
#include "ff_sh_gamerules.h"
|
||||||
|
|
||||||
// memdbgon must be the last include file in a .cpp file!!!
|
// memdbgon must be the last include file in a .cpp file!!!
|
||||||
#include "tier0/memdbgon.h"
|
#include "tier0/memdbgon.h"
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "vgui_entitypanel.h"
|
#include "vgui_entitypanel.h"
|
||||||
#include "iclientmode.h"
|
#include "iclientmode.h"
|
||||||
#include "vgui/ILocalize.h"
|
#include "vgui/ILocalize.h"
|
||||||
#include "ff_gamerules_shared.h"
|
#include "ff_sh_gamerules.h"
|
||||||
#include "c_team.h"
|
#include "c_team.h"
|
||||||
#include <vgui_controls/AnimationController.h>
|
#include <vgui_controls/AnimationController.h>
|
||||||
// memdbgon must be the last include file in a .cpp file!!!
|
// memdbgon must be the last include file in a .cpp file!!!
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "c_team.h"
|
#include "c_team.h"
|
||||||
#include "c_playerresource.h"
|
#include "c_playerresource.h"
|
||||||
#include "c_hl2mp_player.h"
|
#include "c_hl2mp_player.h"
|
||||||
#include "ff_gamerules_shared.h"
|
#include "ff_sh_gamerules.h"
|
||||||
|
|
||||||
#include <KeyValues.h>
|
#include <KeyValues.h>
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "func_break.h"
|
#include "func_break.h"
|
||||||
|
|
||||||
#ifdef HL2MP
|
#ifdef HL2MP
|
||||||
#include "ff_gamerules_shared.h"
|
#include "ff_sh_gamerules.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// memdbgon must be the last include file in a .cpp file!!!
|
// memdbgon must be the last include file in a .cpp file!!!
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
#include "cbase.h"
|
#include "cbase.h"
|
||||||
#include "hl2mp_player.h"
|
#include "hl2mp_player.h"
|
||||||
#include "ff_gamerules_shared.h"
|
#include "ff_sh_gamerules.h"
|
||||||
#include "gamerules.h"
|
#include "gamerules.h"
|
||||||
#include "teamplay_gamerules.h"
|
#include "teamplay_gamerules.h"
|
||||||
#include "entitylist.h"
|
#include "entitylist.h"
|
||||||
|
@ -196,6 +196,6 @@ void GameStartFrame( void )
|
||||||
void InstallGameRules()
|
void InstallGameRules()
|
||||||
{
|
{
|
||||||
// vanilla deathmatch
|
// vanilla deathmatch
|
||||||
CreateGameRulesObject( "CFFRules" );
|
CreateGameRulesObject( "CFF_SH_Rules" );
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include "cbase.h"
|
#include "cbase.h"
|
||||||
#include "gameinterface.h"
|
#include "gameinterface.h"
|
||||||
#include "mapentities.h"
|
#include "mapentities.h"
|
||||||
#include "ff_gameinterface.h"
|
#include "ff_sv_gameinterface.h"
|
||||||
|
|
||||||
// memdbgon must be the last include file in a .cpp file!!!
|
// memdbgon must be the last include file in a .cpp file!!!
|
||||||
#include "tier0/memdbgon.h"
|
#include "tier0/memdbgon.h"
|
|
@ -1,6 +1,6 @@
|
||||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||||
#ifndef FF_GAMEINTERFACE_H
|
#ifndef FF_SV_GAMEINTERFACE_H
|
||||||
#define FF_GAMEINTERFACE_H
|
#define FF_SV_GAMEINTERFACE_H
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
|
@ -13,7 +13,7 @@
|
||||||
#include "hl2mp_player_shared.h"
|
#include "hl2mp_player_shared.h"
|
||||||
#include "predicted_viewmodel.h"
|
#include "predicted_viewmodel.h"
|
||||||
#include "in_buttons.h"
|
#include "in_buttons.h"
|
||||||
#include "ff_gamerules_shared.h"
|
#include "ff_sh_gamerules.h"
|
||||||
#include "KeyValues.h"
|
#include "KeyValues.h"
|
||||||
#include "team.h"
|
#include "team.h"
|
||||||
#include "weapon_hl2mpbase.h"
|
#include "weapon_hl2mpbase.h"
|
||||||
|
|
|
@ -17,7 +17,7 @@ class CHL2MP_Player;
|
||||||
#include "simtimer.h"
|
#include "simtimer.h"
|
||||||
#include "soundenvelope.h"
|
#include "soundenvelope.h"
|
||||||
#include "hl2mp_player_shared.h"
|
#include "hl2mp_player_shared.h"
|
||||||
#include "ff_gamerules_shared.h"
|
#include "ff_sh_gamerules.h"
|
||||||
#include "utldict.h"
|
#include "utldict.h"
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "world.h"
|
#include "world.h"
|
||||||
|
|
||||||
#ifdef HL2MP
|
#ifdef HL2MP
|
||||||
#include "ff_gamerules_shared.h"
|
#include "ff_sh_gamerules.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// memdbgon must be the last include file in a .cpp file!!!
|
// memdbgon must be the last include file in a .cpp file!!!
|
||||||
|
|
|
@ -1138,7 +1138,7 @@ protected:
|
||||||
friend class CDODGameMovement;
|
friend class CDODGameMovement;
|
||||||
friend class CPortalGameMovement;
|
friend class CPortalGameMovement;
|
||||||
// FF -->
|
// FF -->
|
||||||
friend class C_FF_SH_GameMovement;
|
friend class CFF_SH_GameMovement;
|
||||||
// FF <--
|
// FF <--
|
||||||
|
|
||||||
// Accessors for gamemovement
|
// Accessors for gamemovement
|
||||||
|
|
|
@ -34,9 +34,9 @@ $Project "Server (FF)"
|
||||||
// for FF Shared, see game\shared\ff\ff_shared.vpc
|
// for FF Shared, see game\shared\ff\ff_shared.vpc
|
||||||
$Folder "FF"
|
$Folder "FF"
|
||||||
{
|
{
|
||||||
$File "FF\ff_client.cpp"
|
$File "FF\ff_sv_client.cpp"
|
||||||
$File "FF\ff_gameinterface.cpp"
|
$File "FF\ff_sv_gameinterface.cpp"
|
||||||
$File "FF\ff_gameinterface.h"
|
$File "FF\ff_sv_gameinterface.h"
|
||||||
|
|
||||||
$Folder "Libraries"
|
$Folder "Libraries"
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "gameweaponmanager.h"
|
#include "gameweaponmanager.h"
|
||||||
|
|
||||||
#ifdef HL2MP
|
#ifdef HL2MP
|
||||||
#include "ff_gamerules_shared.h"
|
#include "ff_sh_gamerules.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -11,7 +11,7 @@ ConVar sv_sharkingfriction("sv_sharkingfriction", "1", FCVAR_REPLICATED);
|
||||||
#define SV_SHARKINGFRICTION sv_sharkingfriction.GetFloat()
|
#define SV_SHARKINGFRICTION sv_sharkingfriction.GetFloat()
|
||||||
|
|
||||||
// debug purposes
|
// debug purposes
|
||||||
void C_FF_SH_GameMovement::PlayerMove( void )
|
void CFF_SH_GameMovement::PlayerMove( void )
|
||||||
{
|
{
|
||||||
static float flLastSurfaceFriction = -1.0f;
|
static float flLastSurfaceFriction = -1.0f;
|
||||||
if (player->m_surfaceFriction != flLastSurfaceFriction)
|
if (player->m_surfaceFriction != flLastSurfaceFriction)
|
||||||
|
@ -23,7 +23,7 @@ void C_FF_SH_GameMovement::PlayerMove( void )
|
||||||
BaseClass::PlayerMove();
|
BaseClass::PlayerMove();
|
||||||
}
|
}
|
||||||
|
|
||||||
void C_FF_SH_GameMovement::OnLand( float flFallVelocity )
|
void CFF_SH_GameMovement::OnLand( float flFallVelocity )
|
||||||
{
|
{
|
||||||
BaseClass::OnLand( flFallVelocity );
|
BaseClass::OnLand( flFallVelocity );
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ void C_FF_SH_GameMovement::OnLand( float flFallVelocity )
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void C_FF_SH_GameMovement::PlayerRoughLandingEffects( float fvol )
|
void CFF_SH_GameMovement::PlayerRoughLandingEffects( float fvol )
|
||||||
{
|
{
|
||||||
if ( fvol > 0.0 )
|
if ( fvol > 0.0 )
|
||||||
{
|
{
|
||||||
|
@ -106,7 +106,7 @@ void C_FF_SH_GameMovement::PlayerRoughLandingEffects( float fvol )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void C_FF_SH_GameMovement::FinishUnDuck( void )
|
void CFF_SH_GameMovement::FinishUnDuck( void )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
trace_t trace;
|
trace_t trace;
|
||||||
|
@ -189,7 +189,7 @@ void C_FF_SH_GameMovement::FinishUnDuck( void )
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void C_FF_SH_GameMovement::Duck( void )
|
void CFF_SH_GameMovement::Duck( void )
|
||||||
{
|
{
|
||||||
// FF TODO: Port these changes, this function was totally rewritten
|
// FF TODO: Port these changes, this function was totally rewritten
|
||||||
/*
|
/*
|
||||||
|
@ -507,7 +507,7 @@ void C_FF_SH_GameMovement::Duck( void )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expose our interface.
|
// Expose our interface.
|
||||||
static C_FF_SH_GameMovement g_GameMovement;
|
static CFF_SH_GameMovement g_GameMovement;
|
||||||
IGameMovement *g_pGameMovement = ( IGameMovement * )&g_GameMovement;
|
IGameMovement *g_pGameMovement = ( IGameMovement * )&g_GameMovement;
|
||||||
|
|
||||||
EXPOSE_SINGLE_INTERFACE_GLOBALVAR( C_FF_SH_GameMovement, IGameMovement, INTERFACENAME_GAMEMOVEMENT, g_GameMovement );
|
EXPOSE_SINGLE_INTERFACE_GLOBALVAR( CFF_SH_GameMovement, IGameMovement, INTERFACENAME_GAMEMOVEMENT, g_GameMovement );
|
|
@ -8,12 +8,12 @@
|
||||||
|
|
||||||
class CBasePlayer;
|
class CBasePlayer;
|
||||||
|
|
||||||
class C_FF_SH_GameMovement : public CGameMovement
|
class CFF_SH_GameMovement : public CGameMovement
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(C_FF_SH_GameMovement, CGameMovement);
|
DECLARE_CLASS(CFF_SH_GameMovement, CGameMovement);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
C_FF_SH_GameMovement() {};
|
CFF_SH_GameMovement() {};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Catches all landings
|
/// Catches all landings
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// $NoKeywords: $
|
// $NoKeywords: $
|
||||||
//=============================================================================//
|
//=============================================================================//
|
||||||
#include "cbase.h"
|
#include "cbase.h"
|
||||||
#include "ff_gamerules_shared.h"
|
#include "ff_sh_gamerules.h"
|
||||||
#include "viewport_panel_names.h"
|
#include "viewport_panel_names.h"
|
||||||
#include "gameeventdefs.h"
|
#include "gameeventdefs.h"
|
||||||
#include <KeyValues.h>
|
#include <KeyValues.h>
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
#include "weapon_hl2mpbasehlmpcombatweapon.h"
|
#include "weapon_hl2mpbasehlmpcombatweapon.h"
|
||||||
#include "team.h"
|
#include "team.h"
|
||||||
#include "voice_gamemgr.h"
|
#include "voice_gamemgr.h"
|
||||||
#include "ff_gameinterface.h"
|
#include "ff_sv_gameinterface.h"
|
||||||
#include "hl2mp_cvars.h"
|
#include "hl2mp_cvars.h"
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -55,9 +55,9 @@ extern CBaseEntity *g_pLastRebelSpawn;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
REGISTER_GAMERULES_CLASS( CFFRules );
|
REGISTER_GAMERULES_CLASS( CFF_SH_Rules );
|
||||||
|
|
||||||
BEGIN_NETWORK_TABLE_NOBASE( CFFRules, DT_FFRules )
|
BEGIN_NETWORK_TABLE_NOBASE( CFF_SH_Rules, DT_FFRules )
|
||||||
|
|
||||||
#ifdef CLIENT_DLL
|
#ifdef CLIENT_DLL
|
||||||
RecvPropBool( RECVINFO( m_bTeamPlayEnabled ) ),
|
RecvPropBool( RECVINFO( m_bTeamPlayEnabled ) ),
|
||||||
|
@ -68,8 +68,12 @@ BEGIN_NETWORK_TABLE_NOBASE( CFFRules, DT_FFRules )
|
||||||
END_NETWORK_TABLE()
|
END_NETWORK_TABLE()
|
||||||
|
|
||||||
|
|
||||||
LINK_ENTITY_TO_CLASS( ff_gamerules, CFFGameRulesProxy );
|
LINK_ENTITY_TO_CLASS( ff_gamerules, CFF_SH_GameRulesProxy );
|
||||||
IMPLEMENT_NETWORKCLASS_ALIASED( FFGameRulesProxy, DT_FFGameRulesProxy )
|
#ifdef CLIENT_DLL
|
||||||
|
IMPLEMENT_CLIENTCLASS( CFF_CL_GameRulesProxy, DT_FFGameRulesProxy, CFF_SV_GameRulesProxy )
|
||||||
|
#else
|
||||||
|
IMPLEMENT_SERVERCLASS( CFF_SV_GameRulesProxy, DT_FFGameRulesProxy )
|
||||||
|
#endif
|
||||||
|
|
||||||
static FFViewVectors g_FFViewVectors(
|
static FFViewVectors g_FFViewVectors(
|
||||||
Vector( 0, 0, 64 ), //VEC_VIEW (m_vView)
|
Vector( 0, 0, 64 ), //VEC_VIEW (m_vView)
|
||||||
|
@ -138,23 +142,23 @@ static const char *s_PreserveEnts[] =
|
||||||
#ifdef CLIENT_DLL
|
#ifdef CLIENT_DLL
|
||||||
void RecvProxy_FFRules( const RecvProp *pProp, void **pOut, void *pData, int objectID )
|
void RecvProxy_FFRules( const RecvProp *pProp, void **pOut, void *pData, int objectID )
|
||||||
{
|
{
|
||||||
CFFRules *pRules = FFRules();
|
CFF_SH_Rules *pRules = FFRules();
|
||||||
Assert( pRules );
|
Assert( pRules );
|
||||||
*pOut = pRules;
|
*pOut = pRules;
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_RECV_TABLE( CFFGameRulesProxy, DT_FFGameRulesProxy )
|
BEGIN_RECV_TABLE( CFF_SH_GameRulesProxy, DT_FFGameRulesProxy )
|
||||||
RecvPropDataTable( "ff_gamerules_data", 0, 0, &REFERENCE_RECV_TABLE( DT_FFRules ), RecvProxy_FFRules )
|
RecvPropDataTable( "ff_gamerules_data", 0, 0, &REFERENCE_RECV_TABLE( DT_FFRules ), RecvProxy_FFRules )
|
||||||
END_RECV_TABLE()
|
END_RECV_TABLE()
|
||||||
#else
|
#else
|
||||||
void* SendProxy_FFRules( const SendProp *pProp, const void *pStructBase, const void *pData, CSendProxyRecipients *pRecipients, int objectID )
|
void* SendProxy_FFRules( const SendProp *pProp, const void *pStructBase, const void *pData, CSendProxyRecipients *pRecipients, int objectID )
|
||||||
{
|
{
|
||||||
CFFRules *pRules = FFRules();
|
CFF_SH_Rules *pRules = FFRules();
|
||||||
Assert( pRules );
|
Assert( pRules );
|
||||||
return pRules;
|
return pRules;
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_SEND_TABLE( CFFGameRulesProxy, DT_FFGameRulesProxy )
|
BEGIN_SEND_TABLE( CFF_SH_GameRulesProxy, DT_FFGameRulesProxy )
|
||||||
SendPropDataTable( "ff_gamerules_data", 0, &REFERENCE_SEND_TABLE( DT_FFRules ), SendProxy_FFRules )
|
SendPropDataTable( "ff_gamerules_data", 0, &REFERENCE_SEND_TABLE( DT_FFRules ), SendProxy_FFRules )
|
||||||
END_SEND_TABLE()
|
END_SEND_TABLE()
|
||||||
#endif
|
#endif
|
||||||
|
@ -183,7 +187,7 @@ char *sTeamNames[] =
|
||||||
"Rebels",
|
"Rebels",
|
||||||
};
|
};
|
||||||
|
|
||||||
CFFRules::CFFRules()
|
CFF_SH_Rules::CFF_SH_Rules()
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
// Create the team managers
|
// Create the team managers
|
||||||
|
@ -210,17 +214,17 @@ CFFRules::CFFRules()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
const CViewVectors* CFFRules::GetViewVectors()const
|
const CViewVectors* CFF_SH_Rules::GetViewVectors()const
|
||||||
{
|
{
|
||||||
return &g_FFViewVectors;
|
return &g_FFViewVectors;
|
||||||
}
|
}
|
||||||
|
|
||||||
const FFViewVectors* CFFRules::GetFFViewVectors()const
|
const FFViewVectors* CFF_SH_Rules::GetFFViewVectors()const
|
||||||
{
|
{
|
||||||
return &g_FFViewVectors;
|
return &g_FFViewVectors;
|
||||||
}
|
}
|
||||||
|
|
||||||
CFFRules::~CFFRules( void )
|
CFF_SH_Rules::~CFF_SH_Rules( void )
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
// Note, don't delete each team since they are in the gEntList and will
|
// Note, don't delete each team since they are in the gEntList and will
|
||||||
|
@ -229,7 +233,7 @@ CFFRules::~CFFRules( void )
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFFRules::CreateStandardEntities( void )
|
void CFF_SH_Rules::CreateStandardEntities( void )
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
|
@ -252,7 +256,7 @@ void CFFRules::CreateStandardEntities( void )
|
||||||
// FlWeaponRespawnTime - what is the time in the future
|
// FlWeaponRespawnTime - what is the time in the future
|
||||||
// at which this weapon may spawn?
|
// at which this weapon may spawn?
|
||||||
//=========================================================
|
//=========================================================
|
||||||
float CFFRules::FlWeaponRespawnTime( CBaseCombatWeapon *pWeapon )
|
float CFF_SH_Rules::FlWeaponRespawnTime( CBaseCombatWeapon *pWeapon )
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
if ( weaponstay.GetInt() > 0 )
|
if ( weaponstay.GetInt() > 0 )
|
||||||
|
@ -271,7 +275,7 @@ float CFFRules::FlWeaponRespawnTime( CBaseCombatWeapon *pWeapon )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CFFRules::IsIntermission( void )
|
bool CFF_SH_Rules::IsIntermission( void )
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
return m_flIntermissionEndTime > gpGlobals->curtime;
|
return m_flIntermissionEndTime > gpGlobals->curtime;
|
||||||
|
@ -280,7 +284,7 @@ bool CFFRules::IsIntermission( void )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFFRules::PlayerKilled( CBasePlayer *pVictim, const CTakeDamageInfo &info )
|
void CFF_SH_Rules::PlayerKilled( CBasePlayer *pVictim, const CTakeDamageInfo &info )
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
if ( IsIntermission() )
|
if ( IsIntermission() )
|
||||||
|
@ -290,7 +294,7 @@ void CFFRules::PlayerKilled( CBasePlayer *pVictim, const CTakeDamageInfo &info )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CFFRules::Think( void )
|
void CFF_SH_Rules::Think( void )
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
|
@ -376,7 +380,7 @@ void CFFRules::Think( void )
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFFRules::GoToIntermission( void )
|
void CFF_SH_Rules::GoToIntermission( void )
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
if ( g_fGameOver )
|
if ( g_fGameOver )
|
||||||
|
@ -400,7 +404,7 @@ void CFFRules::GoToIntermission( void )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CFFRules::CheckGameOver()
|
bool CFF_SH_Rules::CheckGameOver()
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
if ( g_fGameOver ) // someone else quit the game already
|
if ( g_fGameOver ) // someone else quit the game already
|
||||||
|
@ -427,7 +431,7 @@ bool CFFRules::CheckGameOver()
|
||||||
// now, otherwise it returns the time at which it can try
|
// now, otherwise it returns the time at which it can try
|
||||||
// to spawn again.
|
// to spawn again.
|
||||||
//=========================================================
|
//=========================================================
|
||||||
float CFFRules::FlWeaponTryRespawn( CBaseCombatWeapon *pWeapon )
|
float CFF_SH_Rules::FlWeaponTryRespawn( CBaseCombatWeapon *pWeapon )
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
if ( pWeapon && (pWeapon->GetWeaponFlags() & ITEM_FLAG_LIMITINWORLD) )
|
if ( pWeapon && (pWeapon->GetWeaponFlags() & ITEM_FLAG_LIMITINWORLD) )
|
||||||
|
@ -446,7 +450,7 @@ float CFFRules::FlWeaponTryRespawn( CBaseCombatWeapon *pWeapon )
|
||||||
// VecWeaponRespawnSpot - where should this weapon spawn?
|
// VecWeaponRespawnSpot - where should this weapon spawn?
|
||||||
// Some game variations may choose to randomize spawn locations
|
// Some game variations may choose to randomize spawn locations
|
||||||
//=========================================================
|
//=========================================================
|
||||||
Vector CFFRules::VecWeaponRespawnSpot( CBaseCombatWeapon *pWeapon )
|
Vector CFF_SH_Rules::VecWeaponRespawnSpot( CBaseCombatWeapon *pWeapon )
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
CWeaponHL2MPBase *pHL2Weapon = dynamic_cast< CWeaponHL2MPBase*>( pWeapon );
|
CWeaponHL2MPBase *pHL2Weapon = dynamic_cast< CWeaponHL2MPBase*>( pWeapon );
|
||||||
|
@ -500,7 +504,7 @@ bool GetObjectsOriginalParameters( CBaseEntity *pObject, Vector &vOriginalOrigin
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFFRules::ManageObjectRelocation( void )
|
void CFF_SH_Rules::ManageObjectRelocation( void )
|
||||||
{
|
{
|
||||||
int iTotal = m_hRespawnableItemsAndWeapons.Count();
|
int iTotal = m_hRespawnableItemsAndWeapons.Count();
|
||||||
|
|
||||||
|
@ -555,7 +559,7 @@ void CFFRules::ManageObjectRelocation( void )
|
||||||
//=========================================================
|
//=========================================================
|
||||||
//AddLevelDesignerPlacedWeapon
|
//AddLevelDesignerPlacedWeapon
|
||||||
//=========================================================
|
//=========================================================
|
||||||
void CFFRules::AddLevelDesignerPlacedObject( CBaseEntity *pEntity )
|
void CFF_SH_Rules::AddLevelDesignerPlacedObject( CBaseEntity *pEntity )
|
||||||
{
|
{
|
||||||
if ( m_hRespawnableItemsAndWeapons.Find( pEntity ) == -1 )
|
if ( m_hRespawnableItemsAndWeapons.Find( pEntity ) == -1 )
|
||||||
{
|
{
|
||||||
|
@ -566,7 +570,7 @@ void CFFRules::AddLevelDesignerPlacedObject( CBaseEntity *pEntity )
|
||||||
//=========================================================
|
//=========================================================
|
||||||
//RemoveLevelDesignerPlacedWeapon
|
//RemoveLevelDesignerPlacedWeapon
|
||||||
//=========================================================
|
//=========================================================
|
||||||
void CFFRules::RemoveLevelDesignerPlacedObject( CBaseEntity *pEntity )
|
void CFF_SH_Rules::RemoveLevelDesignerPlacedObject( CBaseEntity *pEntity )
|
||||||
{
|
{
|
||||||
if ( m_hRespawnableItemsAndWeapons.Find( pEntity ) != -1 )
|
if ( m_hRespawnableItemsAndWeapons.Find( pEntity ) != -1 )
|
||||||
{
|
{
|
||||||
|
@ -578,7 +582,7 @@ void CFFRules::RemoveLevelDesignerPlacedObject( CBaseEntity *pEntity )
|
||||||
// Where should this item respawn?
|
// Where should this item respawn?
|
||||||
// Some game variations may choose to randomize spawn locations
|
// Some game variations may choose to randomize spawn locations
|
||||||
//=========================================================
|
//=========================================================
|
||||||
Vector CFFRules::VecItemRespawnSpot( CItem *pItem )
|
Vector CFF_SH_Rules::VecItemRespawnSpot( CItem *pItem )
|
||||||
{
|
{
|
||||||
return pItem->GetOriginalSpawnOrigin();
|
return pItem->GetOriginalSpawnOrigin();
|
||||||
}
|
}
|
||||||
|
@ -586,7 +590,7 @@ Vector CFFRules::VecItemRespawnSpot( CItem *pItem )
|
||||||
//=========================================================
|
//=========================================================
|
||||||
// What angles should this item use to respawn?
|
// What angles should this item use to respawn?
|
||||||
//=========================================================
|
//=========================================================
|
||||||
QAngle CFFRules::VecItemRespawnAngles( CItem *pItem )
|
QAngle CFF_SH_Rules::VecItemRespawnAngles( CItem *pItem )
|
||||||
{
|
{
|
||||||
return pItem->GetOriginalSpawnAngles();
|
return pItem->GetOriginalSpawnAngles();
|
||||||
}
|
}
|
||||||
|
@ -594,7 +598,7 @@ QAngle CFFRules::VecItemRespawnAngles( CItem *pItem )
|
||||||
//=========================================================
|
//=========================================================
|
||||||
// At what time in the future may this Item respawn?
|
// At what time in the future may this Item respawn?
|
||||||
//=========================================================
|
//=========================================================
|
||||||
float CFFRules::FlItemRespawnTime( CItem *pItem )
|
float CFF_SH_Rules::FlItemRespawnTime( CItem *pItem )
|
||||||
{
|
{
|
||||||
return sv_hl2mp_item_respawn_time.GetFloat();
|
return sv_hl2mp_item_respawn_time.GetFloat();
|
||||||
}
|
}
|
||||||
|
@ -604,7 +608,7 @@ float CFFRules::FlItemRespawnTime( CItem *pItem )
|
||||||
// CanHaveWeapon - returns false if the player is not allowed
|
// CanHaveWeapon - returns false if the player is not allowed
|
||||||
// to pick up this weapon
|
// to pick up this weapon
|
||||||
//=========================================================
|
//=========================================================
|
||||||
bool CFFRules::CanHavePlayerItem( CBasePlayer *pPlayer, CBaseCombatWeapon *pItem )
|
bool CFF_SH_Rules::CanHavePlayerItem( CBasePlayer *pPlayer, CBaseCombatWeapon *pItem )
|
||||||
{
|
{
|
||||||
if ( weaponstay.GetInt() > 0 )
|
if ( weaponstay.GetInt() > 0 )
|
||||||
{
|
{
|
||||||
|
@ -621,7 +625,7 @@ bool CFFRules::CanHavePlayerItem( CBasePlayer *pPlayer, CBaseCombatWeapon *pItem
|
||||||
// WeaponShouldRespawn - any conditions inhibiting the
|
// WeaponShouldRespawn - any conditions inhibiting the
|
||||||
// respawning of this weapon?
|
// respawning of this weapon?
|
||||||
//=========================================================
|
//=========================================================
|
||||||
int CFFRules::WeaponShouldRespawn( CBaseCombatWeapon *pWeapon )
|
int CFF_SH_Rules::WeaponShouldRespawn( CBaseCombatWeapon *pWeapon )
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
if ( pWeapon->HasSpawnFlags( SF_NORESPAWN ) )
|
if ( pWeapon->HasSpawnFlags( SF_NORESPAWN ) )
|
||||||
|
@ -636,7 +640,7 @@ int CFFRules::WeaponShouldRespawn( CBaseCombatWeapon *pWeapon )
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: Player has just left the game
|
// Purpose: Player has just left the game
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void CFFRules::ClientDisconnected( edict_t *pClient )
|
void CFF_SH_Rules::ClientDisconnected( edict_t *pClient )
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
// Msg( "CLIENT DISCONNECTED, REMOVING FROM TEAM.\n" );
|
// Msg( "CLIENT DISCONNECTED, REMOVING FROM TEAM.\n" );
|
||||||
|
@ -660,7 +664,7 @@ void CFFRules::ClientDisconnected( edict_t *pClient )
|
||||||
//=========================================================
|
//=========================================================
|
||||||
// Deathnotice.
|
// Deathnotice.
|
||||||
//=========================================================
|
//=========================================================
|
||||||
void CFFRules::DeathNotice( CBasePlayer *pVictim, const CTakeDamageInfo &info )
|
void CFF_SH_Rules::DeathNotice( CBasePlayer *pVictim, const CTakeDamageInfo &info )
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
// Work out what killed the player, and send a message to all clients about it
|
// Work out what killed the player, and send a message to all clients about it
|
||||||
|
@ -756,7 +760,7 @@ void CFFRules::DeathNotice( CBasePlayer *pVictim, const CTakeDamageInfo &info )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFFRules::ClientSettingsChanged( CBasePlayer *pPlayer )
|
void CFF_SH_Rules::ClientSettingsChanged( CBasePlayer *pPlayer )
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
|
|
||||||
|
@ -819,7 +823,7 @@ void CFFRules::ClientSettingsChanged( CBasePlayer *pPlayer )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CFFRules::PlayerRelationship( CBaseEntity *pPlayer, CBaseEntity *pTarget )
|
int CFF_SH_Rules::PlayerRelationship( CBaseEntity *pPlayer, CBaseEntity *pTarget )
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
// half life multiplay has a simple concept of Player Relationships.
|
// half life multiplay has a simple concept of Player Relationships.
|
||||||
|
@ -836,7 +840,7 @@ int CFFRules::PlayerRelationship( CBaseEntity *pPlayer, CBaseEntity *pTarget )
|
||||||
return GR_NOTTEAMMATE;
|
return GR_NOTTEAMMATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *CFFRules::GetGameDescription( void )
|
const char *CFF_SH_Rules::GetGameDescription( void )
|
||||||
{
|
{
|
||||||
if ( IsTeamplay() )
|
if ( IsTeamplay() )
|
||||||
return "Team Deathmatch";
|
return "Team Deathmatch";
|
||||||
|
@ -844,12 +848,12 @@ const char *CFFRules::GetGameDescription( void )
|
||||||
return "Deathmatch";
|
return "Deathmatch";
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CFFRules::IsConnectedUserInfoChangeAllowed( CBasePlayer *pPlayer )
|
bool CFF_SH_Rules::IsConnectedUserInfoChangeAllowed( CBasePlayer *pPlayer )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
float CFFRules::GetMapRemainingTime()
|
float CFF_SH_Rules::GetMapRemainingTime()
|
||||||
{
|
{
|
||||||
// if timelimit is disabled, return 0
|
// if timelimit is disabled, return 0
|
||||||
if ( mp_timelimit.GetInt() <= 0 )
|
if ( mp_timelimit.GetInt() <= 0 )
|
||||||
|
@ -865,12 +869,12 @@ float CFFRules::GetMapRemainingTime()
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose:
|
// Purpose:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void CFFRules::Precache( void )
|
void CFF_SH_Rules::Precache( void )
|
||||||
{
|
{
|
||||||
CBaseEntity::PrecacheScriptSound( "AlyxEmp.Charge" );
|
CBaseEntity::PrecacheScriptSound( "AlyxEmp.Charge" );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CFFRules::ShouldCollide( int collisionGroup0, int collisionGroup1 )
|
bool CFF_SH_Rules::ShouldCollide( int collisionGroup0, int collisionGroup1 )
|
||||||
{
|
{
|
||||||
if ( collisionGroup0 > collisionGroup1 )
|
if ( collisionGroup0 > collisionGroup1 )
|
||||||
{
|
{
|
||||||
|
@ -888,7 +892,7 @@ bool CFFRules::ShouldCollide( int collisionGroup0, int collisionGroup1 )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CFFRules::ClientCommand( CBaseEntity *pEdict, const CCommand &args )
|
bool CFF_SH_Rules::ClientCommand( CBaseEntity *pEdict, const CCommand &args )
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
if( BaseClass::ClientCommand( pEdict, args ) )
|
if( BaseClass::ClientCommand( pEdict, args ) )
|
||||||
|
@ -976,7 +980,7 @@ CAmmoDef *GetAmmoDef()
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool CFFRules::FShouldSwitchWeapon( CBasePlayer *pPlayer, CBaseCombatWeapon *pWeapon )
|
bool CFF_SH_Rules::FShouldSwitchWeapon( CBasePlayer *pPlayer, CBaseCombatWeapon *pWeapon )
|
||||||
{
|
{
|
||||||
if ( pPlayer->GetActiveWeapon() && pPlayer->IsNetClient() )
|
if ( pPlayer->GetActiveWeapon() && pPlayer->IsNetClient() )
|
||||||
{
|
{
|
||||||
|
@ -995,7 +999,7 @@ CAmmoDef *GetAmmoDef()
|
||||||
|
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
|
|
||||||
void CFFRules::RestartGame()
|
void CFF_SH_Rules::RestartGame()
|
||||||
{
|
{
|
||||||
// bounds check
|
// bounds check
|
||||||
if ( mp_timelimit.GetInt() < 0 )
|
if ( mp_timelimit.GetInt() < 0 )
|
||||||
|
@ -1059,7 +1063,7 @@ void CFFRules::RestartGame()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFFRules::CleanUpMap()
|
void CFF_SH_Rules::CleanUpMap()
|
||||||
{
|
{
|
||||||
// Recreate all the map entities from the map data (preserving their indices),
|
// Recreate all the map entities from the map data (preserving their indices),
|
||||||
// then remove everything else except the players.
|
// then remove everything else except the players.
|
||||||
|
@ -1156,7 +1160,7 @@ void CFFRules::CleanUpMap()
|
||||||
MapEntity_ParseAllEntities( engine->GetMapEntitiesString(), &filter, true );
|
MapEntity_ParseAllEntities( engine->GetMapEntitiesString(), &filter, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFFRules::CheckChatForReadySignal( CHL2MP_Player *pPlayer, const char *chatmsg )
|
void CFF_SH_Rules::CheckChatForReadySignal( CHL2MP_Player *pPlayer, const char *chatmsg )
|
||||||
{
|
{
|
||||||
if( m_bAwaitingReadyRestart && FStrEq( chatmsg, mp_ready_signal.GetString() ) )
|
if( m_bAwaitingReadyRestart && FStrEq( chatmsg, mp_ready_signal.GetString() ) )
|
||||||
{
|
{
|
||||||
|
@ -1167,7 +1171,7 @@ void CFFRules::CheckChatForReadySignal( CHL2MP_Player *pPlayer, const char *chat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFFRules::CheckRestartGame( void )
|
void CFF_SH_Rules::CheckRestartGame( void )
|
||||||
{
|
{
|
||||||
// Restart the game if specified by the server
|
// Restart the game if specified by the server
|
||||||
int iRestartDelay = mp_restartgame.GetInt();
|
int iRestartDelay = mp_restartgame.GetInt();
|
||||||
|
@ -1215,7 +1219,7 @@ void CFFRules::CheckRestartGame( void )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFFRules::CheckAllPlayersReady( void )
|
void CFF_SH_Rules::CheckAllPlayersReady( void )
|
||||||
{
|
{
|
||||||
for (int i = 1; i <= gpGlobals->maxClients; i++ )
|
for (int i = 1; i <= gpGlobals->maxClients; i++ )
|
||||||
{
|
{
|
||||||
|
@ -1232,7 +1236,7 @@ void CFFRules::CheckAllPlayersReady( void )
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose:
|
// Purpose:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
const char *CFFRules::GetChatFormat( bool bTeamOnly, CBasePlayer *pPlayer )
|
const char *CFF_SH_Rules::GetChatFormat( bool bTeamOnly, CBasePlayer *pPlayer )
|
||||||
{
|
{
|
||||||
if ( !pPlayer ) // dedicated server output
|
if ( !pPlayer ) // dedicated server output
|
||||||
{
|
{
|
|
@ -11,8 +11,8 @@
|
||||||
// $NoKeywords: $
|
// $NoKeywords: $
|
||||||
//=============================================================================//
|
//=============================================================================//
|
||||||
|
|
||||||
#ifndef FF_GAMERULES_H
|
#ifndef FF_SH_GAMERULES_H
|
||||||
#define FF_GAMERULES_H
|
#define FF_SH_GAMERULES_H
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "gamerules.h"
|
#include "gamerules.h"
|
||||||
|
@ -34,14 +34,17 @@ enum
|
||||||
|
|
||||||
|
|
||||||
#ifdef CLIENT_DLL
|
#ifdef CLIENT_DLL
|
||||||
#define CFFRules C_FFRules
|
#define CFF_SH_Rules CFF_CL_Rules
|
||||||
#define CFFGameRulesProxy C_FFGameRulesProxy
|
#define CFF_SH_GameRulesProxy CFF_CL_GameRulesProxy
|
||||||
|
#else
|
||||||
|
#define CFF_SH_Rules CFF_SV_Rules
|
||||||
|
#define CFF_SH_GameRulesProxy CFF_SV_GameRulesProxy
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class CFFGameRulesProxy : public CGameRulesProxy
|
class CFF_SH_GameRulesProxy : public CGameRulesProxy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DECLARE_CLASS( CFFGameRulesProxy, CGameRulesProxy );
|
DECLARE_CLASS( CFF_SH_GameRulesProxy, CGameRulesProxy );
|
||||||
DECLARE_NETWORKCLASS();
|
DECLARE_NETWORKCLASS();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -79,10 +82,10 @@ public:
|
||||||
Vector m_vCrouchTraceMax;
|
Vector m_vCrouchTraceMax;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CFFRules : public CTeamplayRules
|
class CFF_SH_Rules : public CTeamplayRules
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DECLARE_CLASS( CFFRules, CTeamplayRules );
|
DECLARE_CLASS( CFF_SH_Rules, CTeamplayRules );
|
||||||
|
|
||||||
#ifdef CLIENT_DLL
|
#ifdef CLIENT_DLL
|
||||||
|
|
||||||
|
@ -93,8 +96,8 @@ public:
|
||||||
DECLARE_SERVERCLASS_NOBASE(); // This makes datatables able to access our private vars.
|
DECLARE_SERVERCLASS_NOBASE(); // This makes datatables able to access our private vars.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CFFRules();
|
CFF_SH_Rules();
|
||||||
virtual ~CFFRules();
|
virtual ~CFF_SH_Rules();
|
||||||
|
|
||||||
virtual void Precache( void );
|
virtual void Precache( void );
|
||||||
virtual bool ShouldCollide( int collisionGroup0, int collisionGroup1 );
|
virtual bool ShouldCollide( int collisionGroup0, int collisionGroup1 );
|
||||||
|
@ -164,9 +167,9 @@ private:
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
inline CFFRules* FFRules()
|
inline CFF_SH_Rules* FFRules()
|
||||||
{
|
{
|
||||||
return static_cast<CFFRules*>(g_pGameRules);
|
return static_cast<CFF_SH_Rules*>(g_pGameRules);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //HL2MP_GAMERULES_H
|
#endif //FF_SH_GAMERULES_H
|
|
@ -2,7 +2,7 @@
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// includes
|
// includes
|
||||||
#include "cbase.h"
|
#include "cbase.h"
|
||||||
#include "ff_scriptman_shared.h"
|
#include "ff_sh_scriptman.h"
|
||||||
//#include "ff_entity_system.h"
|
//#include "ff_entity_system.h"
|
||||||
//#include "ff_luacontext.h"
|
//#include "ff_luacontext.h"
|
||||||
//#include "ff_lualib.h"
|
//#include "ff_lualib.h"
|
||||||
|
@ -39,11 +39,11 @@ using namespace luabind;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// globals
|
// globals
|
||||||
CFFScriptManager _scriptman;
|
CFF_SH_ScriptManager _scriptman;
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
CFFScriptManager::CFFScriptManager()
|
CFF_SH_ScriptManager::CFF_SH_ScriptManager()
|
||||||
: L(NULL)
|
: L(NULL)
|
||||||
, m_isLoading(false)
|
, m_isLoading(false)
|
||||||
, m_scriptCRC(0)
|
, m_scriptCRC(0)
|
||||||
|
@ -52,14 +52,14 @@ CFFScriptManager::CFFScriptManager()
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
CFFScriptManager::~CFFScriptManager()
|
CFF_SH_ScriptManager::~CFF_SH_ScriptManager()
|
||||||
{
|
{
|
||||||
Shutdown();
|
Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
void CFFScriptManager::Shutdown()
|
void CFF_SH_ScriptManager::Shutdown()
|
||||||
{
|
{
|
||||||
m_ScriptExists = false;
|
m_ScriptExists = false;
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ void CFFScriptManager::Shutdown()
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
void CFFScriptManager::Init()
|
void CFF_SH_ScriptManager::Init()
|
||||||
{
|
{
|
||||||
// shutdown VM if already running
|
// shutdown VM if already running
|
||||||
if(L)
|
if(L)
|
||||||
|
@ -109,10 +109,10 @@ void CFFScriptManager::Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FF_DLL
|
#ifdef FF_DLL
|
||||||
void CFFScriptManager::LevelInit(const char* szMapName)
|
void CFF_SH_ScriptManager::LevelInit(const char* szMapName)
|
||||||
{
|
{
|
||||||
const char* default_luafile = "maps/default.lua";
|
const char* default_luafile = "maps/default.lua";
|
||||||
//FF_TODO: VPROF_BUDGET("CFFScriptManager::LevelInit", VPROF_BUDGETGROUP_FF_LUA);
|
//FF_TODO: VPROF_BUDGET("CFF_SH_ScriptManager::LevelInit", VPROF_BUDGETGROUP_FF_LUA);
|
||||||
|
|
||||||
if(!szMapName)
|
if(!szMapName)
|
||||||
return;
|
return;
|
||||||
|
@ -235,7 +235,7 @@ void CFFScriptManager::LevelInit(const char* szMapName)
|
||||||
|
|
||||||
#ifdef FF_DLL
|
#ifdef FF_DLL
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
void CFFScriptManager::LevelShutdown()
|
void CFF_SH_ScriptManager::LevelShutdown()
|
||||||
{
|
{
|
||||||
// shutdown the VM
|
// shutdown the VM
|
||||||
if(L)
|
if(L)
|
||||||
|
@ -248,7 +248,7 @@ void CFFScriptManager::LevelShutdown()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
void CFFScriptManager::OnScriptLoad(const char* szFileName,
|
void CFF_SH_ScriptManager::OnScriptLoad(const char* szFileName,
|
||||||
const char* szFileContents)
|
const char* szFileContents)
|
||||||
{
|
{
|
||||||
// ignore the message if we are not still in the "loading" phase
|
// ignore the message if we are not still in the "loading" phase
|
||||||
|
@ -262,14 +262,14 @@ void CFFScriptManager::OnScriptLoad(const char* szFileName,
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
void CFFScriptManager::BeginScriptLoad()
|
void CFF_SH_ScriptManager::BeginScriptLoad()
|
||||||
{
|
{
|
||||||
CRC32_Init(&m_scriptCRC);
|
CRC32_Init(&m_scriptCRC);
|
||||||
m_isLoading = true;
|
m_isLoading = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
void CFFScriptManager::EndScriptLoad()
|
void CFF_SH_ScriptManager::EndScriptLoad()
|
||||||
{
|
{
|
||||||
CRC32_Final(&m_scriptCRC);
|
CRC32_Final(&m_scriptCRC);
|
||||||
m_isLoading = false;
|
m_isLoading = false;
|
||||||
|
@ -277,9 +277,9 @@ void CFFScriptManager::EndScriptLoad()
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
bool CFFScriptManager::LoadFile( lua_State *L, const char *filename)
|
bool CFF_SH_ScriptManager::LoadFile( lua_State *L, const char *filename)
|
||||||
{
|
{
|
||||||
//FF_TODO: VPROF_BUDGET( "CFFScriptManager::LoadFile", VPROF_BUDGETGROUP_FF_LUA );
|
//FF_TODO: VPROF_BUDGET( "CFF_SH_ScriptManager::LoadFile", VPROF_BUDGETGROUP_FF_LUA );
|
||||||
|
|
||||||
// don't allow scripters to sneak in scripts after the initial load
|
// don't allow scripters to sneak in scripts after the initial load
|
||||||
if(!_scriptman.m_isLoading)
|
if(!_scriptman.m_isLoading)
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
// ff_scriptman.h
|
// ff_sh_scriptman.h
|
||||||
|
|
||||||
#ifndef FF_SCRIPTMAN_H
|
#ifndef FF_SH_SCRIPTMAN_H
|
||||||
#define FF_SCRIPTMAN_H
|
#define FF_SH_SCRIPTMAN_H
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// includes
|
// includes
|
||||||
|
@ -27,12 +27,12 @@ namespace luabind
|
||||||
class CFFLuaSC;
|
class CFFLuaSC;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
class CFFScriptManager
|
class CFF_SH_ScriptManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// 'structors
|
// 'structors
|
||||||
CFFScriptManager();
|
CFF_SH_ScriptManager();
|
||||||
~CFFScriptManager();
|
~CFF_SH_ScriptManager();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// inserts the lua file into the script environment
|
// inserts the lua file into the script environment
|
||||||
|
@ -107,7 +107,7 @@ private:
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// global externs
|
// global externs
|
||||||
extern CFFScriptManager _scriptman;
|
extern CFF_SH_ScriptManager _scriptman;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#endif
|
#endif
|
|
@ -5,12 +5,12 @@ $Project
|
||||||
{
|
{
|
||||||
$Folder "Source Files"
|
$Folder "Source Files"
|
||||||
{
|
{
|
||||||
$Folder "FF Shared"
|
$Folder "FF"
|
||||||
{
|
{
|
||||||
$Folder "Lua"
|
$Folder "Lua"
|
||||||
{
|
{
|
||||||
$File "$SRCDIR\game\shared\ff\ff_scriptman_shared.cpp"
|
$File "$SRCDIR\game\shared\ff\ff_sh_scriptman.cpp"
|
||||||
$File "$SRCDIR\game\shared\ff\ff_scriptman_shared.h"
|
$File "$SRCDIR\game\shared\ff\ff_sh_scriptman.h"
|
||||||
}
|
}
|
||||||
$Folder "Movement"
|
$Folder "Movement"
|
||||||
{
|
{
|
||||||
|
@ -18,8 +18,8 @@ $Project
|
||||||
$File "$SRCDIR\game\shared\ff\ff_sh_gamemovement.h"
|
$File "$SRCDIR\game\shared\ff\ff_sh_gamemovement.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
$File "$SRCDIR\game\shared\ff\ff_gamerules_shared.cpp"
|
$File "$SRCDIR\game\shared\ff\ff_sh_gamerules.cpp"
|
||||||
$File "$SRCDIR\game\shared\ff\ff_gamerules_shared.h"
|
$File "$SRCDIR\game\shared\ff\ff_sh_gamerules.h"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "in_buttons.h"
|
#include "in_buttons.h"
|
||||||
#include "takedamageinfo.h"
|
#include "takedamageinfo.h"
|
||||||
#include "ammodef.h"
|
#include "ammodef.h"
|
||||||
#include "ff_gamerules_shared.h"
|
#include "ff_sh_gamerules.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef CLIENT_DLL
|
#ifdef CLIENT_DLL
|
||||||
|
|
Loading…
Reference in a new issue