Fix circular includes and include cleanup (#3)

* Fix circular includes and include cleanup

Fixed a bug where other *.h header files would include extension.h, which itself
was already included in those same headers, creating a circular dependency cycle.
This caused build errors and made compilation unpredictable.

To resolve this:
- Moved implementation-only includes to .cpp files where they are actually needed.
- Added forward declarations where possible to avoid pulling in unnecessary headers.
- Ensured extension.h only contains declarations that require full type definitions.

This improves build stability and compilation time.

* Clean up includes and fix build errors

- Replaced full includes with forward declarations where possible
- Moved implementation-only includes from .h to .cpp files
- Added missing includes for stdint.h and Steam interfaces
- This significantly reduces compilation time and prevents future dependency issues

* Switch to SourceMod SDK smsdk_ext instead of local copy
This commit is contained in:
A1m`
2026-07-13 21:43:05 +00:00
committed by GitHub
parent 07fc524d27
commit a86fc4af91
29 changed files with 134 additions and 941 deletions
+13 -9
View File
@@ -17,9 +17,13 @@
*/
#pragma once
#include "isteamgameserver.h"
#include "steam_gameserver.h"
#include "smsdk_ext.h"
#include <steam_gameserver.h>
namespace SourceMod
{
class IForward;
}
typedef uint32_t Account_t;
@@ -41,10 +45,10 @@ class SteamWorksForwards
STEAM_GAMESERVER_CALLBACK(SteamWorksForwards, OnGroupStatusResult, GSClientGroupStatus_t, m_CallbackGroupStatus);
private:
IForward *pFOVC; /* Forward On Validate Client */
IForward *pFOVC_Old; /* OLD Forward On Validate Client */
IForward *pFOSSC; /* Forward On Steam Servers Connected */
IForward *pFOSSCF; /* Forward On Steam Servers Connect Failure */
IForward *pFOSSD; /* Forward On Steam Servers Disconnected */
IForward *pFOCGS; /* Forward On Client Group Status */
SourceMod::IForward *pFOVC; /* Forward On Validate Client */
SourceMod::IForward *pFOVC_Old; /* OLD Forward On Validate Client */
SourceMod::IForward *pFOSSC; /* Forward On Steam Servers Connected */
SourceMod::IForward *pFOSSCF; /* Forward On Steam Servers Connect Failure */
SourceMod::IForward *pFOSSD; /* Forward On Steam Servers Disconnected */
SourceMod::IForward *pFOCGS; /* Forward On Client Group Status */
};