fixed typos in messsage processing

fixed loadlibrary code
fixed game identification in chatter
This commit is contained in:
jeefo 2016-03-13 11:58:35 +03:00
commit 730ce7a1d4
5 changed files with 32 additions and 29 deletions

View file

@ -179,7 +179,7 @@ public:
void TerminateTranslator (void);
// do actual network message processing
void ProcessMesageCapture (void *ptr);
void ProcessMessageCapture (void *ptr);
// public inlines
public:
@ -244,7 +244,7 @@ public:
}
// gets the player team
inline int GetTeam (edict_t *ent)
FORCEINLINE int GetTeam (edict_t *ent)
{
extern Client g_clients[MAX_ENGINE_PLAYERS];
@ -282,7 +282,7 @@ public:
}
// find registered message id
inline int FindMessageId (int type)
FORCEINLINE int FindMessageId (int type)
{
return m_msgBlock.regMsgs[type];
}

View file

@ -137,18 +137,21 @@ public:
return m_ptr;
}
inline void *GetFuncAddr (const char *function)
template <typename R> R GetFuncAddr (const char *function)
{
if (!IsLoaded ())
return NULL;
#ifdef PLATFORM_WIN32
return reinterpret_cast <void *> (GetProcAddress (static_cast <HMODULE> (m_ptr), function));
return reinterpret_cast <R> (GetProcAddress (static_cast <HMODULE> (m_ptr), function));
#else
return reinterpret_cast <void *> (dlsym (m_ptr, function));
return reinterpret_cast <R> (dlsym (m_ptr, function));
#endif
}
inline void *GetHandle (void)
template <typename R> R GetHandle (void)
{
return m_ptr;
return (R) m_ptr;
}
inline bool IsLoaded (void) const