File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,6 +130,13 @@ static int Player__AccountID(ILuaInterface lua) {
130130 return 1 ;
131131 }
132132
133+ [ LuaMethod ]
134+ static int Player__IsListenServerHost ( ILuaInterface lua ) {
135+ BasePlayer player = Get_Player ( 1 , false ) ! ;
136+ lua . PushBool ( ! engine . IsDedicatedServer ( ) && player . EntIndex ( ) == 1 ) ;
137+ return 1 ;
138+ }
139+
133140#if GAME_DLL
134141 [ LuaMethod ]
135142 static int Player__OwnerSteamID64 ( ILuaInterface lua ) {
Original file line number Diff line number Diff line change @@ -10,8 +10,14 @@ namespace Source.Common.Steam;
1010// I am very annoyed
1111public class SteamworksDotNetBoasts100PercentCoverageOfTheNativeSteamworksAPIAcrossAllInterfaces
1212{
13- [ DllImport ( "steam_api64" , CallingConvention = CallingConvention . Cdecl ) ] public static extern void SteamGameServer_RunCallbacks ( ) ;
14- [ DllImport ( "steam_api64" , CallingConvention = CallingConvention . Cdecl ) ] public static extern void SteamAPI_SetBreakpadAppID ( uint unAppID ) ;
13+ #if WIN32
14+ const string SteamApiLibrary = "steam_api64" ;
15+ #else
16+ const string SteamApiLibrary = "steam_api" ;
17+ #endif
18+
19+ [ DllImport ( SteamApiLibrary , CallingConvention = CallingConvention . Cdecl ) ] public static extern void SteamGameServer_RunCallbacks ( ) ;
20+ [ DllImport ( SteamApiLibrary , CallingConvention = CallingConvention . Cdecl ) ] public static extern void SteamAPI_SetBreakpadAppID ( uint unAppID ) ;
1521}
1622
1723// These are some hacks to access the internal pointers for steamclient
You can’t perform that action at this time.
0 commit comments