Skip to content
This repository was archived by the owner on May 25, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,5 @@ mp/game/neo/cfg/sourcemod
# Excludes
!makefile_base_posix.mak
!sourcesdk_def.mak

/sp
4 changes: 2 additions & 2 deletions mp/src/createallprojects.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ REM Note that it's not included in the default NT mount, so you'll have to provi
SET /A IncludePBK56 = 0

SET "VpcBin=devtools\bin\vpc.exe"
SET "BuildParams=/hl2mp +everything /mksln everything.sln"
SET "BuildParams=/hl2mp +everything /mksln everything.sln"

if %IncludePBK56%==1 (
echo **NOTE**: Including PBK56S in this solution.
%VpcBin% /define:INCLUDE_WEP_PBK %BuildParams%
) else (
%VpcBin% %BuildParams%
)
)
2 changes: 1 addition & 1 deletion mp/src/creategameprojects
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

pushd `dirname $0`
devtools/bin/vpc /hl2mp +game /mksln games
devtools/bin/vpc /hl2mp +game /mksln Game
popd
2 changes: 1 addition & 1 deletion mp/src/creategameprojects.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
devtools\bin\vpc.exe /hl2mp +game /mksln games.sln
devtools\bin\vpc.exe /hl2mp +game /mksln Game.sln
4 changes: 4 additions & 0 deletions mp/src/game/client/c_baseflex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,11 @@ void C_BaseFlex::SetupWeights( const matrix3x4_t *pBoneToWorld, int nFlexWeightC
{
// hack in an initialization
LinkToGlobalFlexControllers( GetModelPtr() );
#ifdef SDK2013CE
m_iBlink = AddGlobalFlexController( "blink" );
#else
m_iBlink = AddGlobalFlexController( "UH" );
#endif

if ( SetupGlobalWeights( pBoneToWorld, nFlexWeightCount, pFlexWeights, pFlexDelayedWeights ) )
{
Expand Down
8 changes: 5 additions & 3 deletions mp/src/game/client/c_colorcorrection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,11 @@ void C_ColorCorrection::ClientThink()
if ( weight<0.0f ) weight = 0.0f;
if ( weight>1.0f ) weight = 1.0f;
}

g_pColorCorrectionMgr->SetColorCorrectionWeight( m_CCHandle, m_flCurWeight * ( 1.0 - weight ) );

#ifdef SDK2013CE
g_pColorCorrectionMgr->SetColorCorrectionWeight(m_CCHandle, (m_flCurWeight * (1.0 - weight)) * 0.675f);
#else
g_pColorCorrectionMgr->SetColorCorrectionWeight(m_CCHandle, m_flCurWeight * (1.0 - weight));
#endif
BaseClass::ClientThink();
}

Expand Down
6 changes: 5 additions & 1 deletion mp/src/game/client/c_colorcorrectionvolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ bool C_ColorCorrectionVolume::ShouldDraw()
void C_ColorCorrectionVolume::ClientThink()
{
Vector entityPosition = GetAbsOrigin();
g_pColorCorrectionMgr->SetColorCorrectionWeight( m_CCHandle, m_Weight );
#ifdef SDK2013CE
g_pColorCorrectionMgr->SetColorCorrectionWeight(m_CCHandle, m_Weight * 0.675f);
#else
g_pColorCorrectionMgr->SetColorCorrectionWeight(m_CCHandle, m_Weight);
#endif
}


Expand Down
4 changes: 2 additions & 2 deletions mp/src/game/client/client_neo.vpc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ $Configuration
$Compiler
{
$AdditionalIncludeDirectories "$BASE;hl2mp\ui,.\hl2mp,.\neo,$SRCDIR\game\shared\hl2mp,$SRCDIR\game\shared\neo,$SRCDIR\game\shared\neo\weapons,.\hl2,.\hl2\elements,$SRCDIR\game\shared\hl2"
$PreprocessorDefinitions "$BASE;NEO;HL2MP;HL2_CLIENT_DLL" [!$INCLUDE_WEP_PBK]
$PreprocessorDefinitions "$BASE;NEO;HL2MP;HL2_CLIENT_DLL;INCLUDE_WEP_PBK" [$INCLUDE_WEP_PBK]
$PreprocessorDefinitions "$BASE;NEO;HL2MP;HL2_CLIENT_DLL;SDK2013CE" [!$INCLUDE_WEP_PBK]
$PreprocessorDefinitions "$BASE;NEO;HL2MP;HL2_CLIENT_DLL;SDK2013CE;INCLUDE_WEP_PBK" [$INCLUDE_WEP_PBK]
}
}

Expand Down
4 changes: 4 additions & 0 deletions mp/src/game/client/game_controls/vguitextwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,11 @@ void CTextWindow::OnKeyCodePressed( vgui::KeyCode code )

