Compare commits

18 Commits

Author SHA1 Message Date
bc62e99e62 removed duplicate entry from gitignore 2020-02-22 10:20:26 +01:00
80f130a34c changed maxvalue for fov_desired to 140 2020-02-22 10:17:55 +01:00
3d6ef7d47a uncheatified "fov" 2020-02-22 10:03:10 +01:00
6a07992e34 default viewmodel_fov 68 2020-02-22 09:41:40 +01:00
9917083884 default airaccel 100 2020-02-22 09:41:13 +01:00
6406952e7e default fov 100 2020-02-22 09:40:09 +01:00
671e1b6e0a max fov 140 2020-02-22 09:38:22 +01:00
3ada3a07f0 default pogostick to 1 until queuejump is fixed 2020-02-22 09:37:40 +01:00
689cce8da4 fixed problems caused by incorrect merge 2020-02-22 08:59:29 +01:00
a2faa57760 Merge branch 'dev' of https://github.com/Hion-V/sourcearena into dev 2020-02-21 07:02:26 +01:00
b11cb714d6 Merge branch 'movement' into dev 2020-02-21 00:58:54 +01:00
22b3d26c0b support cl_righthand 2019-08-13 07:52:53 +02:00
cb00ff4ff5 Ladders! 2019-08-13 07:03:26 +02:00
e11373acbb disabled fall damage 2019-08-13 06:59:33 +02:00
380112a25f imported movevars from old SA 2019-08-13 06:50:19 +02:00
443c2483b0 Updated solution and gitignore 2019-08-13 06:40:38 +02:00
e4352e849f imported multiplayer gamemovement from old SA 2019-08-13 06:32:23 +02:00
94b17cc130 created multiplayer solution 2019-08-13 06:29:34 +02:00
13 changed files with 236 additions and 148 deletions

1
.gitignore vendored
View File

