From ae149964286569c0fee476e1ac7e90f192667161 Mon Sep 17 00:00:00 2001 From: Roy Shapiro <70241434+RoyShapiro@users.noreply.github.com> Date: Fri, 8 Jul 2022 20:24:55 +0300 Subject: [PATCH] Revert "HL:Invasion Remove unneeded USE_VGUI definitions from CMakeLists" This reverts commit f1c26a57fbd14b9682d0de57714c93d3db007456. --- dlls/CMakeLists.txt | 10 ++++++++++ dlls/crowbar.cpp | 12 ++++++------ dlls/weapons.h | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/dlls/CMakeLists.txt b/dlls/CMakeLists.txt index 48259caa..c7ebef84 100644 --- a/dlls/CMakeLists.txt +++ b/dlls/CMakeLists.txt @@ -45,6 +45,16 @@ else() add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE) endif() +if (USE_VGUI) + add_definitions(-DUSE_VGUI) + if (USE_NOVGUI_MOTD) + add_definitions(-DUSE_NOVGUI_MOTD) + endif() + if (USE_NOVGUI_SCOREBOARD) + add_definitions(-DUSE_NOVGUI_SCOREBOARD) + endif() +endif() + if (USE_GSTREAMER AND (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")) add_definitions(-DUSE_GSTREAMER) endif() diff --git a/dlls/crowbar.cpp b/dlls/crowbar.cpp index b2cba5e5..7340d472 100644 --- a/dlls/crowbar.cpp +++ b/dlls/crowbar.cpp @@ -188,7 +188,7 @@ void CCrowbar::SwingAgain( void ) Swing( 0 ); } -/*void CCrowbar::SendWeaponAnim( int iAnim, int skiplocal, int body ) //Fix??? +void CCrowbar::SendWeaponAnim( int iAnim, int skiplocal, int body ) //Fix??? { skiplocal = 0; @@ -202,7 +202,7 @@ void CCrowbar::SwingAgain( void ) WRITE_BYTE( iAnim ); // sequence number WRITE_BYTE( pev->body ); // weaponmodel bodygroup. MESSAGE_END(); -}*/ +} int CCrowbar::Swing( int fFirst ) { @@ -296,11 +296,11 @@ int CCrowbar::Swing( int fFirst ) // If building with the clientside weapon prediction system, // UTIL_WeaponTimeBase() is always 0 and m_flNextPrimaryAttack is >= -1.0f, thus making // m_flNextPrimaryAttack + 1 < UTIL_WeaponTimeBase() always evaluate to false. -//#if CLIENT_WEAPONS -// if( ( m_flNextPrimaryAttack + 1.0f == UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() ) -//#else +#if CLIENT_WEAPONS + if( ( m_flNextPrimaryAttack + 1.0f == UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() ) +#else if( ( m_flNextPrimaryAttack + 1.0f < UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() ) -//#endif +#endif { // first swing does full damage pEntity->TraceAttack( m_pPlayer->pev, gSkillData.plrDmgCrowbar, gpGlobals->v_forward, &tr, DMG_CLUB ); diff --git a/dlls/weapons.h b/dlls/weapons.h index 6f92f464..8ea663a5 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -573,7 +573,7 @@ public: void EXPORT Smack( void ); int GetItemInfo( ItemInfo *p ); int AddToPlayer( CBasePlayer *pPlayer ); -// void SendWeaponAnim( int iAnim, int skiplocal = 1, int body = 0 ); // skiplocal is 1 if client is predicting weapon animations + void SendWeaponAnim( int iAnim, int skiplocal = 1, int body = 0 ); // skiplocal is 1 if client is predicting weapon animations void PrimaryAttack( void ); int Swing( int fFirst );