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:
+9
-12
@@ -17,15 +17,14 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "steam_gameserver.h"
|
||||
#include "isteamgamecoordinator.h"
|
||||
|
||||
#include "smsdk_ext.h"
|
||||
#include "sourcehook.h"
|
||||
#include <isteamgamecoordinator.h>
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef _WIN32
|
||||
#undef SendMessage
|
||||
#endif
|
||||
namespace SourceMod
|
||||
{
|
||||
class IForward;
|
||||
}
|
||||
|
||||
class SteamWorksGCHooks
|
||||
{
|
||||
@@ -43,12 +42,10 @@ class SteamWorksGCHooks
|
||||
EGCResults RetrieveMessage(uint32 *punMsgType, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize);
|
||||
|
||||
private:
|
||||
IForward *pGCSendMsg;
|
||||
IForward *pGCMsgAvail;
|
||||
IForward *pGCRetMsg;
|
||||
SourceMod::IForward *pGCSendMsg;
|
||||
SourceMod::IForward *pGCMsgAvail;
|
||||
SourceMod::IForward *pGCRetMsg;
|
||||
unsigned char uHooked;
|
||||
};
|
||||
|
||||
void OurGCGameFrameHook(bool simulating);
|
||||
|
||||
#include "extension.h"
|
||||
|
||||
Reference in New Issue
Block a user