void CTextWindow::SetData(KeyValues *data)
{
#ifdef SDK2013CE
SetData( data->GetInt( "type" ), data->GetString( "title" ), data->GetString( "message" ), data->GetString( "msg_fallback" ), data->GetInt( "command" ), data->GetBool( "unload" ) );
#else
SetData( data->GetInt( "type" ), data->GetString( "title" ), data->GetString( "msg" ), data->GetString( "msg_fallback" ), data->GetInt( "cmd" ), data->GetBool( "unload" ) );
#endif
}

void CTextWindow::SetData( int type, const char *title, const char *message, const char *message_fallback, int command, bool bUnload )
Expand Down
4 changes: 4 additions & 0 deletions mp/src/game/client/vgui_video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ VideoPanel::VideoPanel( unsigned int nXPos, unsigned int nYPos, unsigned int nHe
m_nPlaybackHeight( 0 ),
m_bAllowAlternateMedia( allowAlternateMedia )
{
#ifdef SDK2013CE
vgui::VPANEL pParent = enginevgui->GetPanel( PANEL_ROOT );
#else
vgui::VPANEL pParent = enginevgui->GetPanel( PANEL_GAMEUIDLL );
#endif
SetParent( pParent );
SetVisible( false );

Expand Down
6 changes: 4 additions & 2 deletions mp/src/game/client/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,10 +837,12 @@ void CViewRender::SetUpViews()
float flFOVOffset = fDefaultFov - view.fov;

#ifdef NEO // Decouple viewmodel FOV from view FOV.
view.fovViewmodel = g_pClientMode->GetViewModelFOV();
#else
//Adjust the viewmodel's FOV to move with any FOV offsets on the viewer's end
#ifdef SDK2013CE
view.fovViewmodel = fabs( g_pClientMode->GetViewModelFOV() - flFOVOffset );
#else
view.fovViewmodel = g_pClientMode->GetViewModelFOV() - flFOVOffset;
#endif
#endif

if ( UseVR() )
Expand Down
6 changes: 6 additions & 0 deletions mp/src/game/server/ai_basenpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6566,6 +6566,12 @@ float CAI_BaseNPC::ThrowLimit( const Vector &vecStart,
//-----------------------------------------------------------------------------
void CAI_BaseNPC::SetupVPhysicsHull()
{
if ( GetModelPtr() == NULL )
{
UTIL_Remove(this);
return;
}

if ( GetMoveType() == MOVETYPE_VPHYSICS || GetMoveType() == MOVETYPE_NONE )
return;

Expand Down
5 changes: 5 additions & 0 deletions mp/src/game/server/baseflex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2157,8 +2157,13 @@ void CBaseFlex::DoBodyLean( void )
{
m_vecPrevVelocity = vecDelta;
float decay = ExponentialDecay( 0.5, 0.1, dt );
#ifdef SDK2013CE
m_vecShift *= decay;
m_vecLean *= decay;
#else
m_vecShift = m_vecLean * decay;
m_vecLean = m_vecShift * decay;
#endif // SDK2013CE
}

m_vecPrevOrigin = vecOrigin;
Expand Down
33 changes: 20 additions & 13 deletions mp/src/game/server/hl2/hl2_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1764,20 +1764,27 @@ void CHL2_Player::CheatImpulseCommands( int iImpulse )

case 51:
{
// Cheat to create a dynamic resupply item
Vector vecForward;
AngleVectors( EyeAngles(), &vecForward );
CBaseEntity *pItem = (CBaseEntity *)CreateEntityByName( "item_dynamic_resupply" );
if ( pItem )
{
Vector vecOrigin = GetAbsOrigin() + vecForward * 256 + Vector(0,0,64);
QAngle vecAngles( 0, GetAbsAngles().y - 90, 0 );
pItem->SetAbsOrigin( vecOrigin );
pItem->SetAbsAngles( vecAngles );
pItem->KeyValue( "targetname", "resupply" );
pItem->Spawn();
pItem->Activate();
#ifdef SDK2013CE
if ( sv_cheats->GetBool() )
{
#endif
// Cheat to create a dynamic resupply item
Vector vecForward;
AngleVectors( EyeAngles(), &vecForward );
CBaseEntity *pItem = (CBaseEntity *)CreateEntityByName( "item_dynamic_resupply" );
if ( pItem )
{
Vector vecOrigin = GetAbsOrigin() + vecForward * 256 + Vector(0,0,64);
QAngle vecAngles( 0, GetAbsAngles().y - 90, 0 );
pItem->SetAbsOrigin( vecOrigin );
pItem->SetAbsAngles( vecAngles );
pItem->KeyValue( "targetname", "resupply" );
pItem->Spawn();
pItem->Activate();
}
#ifdef SDK2013CE
}
#endif
break;
}

Expand Down
4 changes: 4 additions & 0 deletions mp/src/game/server/hl2/npc_combine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2565,7 +2565,11 @@ void CNPC_Combine::SpeakSentence( int sentenceType )
//=========================================================
// PainSound
//=========================================================
#ifdef SDK2013CE
void CNPC_Combine::PainSound( const CTakeDamageInfo &info )
#else
void CNPC_Combine::PainSound ( void )
#endif
{
// NOTE: The response system deals with this at the moment
if ( GetFlags() & FL_DISSOLVING )
Expand Down
4 changes: 4 additions & 0 deletions mp/src/game/server/hl2/npc_combine.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ class CNPC_Combine : public CAI_BaseActor
// Sounds
// -------------
void DeathSound( void );
#ifdef SDK2013CE
void PainSound( const CTakeDamageInfo &info );
#else
void PainSound( void );
#endif
void IdleSound( void );
void AlertSound( void );
void LostEnemySound( void );
Expand Down
5 changes: 5 additions & 0 deletions mp/src/game/server/hl2/npc_combinedropship.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,13 @@ void CNPC_CombineDropship::PopulatePoseParameters( void )
m_poseBody_Sway = LookupPoseParameter( "body_sway" );
m_poseCargo_Body_Accel = LookupPoseParameter( "cargo_body_accel" );
m_poseCargo_Body_Sway = LookupPoseParameter( "cargo_body_sway" );
#ifdef SDK2013CE
m_poseWeapon_Pitch = m_hContainer->LookupPoseParameter( "weapon_pitch" );
m_poseWeapon_Yaw = m_hContainer->LookupPoseParameter( "weapon_yaw" );
#else
m_poseWeapon_Pitch = LookupPoseParameter( "weapon_pitch" );
m_poseWeapon_Yaw = LookupPoseParameter( "weapon_yaw" );
#endif

m_sbStaticPoseParamsLoaded = true;
}
Expand Down
4 changes: 2 additions & 2 deletions mp/src/game/server/server_neo.vpc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ $Configuration
$Compiler
{
$AdditionalIncludeDirectories "$BASE;$SRCDIR\game\shared\hl2,.\neo,.\hl2,.\hl2mp,$SRCDIR\game\shared\hl2mp,$SRCDIR\game\shared\neo,$SRCDIR\game\shared\neo\weapons"
$PreprocessorDefinitions "$BASE;NEO;HL2MP;HL2_DLL" [!$INCLUDE_WEP_PBK]
$PreprocessorDefinitions "$BASE;NEO;HL2MP;HL2_DLL;INCLUDE_WEP_PBK" [$INCLUDE_WEP_PBK]
$PreprocessorDefinitions "$BASE;NEO;HL2MP;HL2_DLL;SDK2013CE" [!$INCLUDE_WEP_PBK]
$PreprocessorDefinitions "$BASE;NEO;HL2MP;HL2_DLL;SDK2013CE;INCLUDE_WEP_PBK" [$INCLUDE_WEP_PBK]
}
}

Expand Down
4 changes: 4 additions & 0 deletions mp/src/game/shared/hl2/hl_gamemovement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1177,9 +1177,13 @@ bool CHL2GameMovement::CanAccelerate()
}
#endif

#ifdef SDK2013CE
return BaseClass::CanAccelerate();
#else
BaseClass::CanAccelerate();

return true;
#endif
}


Expand Down
4 changes: 4 additions & 0 deletions mp/src/game/shared/physics_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,11 @@ void PhysFrictionSound( CBaseEntity *pEntity, IPhysicsObject *pObject, float ene
if ( psurf->sounds.scrapeSmooth && phit->audio.roughnessFactor < psurf->audio.roughThreshold )
{
soundName = psurf->sounds.scrapeSmooth;
#ifdef SDK2013CE
soundHandle = &psurf->soundhandles.scrapeSmooth;
#else
soundHandle = &psurf->soundhandles.scrapeRough;
#endif
}

const char *pSoundName = physprops->GetString( soundName );
Expand Down
9 changes: 7 additions & 2 deletions mp/src/public/bone_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2625,14 +2625,14 @@ class CIKSolver
X[i] = P[i];
normalize(X);

// Its y axis is perpendicular to P, so Y = unit( E - X(E X) ).
// Its y axis is perpendicular to P, so Y = unit( E - X(E.X) ).

float dDOTx = dot(D,X);
for (i = 0 ; i < 3 ; i++)
Y[i] = D[i] - dDOTx * X[i];
normalize(Y);

// Its z axis is perpendicular to both X and Y, so Z = X Y.
// Its z axis is perpendicular to both X and Y, so Z = X.Y.

cross(X,Y,Z);

Expand Down Expand Up @@ -5930,6 +5930,11 @@ const char *Studio_GetDefaultSurfaceProps( CStudioHdr *pstudiohdr )

float Studio_GetMass( CStudioHdr *pstudiohdr )
{
if ( pstudiohdr == NULL )
{
return 0.f;
}

return pstudiohdr->mass();
}

Expand Down
Loading