<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alliedmods.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mani</id>
	<title>AlliedModders Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alliedmods.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mani"/>
	<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/Special:Contributions/Mani"/>
	<updated>2026-05-08T10:15:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.6</generator>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=MM:S_API_Differences&amp;diff=5214</id>
		<title>MM:S API Differences</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=MM:S_API_Differences&amp;diff=5214"/>
		<updated>2007-10-16T21:16:26Z</updated>

		<summary type="html">&lt;p&gt;Mani: /* Breaking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Metamod:Source 1.6.0 makes several API changes which may affect plugins.  These changes are fully documented below.&lt;br /&gt;
&lt;br /&gt;
=Renamed Calls=&lt;br /&gt;
==Transparent==&lt;br /&gt;
The following functions have received simple renamings, which should be transparent from the &amp;lt;tt&amp;gt;META_REGCMD&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;META_REGCVAR&amp;lt;/tt&amp;gt; macros.&lt;br /&gt;
*&amp;lt;tt&amp;gt;RegisterConCmdBase()&amp;lt;/tt&amp;gt; -&amp;gt; &amp;lt;tt&amp;gt;RegisterConCommandBase()&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;UnregisterConCmdBase()&amp;lt;/tt&amp;gt; -&amp;gt; &amp;lt;tt&amp;gt;UnregisterConCommandBase()&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Breaking==&lt;br /&gt;
&amp;lt;tt&amp;gt;oslink.h&amp;lt;/tt&amp;gt; was renamed to &amp;lt;tt&amp;gt;metamod_oslink.h&amp;lt;/tt&amp;gt;.  This file is not a public file, however, it has some useful macros and a few plugins used it.&lt;br /&gt;
&lt;br /&gt;
The following functions have received simple renamings, however, old code will be affected.&lt;br /&gt;
*&amp;lt;tt&amp;gt;pGlobals()&amp;lt;/tt&amp;gt; -&amp;gt; &amp;lt;tt&amp;gt;GetCGlobals&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;engineFactory()&amp;lt;/tt&amp;gt; -&amp;gt; &amp;lt;tt&amp;gt;GetEngineFactory()&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;serverFactory()&amp;lt;/tt&amp;gt; -&amp;gt; &amp;lt;tt&amp;gt;GetServerFactory()&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;physicsFactory()&amp;lt;/tt&amp;gt; -&amp;gt; &amp;lt;tt&amp;gt;GetPhysicsFactory()&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;fileSystemFactory()&amp;lt;/tt&amp;gt; -&amp;gt; &amp;lt;tt&amp;gt;GetFileSystemFactory()&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, &amp;lt;tt&amp;gt;GET_V_IFACE_CURRENT&amp;lt;/tt&amp;gt; would change from this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cpp&amp;gt;GET_V_IFACE_CURRENT(engineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To this:&lt;br /&gt;
&amp;lt;cpp&amp;gt;GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Removed Calls=&lt;br /&gt;
A few API calls have been completely removed.  &lt;br /&gt;
*&amp;lt;tt&amp;gt;RemotePrintingAvailable()&amp;lt;/tt&amp;gt; - Unused, no purpose.&lt;br /&gt;
*&amp;lt;tt&amp;gt;GetCvarBaseAccessor()&amp;lt;/tt&amp;gt; - Unused, no purpose.&lt;br /&gt;
*&amp;lt;tt&amp;gt;SetLastMetaReturn()&amp;lt;/tt&amp;gt; - Did nothing.&lt;br /&gt;
*&amp;lt;tt&amp;gt;GetLastMetaReturn()&amp;lt;/tt&amp;gt; - Did nothing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;SH_GET_CALLCLASS&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;SH_RELEASE_CALLCLASS&amp;lt;/tt&amp;gt; have been removed.  For more information, see the [[SourceHook_Development#Bypassing_Hooks|updated SH_CALL syntax]].&lt;br /&gt;
&lt;br /&gt;
=Changed Calls=&lt;br /&gt;
*&amp;lt;tt&amp;gt;IPluginManager::Query()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;IPluginManager::QueryHandle()&amp;lt;/tt&amp;gt; now store return values using optional pointers instead of references.  This change was requested by a few people.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;SH_CALL&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;SH_MCALL&amp;lt;/tt&amp;gt; are changed - the concept of &amp;quot;CallClasses&amp;quot; has been removed, and these macros are now much simpler.  See the [[SourceHook_Development#Bypassing_Hooks|updated SH_CALL syntax]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous=&lt;br /&gt;
&amp;lt;tt&amp;gt;PLAPI_VERSION&amp;lt;/tt&amp;gt; has been renamed to &amp;lt;tt&amp;gt;METAMOD_PLAPI_VERSION&amp;lt;/tt&amp;gt;.  The version numbers for 1.1 to 1.4 can be described as:&lt;br /&gt;
*API Major: 1&lt;br /&gt;
*API Minor: 0, 1, 2, 3, 4, or 5&lt;br /&gt;
*Plugin API: 7, 8, 9, or 10&lt;br /&gt;
*Plugin API Minimum: 7&lt;br /&gt;
*SourceHook Interface: 4&lt;br /&gt;
*SourceHook Implementation: 3&lt;br /&gt;
*SourceHook Version: 4.3&lt;br /&gt;
&lt;br /&gt;
Versiono 1.5.0 (unureleased) had the following version numbers:&lt;br /&gt;
*API Major: 1&lt;br /&gt;
*API Minor: 6&lt;br /&gt;
*Plugin API: 11 or 12&lt;br /&gt;
*Plugin API Minimum: 7&lt;br /&gt;
*SourceHook Interface: 4&lt;br /&gt;
*SourceHook Implementation: 4&lt;br /&gt;
*SourceHook Version: 4.4&lt;br /&gt;
&lt;br /&gt;
Version 1.6.0 has the following version numbers:&lt;br /&gt;
*API Major: 2&lt;br /&gt;
*API Minor: 0&lt;br /&gt;
*Plugin API: (13 while alpha), 14&lt;br /&gt;
*Plugin API Minimum: 14&lt;br /&gt;
*SourceHook Interface: 5&lt;br /&gt;
*SourceHook Implementation: 5&lt;br /&gt;
*SourceHook Version: 5.0&lt;br /&gt;
&lt;br /&gt;
Major versions change only when the API is compatibly broken.  Minor versions are incremented on non-breaking API changes.  SourceHook's interface version is a major version, and its implementation version is a minor version.  However, SourceHook's minor version is not reset to 0 on major increments.  &lt;br /&gt;
&lt;br /&gt;
Additionally, all Metamod:Source public headers are now in a namespace called &amp;lt;tt&amp;gt;SourceMM&amp;lt;/tt&amp;gt;.  This namespace is integrated by default.  To disable this auto-integration, define &amp;lt;tt&amp;gt;METAMOD_NO_AUTO_NAMESPACE&amp;lt;/tt&amp;gt; at compile time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Additions=&lt;br /&gt;
*&amp;lt;tt&amp;gt;IMetamodListener&amp;lt;/tt&amp;gt; now has a new &amp;lt;tt&amp;gt;OnUnlinkConCommandBase&amp;lt;/tt&amp;gt; callback.&lt;br /&gt;
*&amp;lt;tt&amp;gt;ISmmAPI::Format&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ISmmAPI::FormatArgs&amp;lt;/tt&amp;gt; are new platform-safe replacements for &amp;lt;tt&amp;gt;snprintf&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;vsnprintf&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;tt&amp;gt;ISmmAPI::GetSourceEngineBuild()&amp;lt;/tt&amp;gt; returns a constant describing the Source engine version.&lt;br /&gt;
*&amp;lt;tt&amp;gt;ISmmAPI::GetVSPInfo()&amp;lt;/tt&amp;gt; returns information about Valve Server Plugin interface, if enabled through Metamod:Source.&lt;br /&gt;
&lt;br /&gt;
SourceHook has many new changes, the greatest of which is &amp;quot;global hooks,&amp;quot; which can hook a function on any number of instances of that derived class.  See [[SourceHook Development]] for more information.&lt;br /&gt;
&lt;br /&gt;
Metamod:Source 1.6.0 provides an alternative method of implementing a plugin's loading and instantiation process.  This method allows authors to implement very simple loader interfaces which can pass different plugin implementations based on the current Metamod:Source version.  For example, the loader can detect engine version A versus engine version B, and load an alternate library.&lt;br /&gt;
&lt;br /&gt;
This interface is exposed in &amp;lt;tt&amp;gt;ISmmPluginExt.h&amp;lt;/tt&amp;gt;, and to avoid linkage to any unnecessary externals, does not include any other Metamod:Source headers.  It is assumed that developers will know how to interpret the header file's specifications.&lt;br /&gt;
&lt;br /&gt;
Since earlier versions do not expose any such callback, it can be assumed that if the callback is called before &amp;lt;tt&amp;gt;CreateInterface&amp;lt;/tt&amp;gt; is called, then the plugin is being loaded by a version of Metamod:Source less than 1.6.0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sample Port=&lt;br /&gt;
An example of a plugin that has been fully ported to both Metamod:Source 1.6.0 is [http://www.bailopan.net/stripper Stripper:Source] ([http://svn.alliedmods.net/viewvc.cgi/sourcemm/stripper/?root=dvander SVN here]).  &lt;br /&gt;
&lt;br /&gt;
Note that this plugin uses the new &amp;quot;extended loading&amp;quot; API available in Metamod:Source 1.6.0.  The thin-loader library runs on any Metamod:Source version, and will correctly pick one of 6 child plugins to load.  This allows Stripper:Source to be distributed as one package with no configuration hassle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Metamod:Source Development]]&lt;/div&gt;</summary>
		<author><name>Mani</name></author>
		
	</entry>
</feed>