1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-26 19:54:14 +01:00

Fixed amb277 - failed to get user message list in Kreedz Climbing

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40387
This commit is contained in:
Scott Ehlert 2007-05-11 19:14:21 +00:00
parent 9826153912
commit 5afc353875
3 changed files with 23 additions and 9 deletions

View File

@ -516,6 +516,11 @@ int CSmmAPI::GetGameDLLVersion()
#define MSGCLASS2_SIGLEN 16
#define MSGCLASS2_SIG "\x56\x8B\x74\x24\x2A\x85\xF6\x7C\x2A\x3B\x35\x2A\x2A\x2A\x2A\x7D"
#define MSGCLASS2_OFFS 11
/* Windows frame pointer sig */
#define MSGCLASS3_SIGLEN 18
#define MSGCLASS3_SIG "\x55\x8B\xEC\x51\x89\x2A\x2A\x8B\x2A\x2A\x50\x8B\x0D\x2A\x2A\x2A\x2A\xE8"
#define MSGCLASS3_OFFS 13
#elif defined OS_LINUX
/* No frame pointer sig */
#define MSGCLASS_SIGLEN 14
@ -586,6 +591,14 @@ bool CSmmAPI::CacheUserMessages()
/* Get address of CUserMessages::m_UserMessages */
dict = reinterpret_cast<UserMsgDict *>(*userMsgClass);
#endif
#ifdef OS_WIN32
} else if (vcmp(vfunc, MSGCLASS3_SIG, MSGCLASS3_SIGLEN)) {
/* Get address of CUserMessages instance */
char **userMsgClass = *reinterpret_cast<char ***>(vfunc + MSGCLASS3_OFFS);
/* Get address of CUserMessages::m_UserMessages */
dict = reinterpret_cast<UserMsgDict *>(*userMsgClass);
#endif
}
if (dict)

View File

@ -205,7 +205,7 @@ public: // Added in 1.1.2 (1:1)
*/
virtual int FormatIface(char iface[], unsigned int maxlength) =0;
public: // Added in 1.2 (1:2)
public: // Added in 1.2.0 (1:2)
/**
* @brief Searches for an interface for you.
*
@ -245,7 +245,7 @@ public: // Added in 1.2.2 (1:3)
*/
virtual void ClientConPrintf(edict_t *client, const char *fmt, ...) =0;
public: // Added in 1.3 (1:4)
public: // Added in 1.3.0 (1:4)
/**
* @brief Wrapper around InterfaceSearch(). Assumes no maximum.
* This is designed to replace the fact that searches only went upwards.
@ -262,7 +262,7 @@ public: // Added in 1.3 (1:4)
*/
virtual void *VInterfaceMatch(CreateInterfaceFn fn, const char *iface, int min=-1) =0;
public: // Added in 1.4 (1:5)
public: // Added in 1.4.0 (1:5)
/**
* @brief Tells SourceMM to add VSP hooking capability to plugins.
*
@ -303,7 +303,7 @@ public: // Added in 1.4 (1:5)
* @return Message name, or NULL on failure.
*/
virtual const char *GetUserMessage(int index, int *size=NULL) =0;
public: // Added in 1.4.1 (1:6)
public: // Added in 1.5.0 (1:6)
/**
* @brief Returns the highest interface version of IServerPluginCallbacks that the engine supports.
* This is useful for games that run on older versions of the Source engine, such as The Ship.
@ -320,11 +320,11 @@ public: // Added in 1.4.1 (1:6)
*
* 1.1.0 Bumped API to 1:0. The breaking changes occurred in SourceHook and the plugin API.
* 1.1.2 Added API call for generating iface names.
* 1.2 Added API more helper functions and new SourceHook version.
* 1.2.0 Added API more helper functions and new SourceHook version.
* 1.2.2 Added API for printing to client console (with string formatting).
* 1.3 Added new interface search API.
* 1.4 Added VSP listener and user message API.
* 1.4.1 Added API for getting highest supported version of IServerPluginCallbacks.
* 1.3.0 Added new interface search API.
* 1.4.0 Added VSP listener and user message API.
* 1.5.0 Added API for getting highest supported version of IServerPluginCallbacks.
*/
#endif //_INCLUDE_ISMM_API_H

View File

@ -1,7 +1,8 @@
2007/??/?? 1.4.1:
2007/??/?? 1.5.0:
- Added API for getting highest supported IServerPluginCallbacks interface version.
- The client version of the "meta" command should now work on games that use
ServerGameClients004 and beyond.
- Fixed amb277 (failed to get user message list in Kreezd Climbing).
2007/04/05 1.4.0:
- Added API functions for retrieving User Message info without potentially crashing.