@@ -74,7 +74,6 @@ sp/game/mod_hl2/voice_ban.dt
*.vpc_crc *.vpc_crc
*.sentinel *.sentinel
*.filters *.filters
*.lib
#game directories #game directories
sp/game/* sp/game/*

View File

@@ -35,9 +35,9 @@
// 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"
#ifdef CSTRIKE_DLL //#ifdef CSTRIKE_DLL
ConVar cl_righthand("cl_righthand", "1", FCVAR_ARCHIVE, "Use right-handed view models."); ConVar cl_righthand("cl_righthand", "1", FCVAR_ARCHIVE, "Use right-handed view models.");
#endif //#endif
#ifdef TF_CLIENT_DLL #ifdef TF_CLIENT_DLL
ConVar cl_flipviewmodels("cl_flipviewmodels", "0", FCVAR_USERINFO | FCVAR_ARCHIVE | FCVAR_NOT_CONNECTED, "Flip view models."); ConVar cl_flipviewmodels("cl_flipviewmodels", "0", FCVAR_USERINFO | FCVAR_ARCHIVE | FCVAR_NOT_CONNECTED, "Flip view models.");
@@ -197,7 +197,7 @@ bool C_BaseViewModel::Interpolate( float currentTime )
bool C_BaseViewModel::ShouldFlipViewModel() bool C_BaseViewModel::ShouldFlipViewModel()
{ {
#ifdef CSTRIKE_DLL //#ifdef CSTRIKE_DLL
// If cl_righthand is set, then we want them all right-handed. // If cl_righthand is set, then we want them all right-handed.
CBaseCombatWeapon* pWeapon = m_hWeapon.Get(); CBaseCombatWeapon* pWeapon = m_hWeapon.Get();
if (pWeapon) if (pWeapon)
@@ -205,7 +205,7 @@ bool C_BaseViewModel::ShouldFlipViewModel()
const FileWeaponInfo_t* pInfo = &pWeapon->GetWpnData(); const FileWeaponInfo_t* pInfo = &pWeapon->GetWpnData();
return pInfo->m_bAllowFlipping && pInfo->m_bBuiltRightHanded != cl_righthand.GetBool(); return pInfo->m_bAllowFlipping && pInfo->m_bBuiltRightHanded != cl_righthand.GetBool();
} }
#endif //#endif
#ifdef TF_CLIENT_DLL #ifdef TF_CLIENT_DLL
CBaseCombatWeapon* pWeapon = m_hWeapon.Get(); CBaseCombatWeapon* pWeapon = m_hWeapon.Get();

View File

@@ -19,7 +19,7 @@
extern bool g_bRollingCredits; extern bool g_bRollingCredits;
ConVar fov_desired( "fov_desired", "75", FCVAR_ARCHIVE | FCVAR_USERINFO, "Sets the base field-of-view.", true, 75.0, true, 90.0 ); ConVar fov_desired( "fov_desired", "75", FCVAR_ARCHIVE | FCVAR_USERINFO, "Sets the base field-of-view.", true, 75.0, true, 140.0 );
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Globals // Globals

View File

@@ -112,7 +112,7 @@ static ConVar v_centerspeed( "v_centerspeed","500" );
// and motions look the most natural. // and motions look the most natural.
ConVar v_viewmodel_fov( "viewmodel_fov", "54", FCVAR_ARCHIVE, "Sets the field-of-view for the viewmodel.", true, 0.1, true, 179.9 ); ConVar v_viewmodel_fov( "viewmodel_fov", "54", FCVAR_ARCHIVE, "Sets the field-of-view for the viewmodel.", true, 0.1, true, 179.9 );
#else #else
ConVar v_viewmodel_fov( "viewmodel_fov", "54", FCVAR_CHEAT, "Sets the field-of-view for the viewmodel.", true, 0.1, true, 179.9 ); ConVar v_viewmodel_fov( "viewmodel_fov", "68", FCVAR_ARCHIVE, "Sets the field-of-view for the viewmodel.", true, 0.1, true, 179.9 );
#endif #endif
ConVar mat_viewportscale( "mat_viewportscale", "1.0", FCVAR_ARCHIVE, "Scale down the main viewport (to reduce GPU impact on CPU profiling)", true, (1.0f / 640.0f), true, 1.0f ); ConVar mat_viewportscale( "mat_viewportscale", "1.0", FCVAR_ARCHIVE, "Scale down the main viewport (to reduce GPU impact on CPU profiling)", true, (1.0f / 640.0f), true, 1.0f );
ConVar mat_viewportupscale( "mat_viewportupscale", "1", FCVAR_ARCHIVE, "Scale the viewport back up" ); ConVar mat_viewportupscale( "mat_viewportupscale", "1", FCVAR_ARCHIVE, "Scale the viewport back up" );
@@ -1125,11 +1125,13 @@ void CViewRender::Render( vrect_t *rect )
static ConVarRef sv_restrict_aspect_ratio_fov( "sv_restrict_aspect_ratio_fov" ); static ConVarRef sv_restrict_aspect_ratio_fov( "sv_restrict_aspect_ratio_fov" );
float aspectRatio = engine->GetScreenAspectRatio() * 0.75f; // / (4/3) float aspectRatio = engine->GetScreenAspectRatio() * 0.75f; // / (4/3)
float limitedAspectRatio = aspectRatio; float limitedAspectRatio = aspectRatio;
if ( ( sv_restrict_aspect_ratio_fov.GetInt() > 0 && engine->IsWindowedMode() && gpGlobals->maxClients > 1 ) || if ( ( sv_restrict_aspect_ratio_fov.GetInt() > 0 && engine->IsWindowedMode() && gpGlobals->maxClients > 1 ) ||
sv_restrict_aspect_ratio_fov.GetInt() == 2 ) sv_restrict_aspect_ratio_fov.GetInt() == 2 )
{ {
limitedAspectRatio = MIN( aspectRatio, 1.85f * 0.75f ); // cap out the FOV advantage at a 1.85:1 ratio (about the widest any legit user should be) limitedAspectRatio = MIN( aspectRatio, 1.85f * 1.75f ); // cap out the FOV advantage at a 1.85:1 ratio (about the widest any legit user should be)
} }
view.fov = ScaleFOVByWidthRatio( view.fov, limitedAspectRatio ); view.fov = ScaleFOVByWidthRatio( view.fov, limitedAspectRatio );

View File

@@ -900,10 +900,11 @@ CON_COMMAND( give, "Give item to player.\n\tArguments: <item_name>" )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
CON_COMMAND( fov, "Change players FOV" ) CON_COMMAND( fov, "Change players FOV" ) //this is the "Fov" command
{ {
CBasePlayer *pPlayer = ToBasePlayer( UTIL_GetCommandClient() ); CBasePlayer *pPlayer = ToBasePlayer( UTIL_GetCommandClient() );
if ( pPlayer && sv_cheats->GetBool() ) //if ( pPlayer && sv_cheats->GetBool() )
if ( pPlayer )
{ {
if ( args.ArgC() > 1 ) if ( args.ArgC() > 1 )
{ {

View File

@@ -39,8 +39,8 @@ extern IFileSystem *filesystem;
#ifndef SA_MOVEMENT #ifndef SA_MOVEMENT
#define SA_MOVEMENT #define SA_MOVEMENT
#endif #endif
ConVar sa_sv_pogostick("sv_pogostick", "0", FCVAR_REPLICATED, "queue jumps", 1, 0, 1, 1); ConVar sa_sv_pogostick("sv_pogostick", "1", FCVAR_REPLICATED, "queue jumps", 1, 0, 1, 1);
ConVar sa_sv_queuejump("sv_queuejump", "1", FCVAR_REPLICATED, "auto bunny hopping", 1, 0, 1, 1); ConVar sa_sv_queuejump("sv_queuejump", "0", FCVAR_REPLICATED, "auto bunny hopping", 1, 0, 1, 1);

View File

@@ -144,7 +144,7 @@ public:
virtual CBaseCombatWeapon *GetNextBestWeapon( CBaseCombatCharacter *pPlayer, CBaseCombatWeapon *pCurrentWeapon ); // I can't use this weapon anymore, get me the next best one. virtual CBaseCombatWeapon *GetNextBestWeapon( CBaseCombatCharacter *pPlayer, CBaseCombatWeapon *pCurrentWeapon ); // I can't use this weapon anymore, get me the next best one.
virtual bool ShouldCollide( int collisionGroup0, int collisionGroup1 ); virtual bool ShouldCollide( int collisionGroup0, int collisionGroup1 );
virtual int DefaultFOV( void ) { return 90; } virtual int DefaultFOV( void ) { return 100; }
// This function is here for our CNetworkVars. // This function is here for our CNetworkVars.
inline void NetworkStateChanged() inline void NetworkStateChanged()

View File

@@ -1,3 +1,20 @@
//========= Copyright © 1996-2010, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//
#include "cbase.h"
#include "gamemovement.h"
// Expose our interface.
static CGameMovement g_GameMovement;
IGameMovement *g_pGameMovement = (IGameMovement *)&g_GameMovement;
EXPOSE_SINGLE_INTERFACE_GLOBALVAR(CGameMovement, IGameMovement, INTERFACENAME_GAMEMOVEMENT, g_GameMovement);
/*
//========= Copyright Valve Corporation, All rights reserved. ============// //========= Copyright Valve Corporation, All rights reserved. ============//
// //
// Purpose: Special handling for hl2 usable ladders // Purpose: Special handling for hl2 usable ladders
@@ -142,6 +159,7 @@ LINK_ENTITY_TO_CLASS( reserved_spot, CReservePlayerSpot );
// goalpos - // goalpos -
// *ladder - // *ladder -
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void CHL2GameMovement::StartForcedMove( bool mounting, float transit_speed, const Vector& goalpos, CFuncLadder *ladder ) void CHL2GameMovement::StartForcedMove( bool mounting, float transit_speed, const Vector& goalpos, CFuncLadder *ladder )
{ {
LadderMove_t* lm = GetLadderMove(); LadderMove_t* lm = GetLadderMove();
@@ -522,7 +540,7 @@ bool CHL2GameMovement::ExitLadderViaDismountNode( CFuncLadder *ladder, bool stri
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void CHL2GameMovement::FullLadderMove() void CHL2GameMovement::FullLadderMove()
{ {
#if !defined( CLIENT_DLL ) //#if !defined( CLIENT_DLL )
CFuncLadder *ladder = GetLadder(); CFuncLadder *ladder = GetLadder();
Assert( ladder ); Assert( ladder );
if ( !ladder ) if ( !ladder )
@@ -701,7 +719,7 @@ void CHL2GameMovement::FullLadderMove()
mv->SetAbsOrigin( oldOrigin ); mv->SetAbsOrigin( oldOrigin );
} }
} }
#endif //#endif
} }
bool CHL2GameMovement::CheckLadderAutoMountEndPoint( CFuncLadder *ladder, const Vector& bestOrigin ) bool CHL2GameMovement::CheckLadderAutoMountEndPoint( CFuncLadder *ladder, const Vector& bestOrigin )
@@ -1150,3 +1168,4 @@ bool CHL2GameMovement::CanAccelerate()
EXPOSE_SINGLE_INTERFACE_GLOBALVAR(CGameMovement, IGameMovement,INTERFACENAME_GAMEMOVEMENT, g_GameMovement ); EXPOSE_SINGLE_INTERFACE_GLOBALVAR(CGameMovement, IGameMovement,INTERFACENAME_GAMEMOVEMENT, g_GameMovement );
#endif #endif
*/

