Ejemplo n.º 1
0
        internal static void handlerMeta_Attach(IntPtr a, MetaFunctions *pFunctionTable, MetaGlobals *pMetaGlobals, IntPtr pGamedllFuncs)
        {
                        #if DEBUG
            Console.WriteLine(" -- MONO: handlerMeta_Attach");
                        #endif

            pFunctionTable->GetEntityAPI           = IntPtr.Zero;
            pFunctionTable->GetEntityAPIPost       = IntPtr.Zero;
            pFunctionTable->GetEntityAPI2          = IntPtr.Zero;
            pFunctionTable->GetEntityAPI2Post      = Marshal.GetFunctionPointerForDelegate(new GetEntityApiDelegate(GetEntityAPI2Post));
            pFunctionTable->GetNewDllFunctions     = IntPtr.Zero;
            pFunctionTable->GetNewDllFunctionsPost = IntPtr.Zero;
            pFunctionTable->GetEngineFunctions     = IntPtr.Zero;
            pFunctionTable->GetEngineFunctionsPost = Marshal.GetFunctionPointerForDelegate(new GetEngineFunctionsDelegate(GetEngineFunctionsPost));

            globals = pMetaGlobals;

            dllapiFunctions = (EntityAPI)Marshal.PtrToStructure(pGamedllFuncs, typeof(EntityAPI));
        }
Ejemplo n.º 2
0
        internal static int GetEntityAPI2Post(ref EntityAPI functionTable, ref int interfaceVersion)
        {
                        #if DEBUG
            Console.WriteLine(" -- MONO: GetEntityAPI2Post");
                        #endif
            functionTable                  = new EntityAPI();
            functionTable.Spawn            = Spawn;
            functionTable.Use              = UsePost;
            functionTable.ClientConnect    = Player.OnConnect;
            functionTable.ClientDisconnect = Player.OnDisconnect;
            functionTable.ServerActivate   = ServerActivatePost;
            functionTable.StartFrame       = StartFramePost;
            functionTable.ClientCommand    = Player.OnCommand;
            functionTable.PutInServer      = Player.OnPutInServer;

            Server.Init();
            SharpMod.Init();

            MetaModEngine.SetResult(MetaResult.Handled);
            return(0);
        }
Ejemplo n.º 3
0
		internal static int GetEntityAPI2Post(ref EntityAPI functionTable, ref int interfaceVersion)
		{
			#if DEBUG
			Console.WriteLine(" -- MONO: GetEntityAPI2Post");
			#endif
			functionTable = new EntityAPI();
			functionTable.Spawn = Spawn;
			functionTable.Use = UsePost;
			functionTable.ClientConnect    = Player.OnConnect;
			functionTable.ClientDisconnect = Player.OnDisconnect;
			functionTable.ServerActivate   = ServerActivatePost;
			functionTable.StartFrame       = StartFramePost;
			functionTable.ClientCommand    = Player.OnCommand;
			functionTable.PutInServer      = Player.OnPutInServer;

			Server.Init();
			SharpMod.Init();

			MetaModEngine.SetResult(MetaResult.Handled);
			return 0;
		}
Ejemplo n.º 4
0
		internal static void handlerMeta_Attach(IntPtr a, MetaFunctions *pFunctionTable, MetaGlobals* pMetaGlobals, IntPtr pGamedllFuncs)
		{
			#if DEBUG
			Console.WriteLine(" -- MONO: handlerMeta_Attach");
			#endif

			pFunctionTable->GetEntityAPI            = IntPtr.Zero;
			pFunctionTable->GetEntityAPIPost        = IntPtr.Zero;
			pFunctionTable->GetEntityAPI2           = IntPtr.Zero;
			pFunctionTable->GetEntityAPI2Post       = Marshal.GetFunctionPointerForDelegate(new GetEntityApiDelegate(GetEntityAPI2Post));
			pFunctionTable->GetNewDllFunctions      = IntPtr.Zero;
			pFunctionTable->GetNewDllFunctionsPost  = IntPtr.Zero;
			pFunctionTable->GetEngineFunctions      = IntPtr.Zero;
			pFunctionTable->GetEngineFunctionsPost  = Marshal.GetFunctionPointerForDelegate(new GetEngineFunctionsDelegate(GetEngineFunctionsPost));

			globals = pMetaGlobals;

			dllapiFunctions = (EntityAPI)Marshal.PtrToStructure(pGamedllFuncs, typeof(EntityAPI));
		}