Fix linux build again
This commit is contained in:
		
							parent
							
								
									b8c666cac0
								
							
						
					
					
						commit
						22c3803718
					
				@ -66,8 +66,8 @@ public:
 | 
				
			|||||||
	void HookRecorder(IDemoRecorder *recorder);
 | 
						void HookRecorder(IDemoRecorder *recorder);
 | 
				
			||||||
	void UnhookRecorder(IDemoRecorder *recorder);
 | 
						void UnhookRecorder(IDemoRecorder *recorder);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	void HookServer(IServer *server);
 | 
						void HookServer(HLTVServerWrapper *server);
 | 
				
			||||||
	void UnhookServer(IServer *server);
 | 
						void UnhookServer(HLTVServerWrapper *server);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	void CallOnServerStart(IHLTVServer *server);
 | 
						void CallOnServerStart(IHLTVServer *server);
 | 
				
			||||||
	void CallOnServerShutdown(IHLTVServer *server);
 | 
						void CallOnServerShutdown(IHLTVServer *server);
 | 
				
			||||||
 | 
				
			|||||||
@ -93,6 +93,7 @@ void HLTVServerWrapper::Hook()
 | 
				
			|||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	g_pSTVForwards.HookServer(this);
 | 
						g_pSTVForwards.HookServer(this);
 | 
				
			||||||
 | 
						if (m_DemoRecorder)
 | 
				
			||||||
		g_pSTVForwards.HookRecorder(m_DemoRecorder);
 | 
							g_pSTVForwards.HookRecorder(m_DemoRecorder);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (g_HLTVServers.HasShutdownOffset())
 | 
						if (g_HLTVServers.HasShutdownOffset())
 | 
				
			||||||
@ -118,6 +119,7 @@ void HLTVServerWrapper::Unhook()
 | 
				
			|||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	g_pSTVForwards.UnhookServer(this);
 | 
						g_pSTVForwards.UnhookServer(this);
 | 
				
			||||||
 | 
						if (m_DemoRecorder)
 | 
				
			||||||
		g_pSTVForwards.UnhookRecorder(m_DemoRecorder);
 | 
							g_pSTVForwards.UnhookRecorder(m_DemoRecorder);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (g_HLTVServers.HasShutdownOffset())
 | 
						if (g_HLTVServers.HasShutdownOffset())
 | 
				
			||||||
@ -359,8 +361,12 @@ IDemoRecorder *HLTVServerWrapperManager::GetDemoRecorderPtr(IHLTVServer *hltv)
 | 
				
			|||||||
		return (IDemoRecorder *)((intptr_t)hltv + offset);
 | 
							return (IDemoRecorder *)((intptr_t)hltv + offset);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
		IServer *baseServer = hltv->GetBaseServer();
 | 
							IServer *baseServer = hltv->GetBaseServer();
 | 
				
			||||||
 | 
					#ifndef WIN32
 | 
				
			||||||
 | 
							return (IDemoRecorder *)((intptr_t)baseServer + offset - 4);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
		return (IDemoRecorder *)((intptr_t)baseServer + offset);
 | 
							return (IDemoRecorder *)((intptr_t)baseServer + offset);
 | 
				
			||||||
#endif
 | 
					#endif // WIN32
 | 
				
			||||||
 | 
					#endif // SOURCE_ENGINE == SE_CSGO
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user