View File

@@ -1,3 +1,4 @@
/*
//========= Copyright Valve Corporation, All rights reserved. ============// //========= Copyright Valve Corporation, All rights reserved. ============//
// //
// Purpose: Special handling for hl2 usable ladders // Purpose: Special handling for hl2 usable ladders
@@ -127,3 +128,4 @@ inline CFuncLadder *CHL2GameMovement::GetLadder()
{ {
return static_cast<CFuncLadder*>( static_cast<CBaseEntity *>( GetHL2Player()->m_HL2Local.m_hLadder.Get() ) ); return static_cast<CFuncLadder*>( static_cast<CBaseEntity *>( GetHL2Player()->m_HL2Local.m_hLadder.Get() ) );
} }
*/

View File

@@ -67,7 +67,7 @@ ConVar sv_maxspeed ( "sv_maxspeed", "320", FCVAR_NOTIFY | FCVAR_REPLICATED | FC
#endif//_XBOX #endif//_XBOX
#if defined( CSTRIKE_DLL ) || defined( HL1MP_DLL ) || defined( SArena_DLL ) //we need these to not be hidden #if defined( CSTRIKE_DLL ) || defined( HL1MP_DLL ) || defined( SArena_DLL ) //we need these to not be hidden
ConVar sv_airaccelerate( "sv_airaccelerate", "10", FCVAR_NOTIFY | FCVAR_REPLICATED); ConVar sv_airaccelerate( "sv_airaccelerate", "100", FCVAR_NOTIFY | FCVAR_REPLICATED);
ConVar sv_wateraccelerate( "sv_wateraccelerate", "10", FCVAR_NOTIFY | FCVAR_REPLICATED); ConVar sv_wateraccelerate( "sv_wateraccelerate", "10", FCVAR_NOTIFY | FCVAR_REPLICATED);
ConVar sv_waterfriction( "sv_waterfriction", "1", FCVAR_NOTIFY | FCVAR_REPLICATED); ConVar sv_waterfriction( "sv_waterfriction", "1", FCVAR_NOTIFY | FCVAR_REPLICATED);
ConVar sv_footsteps ( "sv_footsteps", "1", FCVAR_NOTIFY | FCVAR_REPLICATED, "Play footstep sound for players" ); ConVar sv_footsteps ( "sv_footsteps", "1", FCVAR_NOTIFY | FCVAR_REPLICATED, "Play footstep sound for players" );

View File

@@ -628,7 +628,8 @@ ConVarRef suitcharger( "sk_suitcharger" );
break; break;
default: default:
case 0:// fixed case 0:// fixed
return 10; //return 10;
return 0;
break; break;
} }
} }

View File

@@ -234,7 +234,7 @@ enum CastVote
#define MAX_PLACE_NAME_LENGTH 18 #define MAX_PLACE_NAME_LENGTH 18
#define MAX_FOV 90 #define MAX_FOV 140 //Max fov
//=================================================================================================================== //===================================================================================================================
// Team Defines // Team Defines

64
mp/src/games.sln Normal file
View File

@@ -0,0 +1,64 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29201.188
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Client (HL2MP)", "game\client\client_hl2mp.vcxproj", "{17BCE59A-9037-EC8D-433E-F81339E2F1BA}"
ProjectSection(ProjectDependencies) = postProject
{BAB92FF0-D72A-D7E5-1988-74628D39B94F} = {BAB92FF0-D72A-D7E5-1988-74628D39B94F}
{EC1C516D-E1D9-BC0A-F79D-E91E954ED8EC} = {EC1C516D-E1D9-BC0A-F79D-E91E954ED8EC}
{F69B3672-C5E8-CD1A-257F-253A25B5B939} = {F69B3672-C5E8-CD1A-257F-253A25B5B939}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mathlib", "mathlib\mathlib.vcxproj", "{BAB92FF0-D72A-D7E5-1988-74628D39B94F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Raytrace", "raytrace\raytrace.vcxproj", "{95D67225-8415-236F-9128-DCB171B7DEC6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Server (HL2MP)", "game\server\server_hl2mp.vcxproj", "{33B7DFDC-BECB-3678-1190-6C951E393EB3}"
ProjectSection(ProjectDependencies) = postProject
{BAB92FF0-D72A-D7E5-1988-74628D39B94F} = {BAB92FF0-D72A-D7E5-1988-74628D39B94F}
{EC1C516D-E1D9-BC0A-F79D-E91E954ED8EC} = {EC1C516D-E1D9-BC0A-F79D-E91E954ED8EC}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tier1", "tier1\tier1.vcxproj", "{EC1C516D-E1D9-BC0A-F79D-E91E954ED8EC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vgui_controls", "vgui2\vgui_controls\vgui_controls.vcxproj", "{F69B3672-C5E8-CD1A-257F-253A25B5B939}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{17BCE59A-9037-EC8D-433E-F81339E2F1BA}.Debug|x86.ActiveCfg = Debug|Win32
{17BCE59A-9037-EC8D-433E-F81339E2F1BA}.Debug|x86.Build.0 = Debug|Win32
{17BCE59A-9037-EC8D-433E-F81339E2F1BA}.Release|x86.ActiveCfg = Release|Win32
{17BCE59A-9037-EC8D-433E-F81339E2F1BA}.Release|x86.Build.0 = Release|Win32
{BAB92FF0-D72A-D7E5-1988-74628D39B94F}.Debug|x86.ActiveCfg = Debug|Win32
{BAB92FF0-D72A-D7E5-1988-74628D39B94F}.Debug|x86.Build.0 = Debug|Win32
{BAB92FF0-D72A-D7E5-1988-74628D39B94F}.Release|x86.ActiveCfg = Release|Win32
{BAB92FF0-D72A-D7E5-1988-74628D39B94F}.Release|x86.Build.0 = Release|Win32
{95D67225-8415-236F-9128-DCB171B7DEC6}.Debug|x86.ActiveCfg = Debug|Win32
{95D67225-8415-236F-9128-DCB171B7DEC6}.Debug|x86.Build.0 = Debug|Win32
{95D67225-8415-236F-9128-DCB171B7DEC6}.Release|x86.ActiveCfg = Release|Win32
{95D67225-8415-236F-9128-DCB171B7DEC6}.Release|x86.Build.0 = Release|Win32
{33B7DFDC-BECB-3678-1190-6C951E393EB3}.Debug|x86.ActiveCfg = Debug|Win32
{33B7DFDC-BECB-3678-1190-6C951E393EB3}.Debug|x86.Build.0 = Debug|Win32
{33B7DFDC-BECB-3678-1190-6C951E393EB3}.Release|x86.ActiveCfg = Release|Win32
{33B7DFDC-BECB-3678-1190-6C951E393EB3}.Release|x86.Build.0 = Release|Win32
{EC1C516D-E1D9-BC0A-F79D-E91E954ED8EC}.Debug|x86.ActiveCfg = Debug|Win32
{EC1C516D-E1D9-BC0A-F79D-E91E954ED8EC}.Debug|x86.Build.0 = Debug|Win32
{EC1C516D-E1D9-BC0A-F79D-E91E954ED8EC}.Release|x86.ActiveCfg = Release|Win32
{EC1C516D-E1D9-BC0A-F79D-E91E954ED8EC}.Release|x86.Build.0 = Release|Win32
{F69B3672-C5E8-CD1A-257F-253A25B5B939}.Debug|x86.ActiveCfg = Debug|Win32
{F69B3672-C5E8-CD1A-257F-253A25B5B939}.Debug|x86.Build.0 = Debug|Win32
{F69B3672-C5E8-CD1A-257F-253A25B5B939}.Release|x86.ActiveCfg = Release|Win32
{F69B3672-C5E8-CD1A-257F-253A25B5B939}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1D78039F-6074-40C4-8237-C7B4C2D01F18}
EndGlobalSection
EndGlobal