initial import of fakemeta_amxx
This commit is contained in:
parent
166bbc1101
commit
2fb9a5d4b5
442
dlls/fakemeta/CVector.h
Executable file
442
dlls/fakemeta/CVector.h
Executable file
|
@ -0,0 +1,442 @@
|
||||||
|
/* AMX Mod X
|
||||||
|
*
|
||||||
|
* by the AMX Mod X Development Team
|
||||||
|
* originally developed by OLO
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* In addition, as a special exception, the author gives permission to
|
||||||
|
* link the code of this program with the Half-Life Game Engine ("HL
|
||||||
|
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||||
|
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||||
|
* respects for all of the code used other than the HL Engine and MODs
|
||||||
|
* from Valve. If you modify this file, you may extend this exception
|
||||||
|
* to your version of the file, but you are not obligated to do so. If
|
||||||
|
* you do not wish to do so, delete this exception statement from your
|
||||||
|
* version.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __CVECTOR_H__
|
||||||
|
#define __CVECTOR_H__
|
||||||
|
|
||||||
|
// Vector
|
||||||
|
template <class T> class CVector
|
||||||
|
{
|
||||||
|
bool Grow()
|
||||||
|
{
|
||||||
|
// automatic grow
|
||||||
|
size_t newSize = m_Size * 2;
|
||||||
|
if (newSize == 0)
|
||||||
|
newSize = 8; // a good init value
|
||||||
|
T *newData = new T[newSize];
|
||||||
|
if (!newData)
|
||||||
|
return false;
|
||||||
|
if (m_Data)
|
||||||
|
{
|
||||||
|
memcpy(newData, m_Data, m_Size * sizeof(T));
|
||||||
|
delete [] m_Data;
|
||||||
|
}
|
||||||
|
m_Data = newData;
|
||||||
|
m_Size = newSize;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GrowIfNeeded()
|
||||||
|
{
|
||||||
|
if (m_CurrentUsedSize >= m_Size)
|
||||||
|
return Grow();
|
||||||
|
else
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ChangeSize(size_t size)
|
||||||
|
{
|
||||||
|
// change size
|
||||||
|
if (size == m_Size)
|
||||||
|
return true;
|
||||||
|
T *newData = new T[size];
|
||||||
|
if (!newData)
|
||||||
|
return false;
|
||||||
|
if (m_Data)
|
||||||
|
{
|
||||||
|
memcpy(newData, m_Data, (m_Size < size) ? (m_Size * sizeof(T)) : (size * sizeof(T)));
|
||||||
|
delete [] m_Data;
|
||||||
|
}
|
||||||
|
if (m_Size < size)
|
||||||
|
m_CurrentUsedSize = size;
|
||||||
|
m_Data = newData;
|
||||||
|
m_Size = size;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeMemIfPossible()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
protected:
|
||||||
|
T *m_Data;
|
||||||
|
size_t m_Size;
|
||||||
|
size_t m_CurrentUsedSize;
|
||||||
|
size_t m_CurrentSize;
|
||||||
|
public:
|
||||||
|
class iterator
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
T *m_Ptr;
|
||||||
|
public:
|
||||||
|
// constructors / destructors
|
||||||
|
iterator()
|
||||||
|
{
|
||||||
|
m_Ptr = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator(T * ptr)
|
||||||
|
{
|
||||||
|
m_Ptr = ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
// member functions
|
||||||
|
T * base()
|
||||||
|
{
|
||||||
|
return m_Ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
const T * base() const
|
||||||
|
{
|
||||||
|
return m_Ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
// operators
|
||||||
|
T & operator*()
|
||||||
|
{
|
||||||
|
return *m_Ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
T * operator->()
|
||||||
|
{
|
||||||
|
return m_Ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator & operator++() // preincrement
|
||||||
|
{
|
||||||
|
++m_Ptr;
|
||||||
|
return (*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator operator++(int) // postincrement
|
||||||
|
{
|
||||||
|
iterator tmp = *this;
|
||||||
|
++m_Ptr;
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator & operator--() // predecrement
|
||||||
|
{
|
||||||
|
--m_Ptr;
|
||||||
|
return (*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator operator--(int) // postdecrememnt
|
||||||
|
{
|
||||||
|
iterator tmp = *this;
|
||||||
|
--m_Ptr;
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator==(T * right) const
|
||||||
|
{
|
||||||
|
return (m_Ptr == right);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator==(const iterator & right) const
|
||||||
|
{
|
||||||
|
return (m_Ptr == right.m_Ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator!=(T * right) const
|
||||||
|
{
|
||||||
|
return (m_Ptr != right);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator!=(const iterator & right) const
|
||||||
|
{
|
||||||
|
return (m_Ptr != right.m_Ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator & operator+=(size_t offset)
|
||||||
|
{
|
||||||
|
m_Ptr += offset;
|
||||||
|
return (*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator & operator-=(size_t offset)
|
||||||
|
{
|
||||||
|
m_Ptr += offset;
|
||||||
|
return (*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator operator+(size_t offset) const
|
||||||
|
{
|
||||||
|
iterator tmp(*this);
|
||||||
|
tmp.m_Ptr += offset;
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator operator-(size_t offset) const
|
||||||
|
{
|
||||||
|
iterator tmp(*this);
|
||||||
|
tmp.m_Ptr += offset;
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
T & operator[](size_t offset)
|
||||||
|
{
|
||||||
|
return (*(*this + offset));
|
||||||
|
}
|
||||||
|
|
||||||
|
const T & operator[](size_t offset) const
|
||||||
|
{
|
||||||
|
return (*(*this + offset));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator<(const iterator & right) const
|
||||||
|
{
|
||||||
|
return m_Ptr < right.m_Ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator>(const iterator & right) const
|
||||||
|
{
|
||||||
|
return m_Ptr > right.m_Ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator<=(const iterator & right) const
|
||||||
|
{
|
||||||
|
return m_Ptr <= right.m_Ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator>=(const iterator & right) const
|
||||||
|
{
|
||||||
|
return m_Ptr >= right.m_Ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t operator-(const iterator & right) const
|
||||||
|
{
|
||||||
|
return m_Ptr - right.m_Ptr;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// constructors / destructors
|
||||||
|
CVector<T>()
|
||||||
|
{
|
||||||
|
m_Size = 0;
|
||||||
|
m_CurrentUsedSize = 0;
|
||||||
|
m_Data = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
CVector<T>(const CVector<T> & other)
|
||||||
|
{
|
||||||
|
// copy data
|
||||||
|
m_Data = new T [other.m_Size];
|
||||||
|
m_Size = other.m_Size;
|
||||||
|
m_CurrentUsedSize = other.m_CurrentUsedSize;
|
||||||
|
memcpy(m_Data, other.m_Data, m_CurrentUsedSize * sizeof(T));
|
||||||
|
}
|
||||||
|
|
||||||
|
~CVector<T>()
|
||||||
|
{
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
// interface
|
||||||
|
size_t size() const
|
||||||
|
{
|
||||||
|
return m_CurrentUsedSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t capacity() const
|
||||||
|
{
|
||||||
|
return m_Size;
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator begin()
|
||||||
|
{
|
||||||
|
return iterator(m_Data);
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator end()
|
||||||
|
{
|
||||||
|
return iterator(m_Data + m_CurrentUsedSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator iterAt(size_t pos)
|
||||||
|
{
|
||||||
|
if (pos > m_CurrentUsedSize)
|
||||||
|
ASSERT(0);
|
||||||
|
return iterator(m_Data + pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool reserve(size_t newSize)
|
||||||
|
{
|
||||||
|
return ChangeSize(newSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool push_back(const T & elem)
|
||||||
|
{
|
||||||
|
++m_CurrentUsedSize;
|
||||||
|
if (!GrowIfNeeded())
|
||||||
|
{
|
||||||
|
--m_CurrentUsedSize;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_Data[m_CurrentUsedSize - 1] = elem;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void pop_back()
|
||||||
|
{
|
||||||
|
--m_CurrentUsedSize;
|
||||||
|
if (m_CurrentUsedSize < 0)
|
||||||
|
m_CurrentUsedSize = 0;
|
||||||
|
// :TODO: free memory sometimes
|
||||||
|
}
|
||||||
|
|
||||||
|
bool resize(size_t newSize)
|
||||||
|
{
|
||||||
|
if (!ChangeSize(newSize))
|
||||||
|
return false;
|
||||||
|
FreeMemIfPossible();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool empty() const
|
||||||
|
{
|
||||||
|
return (m_CurrentUsedSize == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
T & at(size_t pos)
|
||||||
|
{
|
||||||
|
if (pos > m_CurrentUsedSize)
|
||||||
|
{
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
return m_Data[pos];
|
||||||
|
}
|
||||||
|
|
||||||
|
const T & at(size_t pos) const
|
||||||
|
{
|
||||||
|
if (pos > m_CurrentUsedSize)
|
||||||
|
{
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
return m_Data[pos];
|
||||||
|
}
|
||||||
|
|
||||||
|
T & operator[](size_t pos)
|
||||||
|
{
|
||||||
|
return at(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
const T & operator[](size_t pos) const
|
||||||
|
{
|
||||||
|
return at(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
T & front()
|
||||||
|
{
|
||||||
|
if (m_CurrentUsedSize < 1)
|
||||||
|
{
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
return m_Data[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
const T & front() const
|
||||||
|
{
|
||||||
|
if (m_CurrentUsedSize < 1)
|
||||||
|
{
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
return m_Data[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
T & back()
|
||||||
|
{
|
||||||
|
if (m_CurrentUsedSize < 1)
|
||||||
|
{
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
return m_Data[m_CurrentUsedSize - 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
const T & back() const
|
||||||
|
{
|
||||||
|
if (m_CurrentUsedSize < 1)
|
||||||
|
{
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
return m_Data[m_CurrentUsedSize - 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
bool insert(iterator where, const T & value)
|
||||||
|
{
|
||||||
|
// we have to insert before
|
||||||
|
// if it is begin, don't decrement
|
||||||
|
if (where != m_Data)
|
||||||
|
--where;
|
||||||
|
// validate iter
|
||||||
|
if (where < m_Data || where >= (m_Data + m_CurrentUsedSize))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
++m_CurrentUsedSize;
|
||||||
|
if (!GrowIfNeeded())
|
||||||
|
{
|
||||||
|
--m_CurrentUsedSize;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
memmove(where.base() + 1, where.base(), m_CurrentUsedSize - (where - m_Data));
|
||||||
|
memcpy(where.base(), &value, sizeof(T));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void erase(iterator where)
|
||||||
|
{
|
||||||
|
// validate iter
|
||||||
|
if (where < m_Data || where >= (m_Data + m_CurrentUsedSize))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (m_CurrentUsedSize > 1)
|
||||||
|
{
|
||||||
|
// move
|
||||||
|
memmove(where.base(), where.base() + 1, m_CurrentUsedSize - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
--m_CurrentUsedSize;
|
||||||
|
// :TODO: free memory sometimes
|
||||||
|
}
|
||||||
|
|
||||||
|
void clear()
|
||||||
|
{
|
||||||
|
m_Size = 0;
|
||||||
|
m_CurrentUsedSize = 0;
|
||||||
|
delete [] m_Data;
|
||||||
|
m_Data = NULL;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __CVECTOR_H__
|
||||||
|
|
224
dlls/fakemeta/dllfunc.cpp
Executable file
224
dlls/fakemeta/dllfunc.cpp
Executable file
|
@ -0,0 +1,224 @@
|
||||||
|
#include "fakemeta_amxx.h"
|
||||||
|
|
||||||
|
//by mahnsawce from his NS module
|
||||||
|
static cell AMX_NATIVE_CALL dllfunc(AMX *amx,cell *params)
|
||||||
|
{
|
||||||
|
int type;
|
||||||
|
int index;
|
||||||
|
int indexb;
|
||||||
|
char *temp = "";
|
||||||
|
char *temp2 = "";
|
||||||
|
char *temp3 = "";
|
||||||
|
vec3_t Vec1;
|
||||||
|
vec3_t Vec2;
|
||||||
|
int iparam1;
|
||||||
|
int len;
|
||||||
|
cell *cRet;
|
||||||
|
type = params[1];
|
||||||
|
switch(type)
|
||||||
|
{
|
||||||
|
|
||||||
|
// pfnGameInit
|
||||||
|
case DLLFunc_GameInit: // void) ( void );
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnGameInit();
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
// pfnSpawn
|
||||||
|
case DLLFunc_Spawn: // int ) ( edict_t *pent );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
return gpGamedllFuncs->dllapi_table->pfnSpawn(INDEXENT(index));
|
||||||
|
|
||||||
|
// pfnThink
|
||||||
|
case DLLFunc_Think: // void ) ( edict_t *pent );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnThink(INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
// pfnUse
|
||||||
|
case DLLFunc_Use: // void ) ( edict_t *pentUsed, edict_t *pentOther );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
indexb=cRet[0];
|
||||||
|
CHECK_ENTITY(indexb);
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnUse(INDEXENT(index),INDEXENT(indexb));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
// pfnTouch
|
||||||
|
case DLLFunc_Touch: // void ) ( edict_t *pentTouched, edict_t *pentOther );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
indexb=cRet[0];
|
||||||
|
CHECK_ENTITY(indexb);
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnTouch(INDEXENT(index),INDEXENT(indexb));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case DLLFunc_Blocked: // void ) ( edict_t *pentBlocked, edict_t *pentOther );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
indexb=cRet[0];
|
||||||
|
CHECK_ENTITY(indexb);
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnBlocked(INDEXENT(index),INDEXENT(indexb));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
case DLLFunc_SetAbsBox: // void ) ( edict_t *pent );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnSetAbsBox(INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case DLLFunc_ClientConnect: // bool) ( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] );
|
||||||
|
// index,szName,szAddress,szRetRejectReason,size
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
temp = MF_GetAmxString(amx,params[3],0,&len);
|
||||||
|
temp2 = MF_GetAmxString(amx,params[4],1,&len);
|
||||||
|
//temp3 = GET_AMXSTRING(amx,params[5],2,len);
|
||||||
|
iparam1 = MDLL_ClientConnect(INDEXENT(index),STRING(ALLOC_STRING(temp)),STRING(ALLOC_STRING(temp2)),temp3);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[6]);
|
||||||
|
MF_SetAmxString(amx,params[5],temp3,cRet[0]);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case DLLFunc_ClientDisconnect: // void ) ( edict_t *pEntity );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnClientDisconnect(INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case DLLFunc_ClientKill: // void ) ( edict_t *pEntity );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnClientKill(INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case DLLFunc_ClientPutInServer: // void ) ( edict_t *pEntity );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnClientPutInServer(INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case DLLFunc_ServerDeactivate: // void) ( void );
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnServerDeactivate();
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case DLLFunc_PlayerPreThink: // void ) ( edict_t *pEntity );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnPlayerPreThink(INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case DLLFunc_PlayerPostThink: // void ) ( edict_t *pEntity );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnPlayerPostThink(INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case DLLFunc_StartFrame: // void ) ( void );
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnStartFrame();
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case DLLFunc_ParmsNewLevel: // void ) ( void );
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnParmsNewLevel();
|
||||||
|
|
||||||
|
|
||||||
|
case DLLFunc_ParmsChangeLevel: // void ) ( void );
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnParmsChangeLevel();
|
||||||
|
|
||||||
|
// Returns string describing current .dll. E.g., TeamFotrress 2, Half-Life
|
||||||
|
case DLLFunc_GetGameDescription: // const char * )( void );
|
||||||
|
temp = (char*)gpGamedllFuncs->dllapi_table->pfnGetGameDescription();
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
MF_SetAmxString(amx,params[2],temp,cRet[0]);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
// Spectator funcs
|
||||||
|
case DLLFunc_SpectatorConnect: // void) ( edict_t *pEntity );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnSpectatorConnect(INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
case DLLFunc_SpectatorDisconnect: // void ) ( edict_t *pEntity );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnSpectatorDisconnect(INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
case DLLFunc_SpectatorThink: // void ) ( edict_t *pEntity );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnSpectatorThink(INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
// Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint.
|
||||||
|
case DLLFunc_Sys_Error: // void ) ( const char *error_string );
|
||||||
|
temp = MF_GetAmxString(amx,params[2],0,&len);
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnSys_Error(STRING(ALLOC_STRING(temp)));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case DLLFunc_PM_FindTextureType: // char )( char *name );
|
||||||
|
temp = MF_GetAmxString(amx,params[2],0,&len);
|
||||||
|
return gpGamedllFuncs->dllapi_table->pfnPM_FindTextureType(temp);
|
||||||
|
|
||||||
|
case DLLFunc_RegisterEncoders: // void ) ( void );
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnRegisterEncoders;
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
// Enumerates player hulls. Returns 0 if the hull number doesn't exist, 1 otherwise
|
||||||
|
case DLLFunc_GetHullBounds: // int) ( int hullnumber, float *mins, float *maxs );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
iparam1 = gpGamedllFuncs->dllapi_table->pfnGetHullBounds(cRet[0],Vec1,Vec2);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
cRet[0]=amx_ftoc(Vec1[0]);
|
||||||
|
cRet[1]=amx_ftoc(Vec1[1]);
|
||||||
|
cRet[2]=amx_ftoc(Vec1[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
cRet[0]=amx_ftoc(Vec2[0]);
|
||||||
|
cRet[1]=amx_ftoc(Vec2[1]);
|
||||||
|
cRet[2]=amx_ftoc(Vec2[2]);
|
||||||
|
return iparam1;
|
||||||
|
|
||||||
|
// Create baselines for certain "unplaced" items.
|
||||||
|
case DLLFunc_CreateInstancedBaselines: // void ) ( void );
|
||||||
|
gpGamedllFuncs->dllapi_table->pfnCreateInstancedBaselines();
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case DLLFunc_pfnAllowLagCompensation: // int )( void );
|
||||||
|
return gpGamedllFuncs->dllapi_table->pfnAllowLagCompensation();
|
||||||
|
// I know this doesn't fit with dllfunc, but I dont want to create another native JUST for this.
|
||||||
|
case MetaFunc_CallGameEntity: // bool (plid_t plid, const char *entStr,entvars_t *pev);
|
||||||
|
temp = MF_GetAmxString(amx,params[2],0,&len);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
iparam1 = gpMetaUtilFuncs->pfnCallGameEntity(PLID,STRING(ALLOC_STRING(temp)),VARS(INDEXENT(index)));
|
||||||
|
return iparam1;
|
||||||
|
default:
|
||||||
|
MF_Log("Unknown dllfunc entry.");
|
||||||
|
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AMX_NATIVE_INFO dllfunc_natives[] = {
|
||||||
|
{"dllfunc", dllfunc},
|
||||||
|
{NULL, NULL},
|
||||||
|
};
|
54
dlls/fakemeta/dllfunc.h
Executable file
54
dlls/fakemeta/dllfunc.h
Executable file
|
@ -0,0 +1,54 @@
|
||||||
|
#ifndef _INCLUDE_DLLFUNC_H
|
||||||
|
#define _INCLUDE_DLLFUNC_H
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
DLLFunc_GameInit, // void) ( void );
|
||||||
|
DLLFunc_Spawn, // int ) ( edict_t *pent );
|
||||||
|
DLLFunc_Think, // void ) ( edict_t *pent );
|
||||||
|
DLLFunc_Use, // void ) ( edict_t *pentUsed, edict_t *pentOther );
|
||||||
|
DLLFunc_Touch, // void ) ( edict_t *pentTouched, edict_t *pentOther );
|
||||||
|
DLLFunc_Blocked, // void ) ( edict_t *pentBlocked, edict_t *pentOther );
|
||||||
|
DLLFunc_KeyValue, // void ) ( edict_t *pentKeyvalue, KeyValueData *pkvd );
|
||||||
|
DLLFunc_SetAbsBox, // void ) ( edict_t *pent );
|
||||||
|
DLLFunc_ClientConnect, // bool) ( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] );
|
||||||
|
|
||||||
|
DLLFunc_ClientDisconnect, // void ) ( edict_t *pEntity );
|
||||||
|
DLLFunc_ClientKill, // void ) ( edict_t *pEntity );
|
||||||
|
DLLFunc_ClientPutInServer, // void ) ( edict_t *pEntity );
|
||||||
|
DLLFunc_ClientCommand, // void ) ( edict_t *pEntity );
|
||||||
|
|
||||||
|
DLLFunc_ServerDeactivate, // void) ( void );
|
||||||
|
|
||||||
|
DLLFunc_PlayerPreThink, // void ) ( edict_t *pEntity );
|
||||||
|
DLLFunc_PlayerPostThink, // void ) ( edict_t *pEntity );
|
||||||
|
|
||||||
|
DLLFunc_StartFrame, // void ) ( void );
|
||||||
|
DLLFunc_ParmsNewLevel, // void ) ( void );
|
||||||
|
DLLFunc_ParmsChangeLevel, // void ) ( void );
|
||||||
|
|
||||||
|
// Returns string describing current .dll. E.g., TeamFotrress 2, Half-Life
|
||||||
|
DLLFunc_GetGameDescription, // const char * )( void );
|
||||||
|
|
||||||
|
// Spectator funcs
|
||||||
|
DLLFunc_SpectatorConnect, // void) ( edict_t *pEntity );
|
||||||
|
DLLFunc_SpectatorDisconnect, // void ) ( edict_t *pEntity );
|
||||||
|
DLLFunc_SpectatorThink, // void ) ( edict_t *pEntity );
|
||||||
|
|
||||||
|
// Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint.
|
||||||
|
DLLFunc_Sys_Error, // void ) ( const char *error_string );
|
||||||
|
|
||||||
|
DLLFunc_PM_FindTextureType, // char )( char *name );
|
||||||
|
DLLFunc_RegisterEncoders, // void ) ( void );
|
||||||
|
|
||||||
|
// Enumerates player hulls. Returns 0 if the hull number doesn't exist, 1 otherwise
|
||||||
|
DLLFunc_GetHullBounds, // int) ( int hullnumber, float *mins, float *maxs );
|
||||||
|
|
||||||
|
// Create baselines for certain "unplaced" items.
|
||||||
|
DLLFunc_CreateInstancedBaselines, // void ) ( void );
|
||||||
|
DLLFunc_pfnAllowLagCompensation, // int )( void );
|
||||||
|
// I know this does not fit with DLLFUNC(), but I dont want another native just for it.
|
||||||
|
MetaFunc_CallGameEntity // bool (plid_t plid, const char *entStr,entvars_t *pev);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //_INCLUDE_DLLFUNC_H
|
975
dlls/fakemeta/engfunc.cpp
Executable file
975
dlls/fakemeta/engfunc.cpp
Executable file
|
@ -0,0 +1,975 @@
|
||||||
|
#include "fakemeta_amxx.h"
|
||||||
|
|
||||||
|
TraceResult g_tr;
|
||||||
|
|
||||||
|
//by mahnsawce from his NS module
|
||||||
|
static cell AMX_NATIVE_CALL engfunc(AMX *amx, cell *params)
|
||||||
|
{
|
||||||
|
// Variables I will need throughout all the different calls.
|
||||||
|
int type = params[1];
|
||||||
|
// LOG_CONSOLE(PLID,"Called: %i %i",type,*params/sizeof(cell));
|
||||||
|
int len;
|
||||||
|
char *temp;
|
||||||
|
char *temp2;
|
||||||
|
cell *cRet;
|
||||||
|
vec3_t Vec1;
|
||||||
|
vec3_t Vec2;
|
||||||
|
vec3_t Vec3;
|
||||||
|
vec3_t Vec4;
|
||||||
|
int iparam1;
|
||||||
|
int iparam2;
|
||||||
|
int iparam3;
|
||||||
|
int iparam4;
|
||||||
|
int iparam5;
|
||||||
|
int iparam6;
|
||||||
|
float fparam1;
|
||||||
|
float fparam2;
|
||||||
|
float fparam3;
|
||||||
|
// float fTemp[3];
|
||||||
|
int index;
|
||||||
|
edict_t *pRet=NULL;
|
||||||
|
// Now start calling.. :/
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
// pfnPrecacheModel
|
||||||
|
case EngFunc_PrecacheModel: // int ) (char* s);
|
||||||
|
temp = MF_GetAmxString(amx,params[2],0,&len);
|
||||||
|
if (temp[0]==0)
|
||||||
|
return 0;
|
||||||
|
return (*g_engfuncs.pfnPrecacheModel)((char*)STRING(ALLOC_STRING(temp)));
|
||||||
|
|
||||||
|
|
||||||
|
// pfnPrecacheSound
|
||||||
|
case EngFunc_PrecacheSound: // int ) (char* s);
|
||||||
|
temp = MF_GetAmxString(amx,params[2],0,&len);
|
||||||
|
if (temp[0]==0)
|
||||||
|
return 0;
|
||||||
|
return (*g_engfuncs.pfnPrecacheSound)((char*)STRING(ALLOC_STRING(temp)));
|
||||||
|
|
||||||
|
|
||||||
|
// pfnSetModel
|
||||||
|
case EngFunc_SetModel: // void ) (edict_t *e, const char *m);
|
||||||
|
temp = MF_GetAmxString(amx,params[3],0,&len);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
(*g_engfuncs.pfnSetModel)(INDEXENT(index),(char*)STRING(ALLOC_STRING(temp)));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnModelIndex
|
||||||
|
case EngFunc_ModelIndex:
|
||||||
|
temp = MF_GetAmxString(amx,params[2],0,&len);
|
||||||
|
return (*g_engfuncs.pfnModelIndex)(temp);
|
||||||
|
|
||||||
|
|
||||||
|
// pfnModelFrames
|
||||||
|
case EngFunc_ModelFrames: // int ) (int modelIndex);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
return (*g_engfuncs.pfnModelFrames)(index);
|
||||||
|
|
||||||
|
|
||||||
|
// pfnSetSize
|
||||||
|
case EngFunc_SetSize: // void ) (edict_t *e, const float *rgflMin, const float *rgflMax);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
Vec2[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec2[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec2[2]=amx_ctof(cRet[2]);
|
||||||
|
(*g_engfuncs.pfnSetSize)(INDEXENT(index),Vec1,Vec2);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnChangeLevel (is this needed?)
|
||||||
|
case EngFunc_ChangeLevel: // void ) (char* s1, char* s2);
|
||||||
|
temp = MF_GetAmxString(amx,params[2],0,&len);
|
||||||
|
temp2 = MF_GetAmxString(amx,params[3],1,&len);
|
||||||
|
(*g_engfuncs.pfnChangeLevel)(temp,temp2);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnVecToYaw
|
||||||
|
case EngFunc_VecToYaw: // float) (const float *rgflVector);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
fparam1= (*g_engfuncs.pfnVecToYaw)(Vec1);
|
||||||
|
cRet[0] = amx_ftoc(fparam1);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnVecToAngles
|
||||||
|
case EngFunc_VecToAngles: // void ) (const float *rgflVectorIn, float *rgflVectorOut);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
|
||||||
|
(*g_engfuncs.pfnVecToAngles)(Vec1,Vec2);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
cRet[0]=amx_ftoc(Vec2[0]);
|
||||||
|
cRet[1]=amx_ftoc(Vec2[1]);
|
||||||
|
cRet[2]=amx_ftoc(Vec2[2]);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnMoveToOrigin
|
||||||
|
case EngFunc_MoveToOrigin: // void ) (edict_t *ent, const float *pflGoal, float dist, int iMoveType);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
fparam1=amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
iparam1=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
(*g_engfuncs.pfnMoveToOrigin)(INDEXENT(index),Vec1,fparam1,iparam1);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnChangeYaw
|
||||||
|
case EngFunc_ChangeYaw: // void ) (edict_t* ent);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
(*g_engfuncs.pfnChangeYaw)(INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnChangePitch
|
||||||
|
case EngFunc_ChangePitch: // void ) (edict_t* ent);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
(*g_engfuncs.pfnChangePitch)(INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnFindEntityByString
|
||||||
|
case EngFunc_FindEntityByString: // edict) (edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
temp = MF_GetAmxString(amx,params[3],0,&len);
|
||||||
|
temp2 = MF_GetAmxString(amx,params[4],1,&len);
|
||||||
|
pRet = (*g_engfuncs.pfnFindEntityByString)(index == -1 ? NULL : INDEXENT(index),temp,temp2);
|
||||||
|
if (pRet)
|
||||||
|
return ENTINDEX(pRet);
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnGetEntityIllum
|
||||||
|
case EngFunc_GetEntityIllum: // int ) (edict_t* pEnt);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
return (*g_engfuncs.pfnGetEntityIllum)(INDEXENT(index));
|
||||||
|
|
||||||
|
|
||||||
|
// pfnFindEntityInSphere
|
||||||
|
case EngFunc_FindEntityInSphere: // edict) (edict_t *pEdictStartSearchAfter, const float *org, float rad);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
fparam1 = amx_ctof(cRet[0]);
|
||||||
|
pRet = (*g_engfuncs.pfnFindEntityInSphere)(index == -1 ? NULL : INDEXENT(index),Vec1,fparam1);
|
||||||
|
if (pRet)
|
||||||
|
return ENTINDEX(pRet);
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnFindClientsInPVS
|
||||||
|
case EngFunc_FindClientInPVS: // edict) (edict_t *pEdict);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
pRet=(*g_engfuncs.pfnFindClientInPVS)(INDEXENT(index));
|
||||||
|
return ENTINDEX(pRet);
|
||||||
|
|
||||||
|
|
||||||
|
// pfnEntitiesInPVS
|
||||||
|
case EngFunc_EntitiesInPVS: // edict) (edict_t *pplayer);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
pRet=(*g_engfuncs.pfnEntitiesInPVS)(INDEXENT(index));
|
||||||
|
return ENTINDEX(pRet);
|
||||||
|
|
||||||
|
|
||||||
|
// pfnMakeVectors
|
||||||
|
case EngFunc_MakeVectors: // void ) (const float *rgflVector);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
(*g_engfuncs.pfnMakeVectors)(Vec1);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnAngleVectors
|
||||||
|
case EngFunc_AngleVectors: // void ) (const float *rgflVector, float *forward, float *right, float *up);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
(*g_engfuncs.pfnAngleVectors)(Vec1,Vec2,Vec3,Vec4);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
cRet[0] = amx_ftoc(Vec2[0]);
|
||||||
|
cRet[1] = amx_ftoc(Vec2[1]);
|
||||||
|
cRet[2] = amx_ftoc(Vec2[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
cRet[0] = amx_ftoc(Vec3[0]);
|
||||||
|
cRet[1] = amx_ftoc(Vec3[1]);
|
||||||
|
cRet[2] = amx_ftoc(Vec3[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
cRet[0] = amx_ftoc(Vec4[0]);
|
||||||
|
cRet[1] = amx_ftoc(Vec4[1]);
|
||||||
|
cRet[2] = amx_ftoc(Vec4[2]);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnCreateEntity
|
||||||
|
case EngFunc_CreateEntity: // edict) (void);
|
||||||
|
pRet = (*g_engfuncs.pfnCreateEntity)();
|
||||||
|
if (pRet)
|
||||||
|
return ENTINDEX(pRet);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnRemoveEntity
|
||||||
|
case EngFunc_RemoveEntity: // void ) (edict_t* e);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
if (index == 0)
|
||||||
|
return 0;
|
||||||
|
(*g_engfuncs.pfnRemoveEntity)(INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnCreateNamedEntity
|
||||||
|
case EngFunc_CreateNamedEntity: // edict) (int className);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
pRet = (*g_engfuncs.pfnCreateNamedEntity)(iparam1);
|
||||||
|
if (pRet)
|
||||||
|
return ENTINDEX(pRet);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnMakeStatic
|
||||||
|
case EngFunc_MakeStatic: // void ) (edict_t *ent);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
(*g_engfuncs.pfnMakeStatic)(INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnEntIsOnFloor
|
||||||
|
case EngFunc_EntIsOnFloor: // int ) (edict_t *e);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
return (*g_engfuncs.pfnEntIsOnFloor)(INDEXENT(index));
|
||||||
|
|
||||||
|
|
||||||
|
// pfnDropToFloor
|
||||||
|
case EngFunc_DropToFloor: // int ) (edict_t* e);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
return (*g_engfuncs.pfnDropToFloor)(INDEXENT(index));
|
||||||
|
|
||||||
|
|
||||||
|
// pfnWalkMove
|
||||||
|
case EngFunc_WalkMove: // int ) (edict_t *ent, float yaw, float dist, int iMode);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
fparam1 = amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
fparam2 = amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
return (*g_engfuncs.pfnWalkMove)(INDEXENT(index),fparam1,fparam2,iparam1);
|
||||||
|
|
||||||
|
|
||||||
|
// pfnSetOrigin
|
||||||
|
case EngFunc_SetOrigin: // void ) (edict_t *e, const float *rgflOrigin);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
(*g_engfuncs.pfnSetOrigin)(INDEXENT(index),Vec1);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnEmitSound
|
||||||
|
case EngFunc_EmitSound: // void ) (edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
iparam1=cRet[0];
|
||||||
|
temp = MF_GetAmxString(amx,params[4],0,&len);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
fparam1=amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[6]);
|
||||||
|
fparam2=amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[7]);
|
||||||
|
iparam2=cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[8]);
|
||||||
|
iparam3=cRet[0];
|
||||||
|
(*g_engfuncs.pfnEmitSound)(INDEXENT(index),iparam1,temp,fparam1,fparam2,iparam2,iparam3);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnEmitAmbientSound
|
||||||
|
case EngFunc_EmitAmbientSound: // void ) (edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
temp = MF_GetAmxString(amx,params[4],0,&len);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
fparam1=amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[6]);
|
||||||
|
fparam2=amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[7]);
|
||||||
|
iparam1=cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[8]);
|
||||||
|
iparam2=cRet[0];
|
||||||
|
(*g_engfuncs.pfnEmitAmbientSound)(INDEXENT(index),Vec1,temp,fparam1,fparam2,iparam1,iparam2);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
// pfnTraceLine
|
||||||
|
case EngFunc_TraceLine: // void ) (const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
Vec2[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec2[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec2[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
iparam1=cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
index=cRet[0];
|
||||||
|
(*g_engfuncs.pfnTraceLine)(Vec1,Vec2,iparam1,index != -1 ? INDEXENT(index) : NULL, &g_tr);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnTraceToss
|
||||||
|
case EngFunc_TraceToss: // void ) (edict_t* pent, edict_t* pentToIgnore, TraceResult *ptr);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
(*g_engfuncs.pfnTraceToss)(INDEXENT(index),iparam1 == -1 ? NULL : INDEXENT(iparam1),&g_tr);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnTraceMonsterHull
|
||||||
|
case EngFunc_TraceMonsterHull: // int ) (edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
Vec2[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec2[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec2[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
iparam1=cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[6]);
|
||||||
|
iparam2=cRet[0];
|
||||||
|
(*g_engfuncs.pfnTraceMonsterHull)(INDEXENT(index),Vec1,Vec2,iparam1,iparam2 == 0 ? NULL : INDEXENT(iparam2),&g_tr);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnTraceHull
|
||||||
|
case EngFunc_TraceHull: // void ) (const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
Vec2[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec2[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec2[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
iparam2 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[6]);
|
||||||
|
iparam3 = cRet[0];
|
||||||
|
(*g_engfuncs.pfnTraceHull)(Vec1,Vec2,iparam1,iparam2,iparam3 == 0 ? 0 : INDEXENT(iparam3),&g_tr);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnTraceModel
|
||||||
|
case EngFunc_TraceModel: // void ) (const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
Vec2[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec2[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec2[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
iparam2 = cRet[0];
|
||||||
|
(*g_engfuncs.pfnTraceModel)(Vec1,Vec2,iparam1,iparam2 == 0 ? NULL : INDEXENT(iparam2),&g_tr);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnTraceTexture
|
||||||
|
case EngFunc_TraceTexture: // const char *) (edict_t *pTextureEntity, const float *v1, const float *v2 );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
Vec2[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec2[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec2[2]=amx_ctof(cRet[2]);
|
||||||
|
temp = (char*)(*g_engfuncs.pfnTraceTexture)(INDEXENT(index),Vec1,Vec2);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[6]);
|
||||||
|
MF_SetAmxString(amx, params[5], temp, cRet[0]);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnTraceSphere
|
||||||
|
case EngFunc_TraceSphere: // void ) (const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
Vec2[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec2[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec2[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
fparam1 = amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[6]);
|
||||||
|
index = cRet[0];
|
||||||
|
(*g_engfuncs.pfnTraceSphere)(Vec1,Vec2,iparam1,fparam1,index == 0 ? NULL : INDEXENT(index),&g_tr);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnGetAimVector
|
||||||
|
case EngFunc_GetAimVector: // void ) (edict_t* ent, float speed, float *rgflReturn);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
fparam1 = amx_ctof(cRet[0]);
|
||||||
|
(*g_engfuncs.pfnGetAimVector)(INDEXENT(index),fparam1,Vec1);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
cRet[0] = amx_ftoc(Vec1[0]);
|
||||||
|
cRet[1] = amx_ftoc(Vec1[1]);
|
||||||
|
cRet[2] = amx_ftoc(Vec1[2]);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnParticleEffect
|
||||||
|
case EngFunc_ParticleEffect: // void ) (const float *org, const float *dir, float color, float count);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
Vec2[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec2[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec2[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
fparam1=amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
fparam2=amx_ctof(cRet[0]);
|
||||||
|
(*g_engfuncs.pfnParticleEffect)(Vec1,Vec2,fparam1,fparam2);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnLightStyle
|
||||||
|
case EngFunc_LightStyle: // void ) (int style, char* val);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
iparam1=cRet[0];
|
||||||
|
temp = MF_GetAmxString(amx,params[3],0,&len);
|
||||||
|
(*g_engfuncs.pfnLightStyle)(iparam1,temp);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnDecalIndex
|
||||||
|
case EngFunc_DecalIndex: // int ) (const char *name);
|
||||||
|
temp = MF_GetAmxString(amx,params[2],0,&len);
|
||||||
|
return (*g_engfuncs.pfnDecalIndex)(temp);
|
||||||
|
|
||||||
|
|
||||||
|
// pfnPointContents
|
||||||
|
case EngFunc_PointContents: // int ) (const float *rgflVector);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
return (*g_engfuncs.pfnPointContents)(Vec1);
|
||||||
|
|
||||||
|
|
||||||
|
// pfnFreeEntPrivateData
|
||||||
|
case EngFunc_FreeEntPrivateData: // void ) (edict_t *pEdict);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
(*g_engfuncs.pfnFreeEntPrivateData)(INDEXENT(index));
|
||||||
|
|
||||||
|
|
||||||
|
// pfnSzFromIndex
|
||||||
|
case EngFunc_SzFromIndex: // const char * ) (int iString);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
temp = (char*)(*g_engfuncs.pfnSzFromIndex)(iparam1);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
MF_SetAmxString(amx, params[3], temp, cRet[0]);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnAllocString
|
||||||
|
case EngFunc_AllocString: // int ) (const char *szValue);
|
||||||
|
temp = MF_GetAmxString(amx,params[2],0,&len);
|
||||||
|
return (*g_engfuncs.pfnAllocString)((const char *)temp);
|
||||||
|
|
||||||
|
|
||||||
|
// pfnRegUserMsg
|
||||||
|
case EngFunc_RegUserMsg: // int ) (const char *pszName, int iSize);
|
||||||
|
temp = MF_GetAmxString(amx,params[2],0,&len);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
return (*g_engfuncs.pfnRegUserMsg)(temp,iparam1);
|
||||||
|
|
||||||
|
|
||||||
|
// pfnAnimationAutomove
|
||||||
|
case EngFunc_AnimationAutomove: // void ) (const edict_t* pEdict, float flTime);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
fparam1 = amx_ctof(cRet[0]);
|
||||||
|
(*g_engfuncs.pfnAnimationAutomove)(INDEXENT(index),fparam1);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnGetBonePosition
|
||||||
|
case EngFunc_GetBonePosition: // void ) (const edict_t* pEdict, int iBone, float *rgflOrigin, float *rgflAngles );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
iparam1=cRet[0];
|
||||||
|
(*g_engfuncs.pfnGetBonePosition)(INDEXENT(index),iparam1,Vec1,Vec2);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
cRet[0]=amx_ftoc(Vec1[0]);
|
||||||
|
cRet[1]=amx_ftoc(Vec1[1]);
|
||||||
|
cRet[2]=amx_ftoc(Vec1[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
cRet[0]=amx_ftoc(Vec2[0]);
|
||||||
|
cRet[1]=amx_ftoc(Vec2[1]);
|
||||||
|
cRet[2]=amx_ftoc(Vec2[2]);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnGetAttachment
|
||||||
|
case EngFunc_GetAttachment: // void ) (const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index=cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
iparam1=cRet[0];
|
||||||
|
(*g_engfuncs.pfnGetAttachment)(INDEXENT(index),iparam1,Vec1,Vec2);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
cRet[0]=amx_ftoc(Vec1[0]);
|
||||||
|
cRet[1]=amx_ftoc(Vec1[1]);
|
||||||
|
cRet[2]=amx_ftoc(Vec1[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
cRet[0]=amx_ftoc(Vec2[0]);
|
||||||
|
cRet[1]=amx_ftoc(Vec2[1]);
|
||||||
|
cRet[2]=amx_ftoc(Vec2[2]);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnSetView
|
||||||
|
case EngFunc_SetView: // void ) (const edict_t *pClient, const edict_t *pViewent );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
iparam2 = cRet[0];
|
||||||
|
CHECK_ENTITY(iparam1);
|
||||||
|
CHECK_ENTITY(iparam2);
|
||||||
|
(*g_engfuncs.pfnSetView)(INDEXENT(iparam1),INDEXENT(iparam2));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnTime
|
||||||
|
case EngFunc_Time: // float) ( void );
|
||||||
|
fparam1 = (*g_engfuncs.pfnTime)();
|
||||||
|
return amx_ftoc(fparam1);
|
||||||
|
|
||||||
|
|
||||||
|
// pfnCrosshairAngle
|
||||||
|
case EngFunc_CrosshairAngle: // void ) (const edict_t *pClient, float pitch, float yaw);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
fparam1 = amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
fparam2 = amx_ctof(cRet[0]);
|
||||||
|
(*g_engfuncs.pfnCrosshairAngle)(INDEXENT(index),fparam1,fparam2);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnFadeClientVolume
|
||||||
|
case EngFunc_FadeClientVolume: // void ) (const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
iparam2 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
iparam3 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[6]);
|
||||||
|
iparam4 = cRet[0];
|
||||||
|
(*g_engfuncs.pfnFadeClientVolume)(INDEXENT(index),iparam1,iparam2,iparam3,iparam4);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnSetClientMaxSpeed
|
||||||
|
case EngFunc_SetClientMaxspeed: // void ) (const edict_t *pEdict, float fNewMaxspeed);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
fparam1 = amx_ctof(cRet[0]);
|
||||||
|
(*g_engfuncs.pfnSetClientMaxspeed)(INDEXENT(index),fparam1);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnCreateFakeClient
|
||||||
|
case EngFunc_CreateFakeClient: // edict) (const char *netname); // returns NULL if fake client can't be created
|
||||||
|
temp = MF_GetAmxString(amx,params[2],0,&len);
|
||||||
|
pRet = (*g_engfuncs.pfnCreateFakeClient)(STRING(ALLOC_STRING(temp)));
|
||||||
|
if (pRet == 0)
|
||||||
|
return 0;
|
||||||
|
return ENTINDEX(pRet);
|
||||||
|
|
||||||
|
|
||||||
|
// pfnRunPlayerMove
|
||||||
|
case EngFunc_RunPlayerMove: // void ) (edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
fparam1=amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
fparam2=amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[6]);
|
||||||
|
fparam3=amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[7]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[8]);
|
||||||
|
iparam2 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[9]);
|
||||||
|
iparam3 = cRet[0];
|
||||||
|
(*g_engfuncs.pfnRunPlayerMove)(INDEXENT(index),Vec1,fparam1,fparam2,fparam3,iparam1,iparam2,iparam3);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnNumberOfEntities
|
||||||
|
case EngFunc_NumberOfEntities: // int ) (void);
|
||||||
|
return (*g_engfuncs.pfnNumberOfEntities)();
|
||||||
|
|
||||||
|
|
||||||
|
// pfnStaticDecal
|
||||||
|
case EngFunc_StaticDecal: // void ) ( const float *origin, int decalIndex, int entityIndex, int modelIndex );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
iparam2 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
iparam3 = cRet[0];
|
||||||
|
(*g_engfuncs.pfnStaticDecal)(Vec1,iparam1,iparam2,iparam3);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnPrecacheGeneric
|
||||||
|
case EngFunc_PrecacheGeneric: // int ) (char* s);
|
||||||
|
temp = MF_GetAmxString(amx,params[2],0,&len);
|
||||||
|
return (*g_engfuncs.pfnPrecacheGeneric)((char*)STRING(ALLOC_STRING(temp)));
|
||||||
|
|
||||||
|
|
||||||
|
// pfnBuildSoundMsg
|
||||||
|
case EngFunc_BuildSoundMsg: // void ) (edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
temp = MF_GetAmxString(amx,params[4],0,&len);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
fparam1 = amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[6]);
|
||||||
|
fparam2 = amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[7]);
|
||||||
|
iparam2 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[8]);
|
||||||
|
iparam3 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[9]);
|
||||||
|
iparam4 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[10]);
|
||||||
|
iparam5 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[11]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet=MF_GetAmxAddr(amx,params[12]);
|
||||||
|
iparam6=cRet[0];
|
||||||
|
/* don't check, it might not be included
|
||||||
|
CHECK_ENTITY(iparam5);
|
||||||
|
*/
|
||||||
|
(*g_engfuncs.pfnBuildSoundMsg)(INDEXENT(index),iparam1,temp,fparam1,fparam2,iparam2,iparam3,iparam4,iparam5,Vec1,iparam6 == 0 ? NULL : INDEXENT(iparam6));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnGetPhysicsKeyValue
|
||||||
|
case EngFunc_GetPhysicsKeyValue: // const char* ) ( const edict_t *pClient, const char *key );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
temp = MF_GetAmxString(amx,params[3],0,&len);
|
||||||
|
temp2 = (char*)(*g_engfuncs.pfnGetPhysicsKeyValue)(INDEXENT(index),(const char *)temp);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
MF_SetAmxString(amx,params[4],temp2,cRet[0]);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnSetPhysicsKeyValue
|
||||||
|
case EngFunc_SetPhysicsKeyValue: // void ) ( const edict_t *pClient, const char *key, const char *value );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
temp = MF_GetAmxString(amx,params[3],0,&len);
|
||||||
|
temp2 = MF_GetAmxString(amx,params[4],1,&len);
|
||||||
|
(*g_engfuncs.pfnSetPhysicsKeyValue)(INDEXENT(index),STRING(ALLOC_STRING(temp)),STRING(ALLOC_STRING(temp2)));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnGetPhysicsInfoString
|
||||||
|
case EngFunc_GetPhysicsInfoString: // const char* ) ( const edict_t *pClient );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
temp = (char*)(*g_engfuncs.pfnGetPhysicsInfoString)(INDEXENT(index));
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
|
||||||
|
MF_SetAmxString(amx,params[3],temp,cRet[0]);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnPrecacheEvent
|
||||||
|
case EngFunc_PrecacheEvent: // unsigned short ) ( int type, const char*psz );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
temp = MF_GetAmxString(amx,params[3],0,&len);
|
||||||
|
return (*g_engfuncs.pfnPrecacheEvent)(iparam1,(char*)STRING(ALLOC_STRING(temp)));
|
||||||
|
|
||||||
|
|
||||||
|
// pfnPlaybackEvent (grr)
|
||||||
|
case EngFunc_PlaybackEvent: // void )
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
iparam2 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
fparam1 = amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[6]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[7]);
|
||||||
|
Vec2[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec2[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec2[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[8]);
|
||||||
|
fparam2 = amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[9]);
|
||||||
|
fparam3 = amx_ctof(cRet[0]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[10]);
|
||||||
|
iparam3 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[11]);
|
||||||
|
iparam4 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[12]);
|
||||||
|
iparam5 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[13]);
|
||||||
|
iparam6 = cRet[0];
|
||||||
|
(*g_engfuncs.pfnPlaybackEvent)(iparam1,INDEXENT(index),iparam2,fparam1,Vec1,Vec2,fparam2,fparam3,iparam3,iparam4,iparam5,iparam6);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
// pfnGetCurrentPlayer
|
||||||
|
case EngFunc_GetCurrentPlayer: // int ) ( void );
|
||||||
|
return (*g_engfuncs.pfnGetCurrentPlayer)();
|
||||||
|
|
||||||
|
|
||||||
|
// pfnCanSkipPlayer
|
||||||
|
case EngFunc_CanSkipPlayer: // int ) ( const edict_t *player );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
return (*g_engfuncs.pfnCanSkipPlayer)(INDEXENT(index));
|
||||||
|
|
||||||
|
|
||||||
|
// pfnSetGroupMask
|
||||||
|
case EngFunc_SetGroupMask: // void ) ( int mask, int op );
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
iparam2 = cRet[0];
|
||||||
|
(*g_engfuncs.pfnSetGroupMask)(iparam1,iparam2);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnGetClientListening
|
||||||
|
case EngFunc_GetClientListening: // bool (int iReceiver, int iSender)
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
iparam2 = cRet[0];
|
||||||
|
return (*g_engfuncs.pfnVoice_GetClientListening)(iparam1,iparam2);
|
||||||
|
|
||||||
|
|
||||||
|
// pfnSetClientListening
|
||||||
|
case EngFunc_SetClientListening: // bool (int iReceiver, int iSender, bool Listen)
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
iparam2 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
iparam3 = cRet[0];
|
||||||
|
return (*g_engfuncs.pfnVoice_SetClientListening)(iparam1,iparam2,iparam3);
|
||||||
|
|
||||||
|
|
||||||
|
// pfnMessageBegin (AMX doesn't support MSG_ONE_UNRELIABLE, so I should add this incase anyone needs it.)
|
||||||
|
case EngFunc_MessageBegin: // void (int msg_dest, int msg_type, const float *pOrigin, edict_t *ed)
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
iparam2 = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
|
Vec1[0]=amx_ctof(cRet[0]);
|
||||||
|
Vec1[1]=amx_ctof(cRet[1]);
|
||||||
|
Vec1[2]=amx_ctof(cRet[2]);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
index = cRet[0];
|
||||||
|
(*g_engfuncs.pfnMessageBegin)(iparam1,iparam2,Vec1,index == 0 ? NULL : INDEXENT(index));
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnWriteCoord
|
||||||
|
case EngFunc_WriteCoord: // void (float)
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
fparam1 = amx_ctof(cRet[0]);
|
||||||
|
(*g_engfuncs.pfnWriteCoord)(fparam1);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
// pfnWriteAngle
|
||||||
|
case EngFunc_WriteAngle: // void (float)
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
fparam1 = amx_ctof(cRet[0]);
|
||||||
|
(*g_engfuncs.pfnWriteAngle)(fparam1);
|
||||||
|
return 1;
|
||||||
|
case EngFunc_InfoKeyValue: // char* ) (char *infobuffer, char *key);
|
||||||
|
// Modify the syntax a bit.
|
||||||
|
// index, key
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
|
iparam1 = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
temp2 = MF_GetAmxString(amx,params[3],0,&len);
|
||||||
|
temp = (*g_engfuncs.pfnInfoKeyValue)((*g_engfuncs.pfnGetInfoKeyBuffer)(INDEXENT(index)),temp2);
|
||||||
|
MF_SetAmxString(amx,params[4],temp,iparam1);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case EngFunc_SetKeyValue: // void ) (char *infobuffer, char *key, char *value);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
temp = MF_GetAmxString(amx,params[3],0,&len);
|
||||||
|
temp2 = MF_GetAmxString(amx,params[4],1,&len);
|
||||||
|
(*g_engfuncs.pfnSetKeyValue)((*g_engfuncs.pfnGetInfoKeyBuffer)(INDEXENT(index)),temp,temp2);
|
||||||
|
return 1;
|
||||||
|
case EngFunc_SetClientKeyValue: // void ) (int clientIndex, char *infobuffer, char *key, char *value);
|
||||||
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
index = cRet[0];
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
temp = MF_GetAmxString(amx,params[3],0,&len);
|
||||||
|
temp2 = MF_GetAmxString(amx,params[4],1,&len);
|
||||||
|
(*g_engfuncs.pfnSetClientKeyValue)(index,(*g_engfuncs.pfnGetInfoKeyBuffer)(INDEXENT(index)),temp,temp2);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
default:
|
||||||
|
LOG_CONSOLE(PLID,"[NS2AMX] Unknown engfunc type provided.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AMX_NATIVE_INFO engfunc_natives[] = {
|
||||||
|
{"engfunc", engfunc},
|
||||||
|
{NULL, NULL},
|
||||||
|
};
|
83
dlls/fakemeta/engfunc.h
Executable file
83
dlls/fakemeta/engfunc.h
Executable file
|
@ -0,0 +1,83 @@
|
||||||
|
#ifndef _ENGFUNC_INCLUDE_H
|
||||||
|
#define _ENGFUNC_INCLUDE_H
|
||||||
|
|
||||||
|
enum {
|
||||||
|
EngFunc_PrecacheModel, // int ) (char* s);
|
||||||
|
EngFunc_PrecacheSound, // int ) (char* s);
|
||||||
|
EngFunc_SetModel, // void ) (edict_t *e, const char *m);
|
||||||
|
EngFunc_ModelIndex, // int ) (const char *m);
|
||||||
|
EngFunc_ModelFrames, // int ) (int modelIndex);
|
||||||
|
EngFunc_SetSize, // void ) (edict_t *e, const float *rgflMin, const float *rgflMax);
|
||||||
|
EngFunc_ChangeLevel, // void ) (char* s1, char* s2);
|
||||||
|
EngFunc_VecToYaw, // float) (const float *rgflVector);
|
||||||
|
EngFunc_VecToAngles, // void ) (const float *rgflVectorIn, float *rgflVectorOut);
|
||||||
|
EngFunc_MoveToOrigin, // void ) (edict_t *ent, const float *pflGoal, float dist, int iMoveType);
|
||||||
|
EngFunc_ChangeYaw, // void ) (edict_t* ent);
|
||||||
|
EngFunc_ChangePitch, // void ) (edict_t* ent);
|
||||||
|
EngFunc_FindEntityByString, // edict) (edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue);
|
||||||
|
EngFunc_GetEntityIllum, // int ) (edict_t* pEnt);
|
||||||
|
EngFunc_FindEntityInSphere, // edict) (edict_t *pEdictStartSearchAfter, const float *org, float rad);
|
||||||
|
EngFunc_FindClientInPVS, // edict) (edict_t *pEdict);
|
||||||
|
EngFunc_EntitiesInPVS, // edict) (edict_t *pplayer);
|
||||||
|
EngFunc_MakeVectors, // void ) (const float *rgflVector);
|
||||||
|
EngFunc_AngleVectors, // void ) (const float *rgflVector, float *forward, float *right, float *up);
|
||||||
|
EngFunc_CreateEntity, // edict) (void);
|
||||||
|
EngFunc_RemoveEntity, // void ) (edict_t* e);
|
||||||
|
EngFunc_CreateNamedEntity, // edict) (int className);
|
||||||
|
EngFunc_MakeStatic, // void ) (edict_t *ent);
|
||||||
|
EngFunc_EntIsOnFloor, // int ) (edict_t *e);
|
||||||
|
EngFunc_DropToFloor, // int ) (edict_t* e);
|
||||||
|
EngFunc_WalkMove, // int ) (edict_t *ent, float yaw, float dist, int iMode);
|
||||||
|
EngFunc_SetOrigin, // void ) (edict_t *e, const float *rgflOrigin);
|
||||||
|
EngFunc_EmitSound, // void ) (edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch);
|
||||||
|
EngFunc_EmitAmbientSound, // void ) (edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch);
|
||||||
|
EngFunc_TraceLine, // void ) (const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr);
|
||||||
|
EngFunc_TraceToss, // void ) (edict_t* pent, edict_t* pentToIgnore, TraceResult *ptr);
|
||||||
|
EngFunc_TraceMonsterHull, // int ) (edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr);
|
||||||
|
EngFunc_TraceHull, // void ) (const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr);
|
||||||
|
EngFunc_TraceModel, // void ) (const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr);
|
||||||
|
EngFunc_TraceTexture, // const char *) (edict_t *pTextureEntity, const float *v1, const float *v2 );
|
||||||
|
EngFunc_TraceSphere, // void ) (const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr);
|
||||||
|
EngFunc_GetAimVector, // void ) (edict_t* ent, float speed, float *rgflReturn);
|
||||||
|
EngFunc_ParticleEffect, // void ) (const float *org, const float *dir, float color, float count);
|
||||||
|
EngFunc_LightStyle, // void ) (int style, char* val);
|
||||||
|
EngFunc_DecalIndex, // int ) (const char *name);
|
||||||
|
EngFunc_PointContents, // int ) (const float *rgflVector);
|
||||||
|
EngFunc_FreeEntPrivateData, // void ) (edict_t *pEdict);
|
||||||
|
EngFunc_SzFromIndex, // const char * ) (int iString);
|
||||||
|
EngFunc_AllocString, // int ) (const char *szValue);
|
||||||
|
EngFunc_RegUserMsg, // int ) (const char *pszName, int iSize);
|
||||||
|
EngFunc_AnimationAutomove, // void ) (const edict_t* pEdict, float flTime);
|
||||||
|
EngFunc_GetBonePosition, // void ) (const edict_t* pEdict, int iBone, float *rgflOrigin, float *rgflAngles );
|
||||||
|
EngFunc_GetAttachment, // void ) (const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles );
|
||||||
|
EngFunc_SetView, // void ) (const edict_t *pClient, const edict_t *pViewent );
|
||||||
|
EngFunc_Time, // float) ( void );
|
||||||
|
EngFunc_CrosshairAngle, // void ) (const edict_t *pClient, float pitch, float yaw);
|
||||||
|
EngFunc_FadeClientVolume, // void ) (const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds);
|
||||||
|
EngFunc_SetClientMaxspeed, // void ) (const edict_t *pEdict, float fNewMaxspeed);
|
||||||
|
EngFunc_CreateFakeClient, // edict) (const char *netname); // returns NULL if fake client can't be created
|
||||||
|
EngFunc_RunPlayerMove, // void ) (edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec );
|
||||||
|
EngFunc_NumberOfEntities, // int ) (void);
|
||||||
|
EngFunc_StaticDecal, // void ) ( const float *origin, int decalIndex, int entityIndex, int modelIndex );
|
||||||
|
EngFunc_PrecacheGeneric, // int ) (char* s);
|
||||||
|
EngFunc_BuildSoundMsg, // void ) (edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed);
|
||||||
|
EngFunc_GetPhysicsKeyValue, // const char* ) ( const edict_t *pClient, const char *key );
|
||||||
|
EngFunc_SetPhysicsKeyValue, // void ) ( const edict_t *pClient, const char *key, const char *value );
|
||||||
|
EngFunc_GetPhysicsInfoString,// const char* ) ( const edict_t *pClient );
|
||||||
|
EngFunc_PrecacheEvent, // unsigned short ) ( int type, const char*psz );
|
||||||
|
EngFunc_PlaybackEvent, // void ) ( int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
|
||||||
|
EngFunc_CheckVisibility, //) ( const edict_t *entity, unsigned char *pset );
|
||||||
|
EngFunc_GetCurrentPlayer, //) ( void );
|
||||||
|
EngFunc_CanSkipPlayer, //) ( const edict_t *player );
|
||||||
|
EngFunc_SetGroupMask, //) ( int mask, int op );
|
||||||
|
EngFunc_GetClientListening, // bool (int iReceiver, int iSender)
|
||||||
|
EngFunc_SetClientListening, // bool (int iReceiver, int iSender, bool Listen)
|
||||||
|
EngFunc_MessageBegin, // void (int msg_dest, int msg_type, const float *pOrigin, edict_t *ed)
|
||||||
|
EngFunc_WriteCoord, // void (float)
|
||||||
|
EngFunc_WriteAngle, // void (float)
|
||||||
|
EngFunc_InfoKeyValue, // char* ) (char *infobuffer, char *key);
|
||||||
|
EngFunc_SetKeyValue, // void ) (char *infobuffer, char *key, char *value);
|
||||||
|
EngFunc_SetClientKeyValue // void ) (int clientIndex, char *infobuffer, char *key, char *value);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //_ENGFUNC_INCLUDE_H
|
179
dlls/fakemeta/fakemeta.vcproj
Executable file
179
dlls/fakemeta/fakemeta.vcproj
Executable file
|
@ -0,0 +1,179 @@
|
||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="7.10"
|
||||||
|
Name="fakemeta"
|
||||||
|
ProjectGUID="{5E393C37-22F2-4CA2-9022-6400DC582447}"
|
||||||
|
Keyword="Win32Proj">
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"/>
|
||||||
|
</Platforms>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="Debug"
|
||||||
|
IntermediateDirectory="Debug"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FAKEMETA_EXPORTS"
|
||||||
|
MinimalRebuild="TRUE"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="5"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="FALSE"
|
||||||
|
DebugInformationFormat="4"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(OutDir)/fakemeta_amxx.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/fakemeta.pdb"
|
||||||
|
SubSystem="2"
|
||||||
|
ImportLibrary="$(OutDir)/fakemeta.lib"
|
||||||
|
TargetMachine="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="Release"
|
||||||
|
IntermediateDirectory="Release"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FAKEMETA_EXPORTS"
|
||||||
|
RuntimeLibrary="4"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="FALSE"
|
||||||
|
DebugInformationFormat="3"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(OutDir)/fakemeta_amxx.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="TRUE"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
ImportLibrary="$(OutDir)/fakemeta.lib"
|
||||||
|
TargetMachine="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||||
|
<File
|
||||||
|
RelativePath=".\CVector.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\fakemeta_amxx.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\fakemeta_amxx.h">
|
||||||
|
</File>
|
||||||
|
<Filter
|
||||||
|
Name="AMXXSDK"
|
||||||
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\sdk\amxxmodule.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\sdk\amxxmodule.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\sdk\moduleconfig.h">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="engfunc"
|
||||||
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\dllfunc.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\dllfunc.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\engfunc.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\engfunc.h">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="pev"
|
||||||
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\pev.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\pev.h">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="forward"
|
||||||
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\forward.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\forward.h">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
7
dlls/fakemeta/fakemeta_amxx.cpp
Executable file
7
dlls/fakemeta/fakemeta_amxx.cpp
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#include "fakemeta_amxx.h"
|
||||||
|
|
||||||
|
void OnAmxxAttach()
|
||||||
|
{
|
||||||
|
MF_AddNatives(engfunc_natives);
|
||||||
|
MF_AddNatives(dllfunc_natives);
|
||||||
|
}
|
21
dlls/fakemeta/fakemeta_amxx.h
Executable file
21
dlls/fakemeta/fakemeta_amxx.h
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#ifndef _FAKEMETA_INCLUDE_H
|
||||||
|
#define _FAKEMETA_INCLUDE_H
|
||||||
|
|
||||||
|
#include "sdk/amxxmodule.h"
|
||||||
|
#include "CVector.h"
|
||||||
|
#include "engfunc.h"
|
||||||
|
#include "dllfunc.h"
|
||||||
|
#include "pev.h"
|
||||||
|
#include "forward.h"
|
||||||
|
|
||||||
|
#define CHECK_ENTITY(x) if (x != 0 && (FNullEnt(INDEXENT(x)) || x < 0 || x > gpGlobals->maxEntities)) { MF_RaiseAmxError(amx,AMX_ERR_NATIVE); return 0; }
|
||||||
|
|
||||||
|
extern AMX_NATIVE_INFO engfunc_natives[];
|
||||||
|
extern AMX_NATIVE_INFO dllfunc_natives[];
|
||||||
|
extern AMX_NATIVE_INFO pev_natives[];
|
||||||
|
extern TraceResult g_tr;
|
||||||
|
|
||||||
|
extern enginefuncs_t g_EngineFuncs_Table;
|
||||||
|
extern enginefuncs_t g_EngineFuncs_Post_Table;
|
||||||
|
|
||||||
|
#endif //_FAKEMETA_INCLUDE_H
|
493
dlls/fakemeta/forward.cpp
Executable file
493
dlls/fakemeta/forward.cpp
Executable file
|
@ -0,0 +1,493 @@
|
||||||
|
#include "fakemeta_amxx.h"
|
||||||
|
|
||||||
|
CVector<int> Engine[ENGFUNC_NUM+10];
|
||||||
|
CVector<int> EnginePost[ENGFUNC_NUM+10];
|
||||||
|
cell mCellResult;
|
||||||
|
cell mlCellResult;
|
||||||
|
float mFloatResult;
|
||||||
|
float mlFloatResult;
|
||||||
|
const char *mStringResult;
|
||||||
|
const char *mlStringResult;
|
||||||
|
int retType = 0;
|
||||||
|
int lastFmRes = FMRES_IGNORED;
|
||||||
|
|
||||||
|
#define ENGHOOK(pfnCall) \
|
||||||
|
if (engtable->pfn##pfnCall == NULL) \
|
||||||
|
engtable->pfn##pfnCall = pfnCall
|
||||||
|
|
||||||
|
#define FM_ENG_HANDLE(pfnCall, pfnArgs) \
|
||||||
|
register unsigned int i = 0; \
|
||||||
|
clfm(); \
|
||||||
|
int fmres = FMRES_IGNORED; \
|
||||||
|
for (i=0; i<Engine[pfnCall].size(); i++) \
|
||||||
|
{ \
|
||||||
|
fmres = MF_ExecuteForward pfnArgs; \
|
||||||
|
if (fmres >= lastFmRes) { \
|
||||||
|
if (retType == FMV_STRING) \
|
||||||
|
mlStringResult = mStringResult; \
|
||||||
|
else if (retType == FMV_CELL) \
|
||||||
|
mlCellResult = mCellResult; \
|
||||||
|
else if (retType == FMV_FLOAT) \
|
||||||
|
mlFloatResult = mFloatResult; \
|
||||||
|
lastFmRes = fmres; \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
|
META_RES mswi(int fmres)
|
||||||
|
{
|
||||||
|
if (fmres == FMRES_IGNORED)
|
||||||
|
return MRES_IGNORED;
|
||||||
|
if (fmres == FMRES_HANDLED)
|
||||||
|
return MRES_HANDLED;
|
||||||
|
if (fmres == FMRES_SUPERCEDE)
|
||||||
|
return MRES_SUPERCEDE;
|
||||||
|
if (fmres == FMRES_OVERRIDE)
|
||||||
|
return MRES_OVERRIDE;
|
||||||
|
return (META_RES)0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void clfm()
|
||||||
|
{
|
||||||
|
mCellResult = 0;
|
||||||
|
mlCellResult = 0;
|
||||||
|
mStringResult = "";
|
||||||
|
mlStringResult = "";
|
||||||
|
lastFmRes = FMRES_IGNORED;
|
||||||
|
mFloatResult = 0.0;
|
||||||
|
mlFloatResult = 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static cell AMX_NATIVE_CALL fm_return(AMX *amx, cell *params)
|
||||||
|
{
|
||||||
|
int len;
|
||||||
|
switch (params[1])
|
||||||
|
{
|
||||||
|
case FMV_STRING:
|
||||||
|
{
|
||||||
|
mStringResult = STRING(ALLOC_STRING(MF_GetAmxString(amx, params[2], 0 ,&len)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case FMV_FLOAT:
|
||||||
|
{
|
||||||
|
mFloatResult = amx_ctof(params[2]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case FMV_CELL:
|
||||||
|
{
|
||||||
|
mCellResult = params[2];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
retType = params[1];
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PrecacheModel(char *s)
|
||||||
|
{
|
||||||
|
FM_ENG_HANDLE(FM_PrecacheModel, (Engine[FM_PrecacheModel].at(i), s));
|
||||||
|
RETURN_META_VALUE(mswi(lastFmRes), (int)mlCellResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
int PrecacheSound(char *s)
|
||||||
|
{
|
||||||
|
FM_ENG_HANDLE(FM_PrecacheSound, (Engine[FM_PrecacheSound].at(i), s));
|
||||||
|
RETURN_META_VALUE(mswi(lastFmRes), (int)mlCellResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetModel(edict_t *e, const char *m)
|
||||||
|
{
|
||||||
|
FM_ENG_HANDLE(FM_SetModel, (Engine[FM_SetModel].at(i), ENTINDEX(e), m));
|
||||||
|
RETURN_META(mswi(lastFmRes));
|
||||||
|
}
|
||||||
|
|
||||||
|
int ModelIndex(const char *m)
|
||||||
|
{
|
||||||
|
FM_ENG_HANDLE(FM_ModelIndex, (Engine[FM_ModelIndex].at(i), m));
|
||||||
|
RETURN_META_VALUE(mswi(lastFmRes), (int)mlCellResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ModelFrames(int modelIndex)
|
||||||
|
{
|
||||||
|
FM_ENG_HANDLE(FM_ModelIndex, (Engine[FM_ModelIndex].at(i), modelIndex));
|
||||||
|
RETURN_META_VALUE(mswi(lastFmRes), (int)mlCellResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetSize(edict_t *e, const float *rgflMin, const float *rgflMax)
|
||||||
|
{
|
||||||
|
cell vec1[3] = {amx_ftoc(rgflMin[0]), amx_ftoc(rgflMin[1]), amx_ftoc(rgflMin[2])};
|
||||||
|
cell vec2[3] = {amx_ftoc(rgflMax[0]), amx_ftoc(rgflMax[1]), amx_ftoc(rgflMax[2])};;
|
||||||
|
cell retvec1 = MF_PrepareCellArray(vec1, 3);
|
||||||
|
cell retvec2 = MF_PrepareCellArray(vec2, 3);
|
||||||
|
FM_ENG_HANDLE(FM_SetSize, (Engine[FM_SetSize].at(i), ENTINDEX(e), retvec1, retvec2));
|
||||||
|
RETURN_META(mswi(lastFmRes));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChangeLevel(char *s1, char *s2)
|
||||||
|
{
|
||||||
|
FM_ENG_HANDLE(FM_ChangeLevel, (Engine[FM_ChangeLevel].at(i), s1, s2));
|
||||||
|
RETURN_META(mswi(lastFmRes));
|
||||||
|
}
|
||||||
|
|
||||||
|
float VecToYaw(const float *rgflVector)
|
||||||
|
{
|
||||||
|
cell vec[3] = {amx_ftoc(rgflVector[0]), amx_ftoc(rgflVector[1]), amx_ftoc(rgflVector[2])};
|
||||||
|
cell retvec = MF_PrepareCellArray(vec, 3);
|
||||||
|
FM_ENG_HANDLE(FM_VecToYaw, (Engine[FM_VecToYaw].at(i), retvec));
|
||||||
|
RETURN_META_VALUE(mswi(lastFmRes), mlFloatResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
void VecToAngles(const float *rgflVectorIn, float *rgflVectorOut)
|
||||||
|
{
|
||||||
|
cell vec1[3] = {amx_ftoc(rgflVectorIn[0]), amx_ftoc(rgflVectorIn[1]), amx_ftoc(rgflVectorIn[2])};
|
||||||
|
cell vec2[3] = {amx_ftoc(rgflVectorOut[0]), amx_ftoc(rgflVectorOut[1]), amx_ftoc(rgflVectorOut[2])};;
|
||||||
|
cell retvec1 = MF_PrepareCellArray(vec1, 3);
|
||||||
|
cell retvec2 = MF_PrepareCellArray(vec2, 3);
|
||||||
|
FM_ENG_HANDLE(FM_VecToAngles, (Engine[FM_VecToAngles].at(i), retvec1, retvec2));
|
||||||
|
RETURN_META(mswi(lastFmRes));
|
||||||
|
}
|
||||||
|
|
||||||
|
void MoveToOrigin(edict_t *ent, const float *pflGoal, float dist, int iMoveType)
|
||||||
|
{
|
||||||
|
cell vec[3] = {amx_ftoc(pflGoal[0]), amx_ftoc(pflGoal[1]), amx_ftoc(pflGoal[2])};
|
||||||
|
cell retvec = MF_PrepareCellArray(vec, 3);
|
||||||
|
FM_ENG_HANDLE(FM_MoveToOrigin, (Engine[FM_MoveToOrigin].at(i), ENTINDEX(ent), retvec, dist, iMoveType));
|
||||||
|
RETURN_META(mswi(lastFmRes));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChangeYaw(edict_t *ent)
|
||||||
|
{
|
||||||
|
FM_ENG_HANDLE(FM_ChangeYaw, (Engine[FM_ChangeYaw].at(i), ENTINDEX(ent)));
|
||||||
|
RETURN_META(mswi(lastFmRes));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChangePitch(edict_t *ent)
|
||||||
|
{
|
||||||
|
FM_ENG_HANDLE(FM_ChangePitch, (Engine[FM_ChangePitch].at(i), ENTINDEX(ent)));
|
||||||
|
RETURN_META(mswi(lastFmRes));
|
||||||
|
}
|
||||||
|
|
||||||
|
edict_t *FindEntityByString(edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue)
|
||||||
|
{
|
||||||
|
FM_ENG_HANDLE(FM_FindEntityByString, (Engine[FM_FindEntityByString].at(i), ENTINDEX(pEdictStartSearchAfter), pszField, pszValue));
|
||||||
|
RETURN_META_VALUE(mswi(lastFmRes), INDEXENT((int)mlCellResult));
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetEntityIllum(edict_t *pent)
|
||||||
|
{
|
||||||
|
FM_ENG_HANDLE(FM_ChangePitch, (Engine[FM_ChangePitch].at(i), ENTINDEX(pent)));
|
||||||
|
RETURN_META_VALUE(mswi(lastFmRes), (int)mlCellResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
|
||||||
|
{
|
||||||
|
int func = params[1];
|
||||||
|
int post = params[2];
|
||||||
|
if (func > ENGFUNC_NUM || func < 1)
|
||||||
|
{
|
||||||
|
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int len, fId=0;
|
||||||
|
const char *funcname = MF_GetAmxString(amx, params[2], 0, &len);
|
||||||
|
|
||||||
|
enginefuncs_t *engtable;
|
||||||
|
|
||||||
|
if (post)
|
||||||
|
engtable = &g_EngineFuncs_Table;
|
||||||
|
else
|
||||||
|
engtable = &g_EngineFuncs_Post_Table;
|
||||||
|
|
||||||
|
switch (func)
|
||||||
|
{
|
||||||
|
case FM_PrecacheModel:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
ENGHOOK(PrecacheModel);
|
||||||
|
break;
|
||||||
|
case FM_PrecacheSound:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
ENGHOOK(PrecacheSound);
|
||||||
|
break;
|
||||||
|
case FM_SetModel:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_STRING, FP_DONE);
|
||||||
|
ENGHOOK(SetModel);
|
||||||
|
break;
|
||||||
|
case FM_ModelIndex:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
ENGHOOK(ModelIndex);
|
||||||
|
break;
|
||||||
|
case FM_ModelFrames:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
||||||
|
ENGHOOK(ModelFrames);
|
||||||
|
break;
|
||||||
|
case FM_SetSize:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_ARRAY, FP_ARRAY, FP_DONE);
|
||||||
|
ENGHOOK(SetSize);
|
||||||
|
break;
|
||||||
|
case FM_ChangeLevel:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_STRING, FP_DONE);
|
||||||
|
ENGHOOK(ChangeLevel);
|
||||||
|
break;
|
||||||
|
case FM_VecToYaw:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_DONE);
|
||||||
|
ENGHOOK(VecToYaw);
|
||||||
|
break;
|
||||||
|
case FM_VecToAngles:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_ARRAY, FP_DONE);
|
||||||
|
ENGHOOK(VecToAngles);
|
||||||
|
break;
|
||||||
|
case FM_MoveToOrigin:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_ARRAY, FP_FLOAT, FP_CELL, FP_DONE);
|
||||||
|
ENGHOOK(MoveToOrigin);
|
||||||
|
break;
|
||||||
|
case FM_ChangeYaw:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
||||||
|
ENGHOOK(ChangeYaw);
|
||||||
|
break;
|
||||||
|
case FM_ChangePitch:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
||||||
|
ENGHOOK(ChangePitch);
|
||||||
|
break;
|
||||||
|
case FM_FindEntityByString:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_STRING, FP_STRING, FP_DONE);
|
||||||
|
ENGHOOK(FindEntityByString);
|
||||||
|
break;
|
||||||
|
case FM_GetEntityIllum:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
||||||
|
ENGHOOK(GetEntityIllum);
|
||||||
|
break;
|
||||||
|
case FM_FindEntityInSphere:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_ARRAY, FP_FLOAT, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_FindClientInPVS:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_EntitiesInPVS:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_MakeVectors:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_AngleVectors:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_ARRAY, FP_ARRAY, FP_ARRAY, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_CreateEntity:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_RemoveEntity:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_CreateNamedEntity:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_MakeStatic:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_EntIsOnFloor:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_DropToFloor:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_WalkMove:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_FLOAT, FP_FLOAT, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_SetOrigin:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_ARRAY, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_EmitSound:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_STRING, FP_FLOAT, FP_FLOAT, FP_CELL, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_EmitAmbientSound:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_ARRAY, FP_STRING, FP_FLOAT, FP_FLOAT, FP_CELL, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_TraceLine:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_ARRAY, FP_CELL, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_TraceToss:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_TraceMonsterHull:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_ARRAY, FP_ARRAY, FP_CELL, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_TraceHull:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_ARRAY, FP_CELL, FP_CELL, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_TraceModel:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_ARRAY, FP_CELL, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_TraceTexture:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_ARRAY, FP_ARRAY, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_TraceSphere:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_ARRAY, FP_CELL, FP_FLOAT, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_GetAimVector:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_FLOAT, FP_ARRAY, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_ParticleEffect:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_ARRAY, FP_FLOAT, FP_FLOAT, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_LightStyle:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_STRING, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_DecalIndex:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_PointContents:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_FreeEntPrivateData:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_SzFromIndex:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_AllocString:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_RegUserMsg:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_AnimationAutomove:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_FLOAT, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_GetBonePosition:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_ARRAY, FP_ARRAY, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_GetAttachment:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_ARRAY, FP_ARRAY, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_SetView:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_Time:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_CrosshairAngle:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_FLOAT, FP_FLOAT, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_FadeClientVolume:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_SetClientMaxspeed:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_FLOAT, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_CreateFakeClient:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_RunPlayerMove:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_ARRAY, FP_FLOAT, FP_FLOAT, FP_FLOAT, FP_CELL, FP_CELL, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_NumberOfEntities:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_StaticDecal:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_CELL, FP_CELL, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_PrecacheGeneric:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_BuildSoundMsg:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_STRING, FP_FLOAT, FP_FLOAT, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_ARRAY, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_GetPhysicsKeyValue:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_STRING, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_SetPhysicsKeyValue:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_STRING, FP_STRING, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_GetPhysicsInfoString:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_PrecacheEvent:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_STRING, FP_DONE);
|
||||||
|
break;
|
||||||
|
case FM_PlaybackEvent:
|
||||||
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_CELL, FP_FLOAT, FP_ARRAY, FP_ARRAY, FP_FLOAT, FP_FLOAT, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_DONE);
|
||||||
|
break;
|
||||||
|
#if 0
|
||||||
|
EngFunc_CheckVisibility, //) ( const edict_t *entity, unsigned char *pset );
|
||||||
|
EngFunc_GetCurrentPlayer, //) ( void );
|
||||||
|
EngFunc_CanSkipPlayer, //) ( const edict_t *player );
|
||||||
|
EngFunc_SetGroupMask, //) ( int mask, int op );
|
||||||
|
EngFunc_GetClientListening, // bool (int iReceiver, int iSender)
|
||||||
|
EngFunc_SetClientListening, // bool (int iReceiver, int iSender, bool Listen)
|
||||||
|
EngFunc_MessageBegin, // void (int msg_dest, int msg_type, const float *pOrigin, edict_t *ed)
|
||||||
|
EngFunc_WriteCoord, // void (float)
|
||||||
|
EngFunc_WriteAngle, // void (float)
|
||||||
|
EngFunc_InfoKeyValue, // char* ) (char *infobuffer, char *key);
|
||||||
|
EngFunc_SetKeyValue, // void ) (char *infobuffer, char *key, char *value);
|
||||||
|
EngFunc_SetClientKeyValue // void ) (int clientIndex, char *infobuffer, char *key, char *value);
|
||||||
|
DLLFunc_GameInit, // void) ( void );
|
||||||
|
DLLFunc_Spawn, // int ) ( edict_t *pent );
|
||||||
|
DLLFunc_Think, // void ) ( edict_t *pent );
|
||||||
|
DLLFunc_Use, // void ) ( edict_t *pentUsed, edict_t *pentOther );
|
||||||
|
DLLFunc_Touch, // void ) ( edict_t *pentTouched, edict_t *pentOther );
|
||||||
|
DLLFunc_Blocked, // void ) ( edict_t *pentBlocked, edict_t *pentOther );
|
||||||
|
DLLFunc_KeyValue, // void ) ( edict_t *pentKeyvalue, KeyValueData *pkvd );
|
||||||
|
DLLFunc_SetAbsBox, // void ) ( edict_t *pent );
|
||||||
|
DLLFunc_ClientConnect, // bool) ( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] );
|
||||||
|
|
||||||
|
DLLFunc_ClientDisconnect, // void ) ( edict_t *pEntity );
|
||||||
|
DLLFunc_ClientKill, // void ) ( edict_t *pEntity );
|
||||||
|
DLLFunc_ClientPutInServer, // void ) ( edict_t *pEntity );
|
||||||
|
DLLFunc_ClientCommand, // void ) ( edict_t *pEntity );
|
||||||
|
|
||||||
|
DLLFunc_ServerDeactivate, // void) ( void );
|
||||||
|
|
||||||
|
DLLFunc_PlayerPreThink, // void ) ( edict_t *pEntity );
|
||||||
|
DLLFunc_PlayerPostThink, // void ) ( edict_t *pEntity );
|
||||||
|
|
||||||
|
DLLFunc_StartFrame, // void ) ( void );
|
||||||
|
DLLFunc_ParmsNewLevel, // void ) ( void );
|
||||||
|
DLLFunc_ParmsChangeLevel, // void ) ( void );
|
||||||
|
|
||||||
|
// Returns string describing current .dll. E.g., TeamFotrress 2, Half-Life
|
||||||
|
DLLFunc_GetGameDescription, // const char * )( void );
|
||||||
|
|
||||||
|
// Spectator funcs
|
||||||
|
DLLFunc_SpectatorConnect, // void) ( edict_t *pEntity );
|
||||||
|
DLLFunc_SpectatorDisconnect, // void ) ( edict_t *pEntity );
|
||||||
|
DLLFunc_SpectatorThink, // void ) ( edict_t *pEntity );
|
||||||
|
|
||||||
|
// Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint.
|
||||||
|
DLLFunc_Sys_Error, // void ) ( const char *error_string );
|
||||||
|
|
||||||
|
DLLFunc_PM_FindTextureType, // char )( char *name );
|
||||||
|
DLLFunc_RegisterEncoders, // void ) ( void );
|
||||||
|
|
||||||
|
// Enumerates player hulls. Returns 0 if the hull number doesn't exist, 1 otherwise
|
||||||
|
DLLFunc_GetHullBounds, // int) ( int hullnumber, float *mins, float *maxs );
|
||||||
|
|
||||||
|
// Create baselines for certain "unplaced" items.
|
||||||
|
DLLFunc_CreateInstancedBaselines, // void ) ( void );
|
||||||
|
DLLFunc_pfnAllowLagCompensation, // int )( void );
|
||||||
|
// I know this does not fit with DLLFUNC(), but I dont want another native just for it.
|
||||||
|
MetaFunc_CallGameEntity // bool (plid_t plid, const char *entStr,entvars_t *pev);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
default:
|
||||||
|
fId = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!fId)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (post)
|
||||||
|
{
|
||||||
|
EnginePost[func].push_back(fId);
|
||||||
|
} else {
|
||||||
|
Engine[func].push_back(fId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
149
dlls/fakemeta/forward.h
Executable file
149
dlls/fakemeta/forward.h
Executable file
|
@ -0,0 +1,149 @@
|
||||||
|
#ifndef _INCLUDE_FORWARD_H
|
||||||
|
#define _INCLUDE_FORWARD_H
|
||||||
|
|
||||||
|
#define ENGFUNC_NUM 108
|
||||||
|
|
||||||
|
#define FMV_STRING 1
|
||||||
|
#define FMV_FLOAT 2
|
||||||
|
#define FMV_CELL 3
|
||||||
|
|
||||||
|
#define FMRES_HANDLED 2
|
||||||
|
#define FMRES_SUPERCEDE 4
|
||||||
|
#define FMRES_IGNORED 1
|
||||||
|
#define FMRES_OVERRIDE 3
|
||||||
|
|
||||||
|
enum {
|
||||||
|
FM_PrecacheModel = 1, // int ) (char* s);
|
||||||
|
FM_PrecacheSound, // int ) (char* s);
|
||||||
|
FM_SetModel, // void ) (edict_t *e, const char *m);
|
||||||
|
FM_ModelIndex, // int ) (const char *m);
|
||||||
|
FM_ModelFrames, // int ) (int modelIndex);
|
||||||
|
FM_SetSize, // void ) (edict_t *e, const float *rgflMin, const float *rgflMax);
|
||||||
|
FM_ChangeLevel, // void ) (char* s1, char* s2);
|
||||||
|
FM_VecToYaw, // float) (const float *rgflVector);
|
||||||
|
FM_VecToAngles, // void ) (const float *rgflVectorIn, float *rgflVectorOut);
|
||||||
|
FM_MoveToOrigin, // void ) (edict_t *ent, const float *pflGoal, float dist, int iMoveType);
|
||||||
|
FM_ChangeYaw, // void ) (edict_t* ent);
|
||||||
|
FM_ChangePitch, // void ) (edict_t* ent);
|
||||||
|
FM_FindEntityByString, // edict) (edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue);
|
||||||
|
FM_GetEntityIllum, // int ) (edict_t* pEnt);
|
||||||
|
FM_FindEntityInSphere, // edict) (edict_t *pEdictStartSearchAfter, const float *org, float rad);
|
||||||
|
FM_FindClientInPVS, // edict) (edict_t *pEdict);
|
||||||
|
FM_EntitiesInPVS, // edict) (edict_t *pplayer);
|
||||||
|
FM_MakeVectors, // void ) (const float *rgflVector);
|
||||||
|
FM_AngleVectors, // void ) (const float *rgflVector, float *forward, float *right, float *up);
|
||||||
|
FM_CreateEntity, // edict) (void);
|
||||||
|
FM_RemoveEntity, // void ) (edict_t* e);
|
||||||
|
FM_CreateNamedEntity, // edict) (int className);
|
||||||
|
FM_MakeStatic, // void ) (edict_t *ent);
|
||||||
|
FM_EntIsOnFloor, // int ) (edict_t *e);
|
||||||
|
FM_DropToFloor, // int ) (edict_t* e);
|
||||||
|
FM_WalkMove, // int ) (edict_t *ent, float yaw, float dist, int iMode);
|
||||||
|
FM_SetOrigin, // void ) (edict_t *e, const float *rgflOrigin);
|
||||||
|
FM_EmitSound, // void ) (edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch);
|
||||||
|
FM_EmitAmbientSound, // void ) (edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch);
|
||||||
|
FM_TraceLine, // void ) (const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr);
|
||||||
|
FM_TraceToss, // void ) (edict_t* pent, edict_t* pentToIgnore, TraceResult *ptr);
|
||||||
|
FM_TraceMonsterHull, // int ) (edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr);
|
||||||
|
FM_TraceHull, // void ) (const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr);
|
||||||
|
FM_TraceModel, // void ) (const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr);
|
||||||
|
FM_TraceTexture, // const char *) (edict_t *pTextureEntity, const float *v1, const float *v2 );
|
||||||
|
FM_TraceSphere, // void ) (const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr);
|
||||||
|
FM_GetAimVector, // void ) (edict_t* ent, float speed, float *rgflReturn);
|
||||||
|
FM_ParticleEffect, // void ) (const float *org, const float *dir, float color, float count);
|
||||||
|
FM_LightStyle, // void ) (int style, char* val);
|
||||||
|
FM_DecalIndex, // int ) (const char *name);
|
||||||
|
FM_PointContents, // int ) (const float *rgflVector);
|
||||||
|
FM_FreeEntPrivateData, // void ) (edict_t *pEdict);
|
||||||
|
FM_SzFromIndex, // const char * ) (int iString);
|
||||||
|
FM_AllocString, // int ) (const char *szValue);
|
||||||
|
FM_RegUserMsg, // int ) (const char *pszName, int iSize);
|
||||||
|
FM_AnimationAutomove, // void ) (const edict_t* pEdict, float flTime);
|
||||||
|
FM_GetBonePosition, // void ) (const edict_t* pEdict, int iBone, float *rgflOrigin, float *rgflAngles );
|
||||||
|
FM_GetAttachment, // void ) (const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles );
|
||||||
|
FM_SetView, // void ) (const edict_t *pClient, const edict_t *pViewent );
|
||||||
|
FM_Time, // float) ( void );
|
||||||
|
FM_CrosshairAngle, // void ) (const edict_t *pClient, float pitch, float yaw);
|
||||||
|
FM_FadeClientVolume, // void ) (const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds);
|
||||||
|
FM_SetClientMaxspeed, // void ) (const edict_t *pEdict, float fNewMaxspeed);
|
||||||
|
FM_CreateFakeClient, // edict) (const char *netname); // returns NULL if fake client can't be created
|
||||||
|
FM_RunPlayerMove, // void ) (edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec );
|
||||||
|
FM_NumberOfEntities, // int ) (void);
|
||||||
|
FM_StaticDecal, // void ) ( const float *origin, int decalIndex, int entityIndex, int modelIndex );
|
||||||
|
FM_PrecacheGeneric, // int ) (char* s);
|
||||||
|
FM_BuildSoundMsg, // void ) (edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed);
|
||||||
|
FM_GetPhysicsKeyValue, // const char* ) ( const edict_t *pClient, const char *key );
|
||||||
|
FM_SetPhysicsKeyValue, // void ) ( const edict_t *pClient, const char *key, const char *value );
|
||||||
|
FM_GetPhysicsInfoString,// const char* ) ( const edict_t *pClient );
|
||||||
|
FM_PrecacheEvent, // unsigned short ) ( int type, const char*psz );
|
||||||
|
FM_PlaybackEvent, // void ) ( int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
|
||||||
|
FM_CheckVisibility, //) ( const edict_t *entity, unsigned char *pset );
|
||||||
|
FM_GetCurrentPlayer, //) ( void );
|
||||||
|
FM_CanSkipPlayer, //) ( const edict_t *player );
|
||||||
|
FM_SetGroupMask, //) ( int mask, int op );
|
||||||
|
FM_GetClientListening, // bool (int iReceiver, int iSender)
|
||||||
|
FM_SetClientListening, // bool (int iReceiver, int iSender, bool Listen)
|
||||||
|
FM_MessageBegin, // void (int msg_dest, int msg_type, const float *pOrigin, edict_t *ed)
|
||||||
|
FM_WriteCoord, // void (float)
|
||||||
|
FM_WriteAngle, // void (float)
|
||||||
|
FM_InfoKeyValue, // char* ) (char *infobuffer, char *key);
|
||||||
|
FM_SetKeyValue, // void ) (char *infobuffer, char *key, char *value);
|
||||||
|
FM_SetClientKeyValue, // void ) (int clientIndex, char *infobuffer, char *key, char *value);
|
||||||
|
FM_GameInit, // void) ( void );
|
||||||
|
FM_Spawn, // int ) ( edict_t *pent );
|
||||||
|
FM_Think, // void ) ( edict_t *pent );
|
||||||
|
FM_Use, // void ) ( edict_t *pentUsed, edict_t *pentOther );
|
||||||
|
FM_Touch, // void ) ( edict_t *pentTouched, edict_t *pentOther );
|
||||||
|
FM_Blocked, // void ) ( edict_t *pentBlocked, edict_t *pentOther );
|
||||||
|
FM_KeyValue, // void ) ( edict_t *pentKeyvalue, KeyValueData *pkvd );
|
||||||
|
FM_SetAbsBox, // void ) ( edict_t *pent );
|
||||||
|
FM_ClientConnect, // bool) ( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] );
|
||||||
|
|
||||||
|
FM_ClientDisconnect, // void ) ( edict_t *pEntity );
|
||||||
|
FM_ClientKill, // void ) ( edict_t *pEntity );
|
||||||
|
FM_ClientPutInServer, // void ) ( edict_t *pEntity );
|
||||||
|
FM_ClientCommand, // void ) ( edict_t *pEntity );
|
||||||
|
|
||||||
|
FM_ServerDeactivate, // void) ( void );
|
||||||
|
|
||||||
|
FM_PlayerPreThink, // void ) ( edict_t *pEntity );
|
||||||
|
FM_PlayerPostThink, // void ) ( edict_t *pEntity );
|
||||||
|
|
||||||
|
FM_StartFrame, // void ) ( void );
|
||||||
|
FM_ParmsNewLevel, // void ) ( void );
|
||||||
|
FM_ParmsChangeLevel, // void ) ( void );
|
||||||
|
|
||||||
|
// Returns string describing current .dll. E.g., TeamFotrress 2, Half-Life
|
||||||
|
FM_GetGameDescription, // const char * )( void );
|
||||||
|
|
||||||
|
// Spectator funcs
|
||||||
|
FM_SpectatorConnect, // void) ( edict_t *pEntity );
|
||||||
|
FM_SpectatorDisconnect, // void ) ( edict_t *pEntity );
|
||||||
|
FM_SpectatorThink, // void ) ( edict_t *pEntity );
|
||||||
|
|
||||||
|
// Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint.
|
||||||
|
FM_Sys_Error, // void ) ( const char *error_string );
|
||||||
|
|
||||||
|
FM_PM_FindTextureType, // char )( char *name );
|
||||||
|
FM_RegisterEncoders, // void ) ( void );
|
||||||
|
|
||||||
|
// Enumerates player hulls. Returns 0 if the hull number doesn't exist, 1 otherwise
|
||||||
|
FM_GetHullBounds, // int) ( int hullnumber, float *mins, float *maxs );
|
||||||
|
|
||||||
|
// Create baselines for certain "unplaced" items.
|
||||||
|
FM_CreateInstancedBaselines, // void ) ( void );
|
||||||
|
FM_pfnAllowLagCompensation, // int )( void );
|
||||||
|
};
|
||||||
|
|
||||||
|
extern CVector<int> Engine[];
|
||||||
|
extern CVector<int> EnginePost[];
|
||||||
|
extern cell mCellResult;
|
||||||
|
extern float mFloatResult;
|
||||||
|
extern const char *mStringResult;
|
||||||
|
extern cell mlCellResult;
|
||||||
|
extern float mlFloatResult;
|
||||||
|
extern const char *mlStringResult;
|
||||||
|
extern int lastFmRes;
|
||||||
|
extern int retType;
|
||||||
|
|
||||||
|
#endif //_INCLUDE_FORWARD_H
|
608
dlls/fakemeta/pev.cpp
Executable file
608
dlls/fakemeta/pev.cpp
Executable file
|
@ -0,0 +1,608 @@
|
||||||
|
#include "fakemeta_amxx.h"
|
||||||
|
|
||||||
|
// originally by mahnsawce
|
||||||
|
static cell AMX_NATIVE_CALL amx_pev(AMX *amx,cell *params)
|
||||||
|
{
|
||||||
|
int index=params[1];
|
||||||
|
if (index >= 1 && index <= 32)
|
||||||
|
{
|
||||||
|
if (!MF_IsPlayerIngame(index))
|
||||||
|
{
|
||||||
|
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (index > gpGlobals->maxEntities)
|
||||||
|
{
|
||||||
|
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
edict_t *pPlayer = INDEXENT(index);
|
||||||
|
int returntype = *params/sizeof(cell);
|
||||||
|
int valuetype=0;
|
||||||
|
int iReturn=0;
|
||||||
|
float fReturn=0;
|
||||||
|
Vector vReturn=Vector(0,0,0);
|
||||||
|
byte bReturn[4]={0,0,0,0};
|
||||||
|
int iSwitch = params[2];
|
||||||
|
if (iSwitch > pev_int_start && iSwitch < pev_int_end)
|
||||||
|
valuetype=VALUETYPE_INT;
|
||||||
|
else if (iSwitch > pev_float_start && iSwitch < pev_float_end)
|
||||||
|
valuetype=VALUETYPE_FLOAT;
|
||||||
|
else if (iSwitch > pev_vecarray_start && iSwitch < pev_vecarray_end)
|
||||||
|
valuetype=VALUETYPE_VECTOR;
|
||||||
|
else if (iSwitch > pev_byte_start && iSwitch < pev_byte_end)
|
||||||
|
valuetype=VALUETYPE_BYTE;
|
||||||
|
else if (iSwitch > pev_string_start && iSwitch < pev_string_end)
|
||||||
|
valuetype=VALUETYPE_STRING;
|
||||||
|
if (iSwitch > pev_int_start && iSwitch < pev_int_end)
|
||||||
|
{
|
||||||
|
valuetype=VALUETYPE_INT;
|
||||||
|
switch(iSwitch)
|
||||||
|
{
|
||||||
|
case fixangle:
|
||||||
|
iReturn = pPlayer->v.fixangle;
|
||||||
|
break;
|
||||||
|
case modelindex:
|
||||||
|
iReturn = pPlayer->v.modelindex;
|
||||||
|
break;
|
||||||
|
case viewmodel:
|
||||||
|
iReturn = pPlayer->v.viewmodel;
|
||||||
|
break;
|
||||||
|
case weaponmodel:
|
||||||
|
iReturn = pPlayer->v.weaponmodel;
|
||||||
|
break;
|
||||||
|
case movetype:
|
||||||
|
iReturn = pPlayer->v.movetype;
|
||||||
|
break;
|
||||||
|
case solid:
|
||||||
|
iReturn = pPlayer->v.solid;
|
||||||
|
break;
|
||||||
|
case skin:
|
||||||
|
iReturn = pPlayer->v.skin;
|
||||||
|
break;
|
||||||
|
case body:
|
||||||
|
iReturn = pPlayer->v.body;
|
||||||
|
break;
|
||||||
|
case effects:
|
||||||
|
iReturn = pPlayer->v.effects;
|
||||||
|
break;
|
||||||
|
case light_level:
|
||||||
|
iReturn = pPlayer->v.light_level;
|
||||||
|
break;
|
||||||
|
case sequence:
|
||||||
|
iReturn = pPlayer->v.sequence;
|
||||||
|
break;
|
||||||
|
case gaitsequence:
|
||||||
|
iReturn = pPlayer->v.gaitsequence;
|
||||||
|
break;
|
||||||
|
case rendermode:
|
||||||
|
iReturn = pPlayer->v.rendermode;
|
||||||
|
break;
|
||||||
|
case renderfx:
|
||||||
|
iReturn = pPlayer->v.renderfx;
|
||||||
|
break;
|
||||||
|
case weapons:
|
||||||
|
iReturn = pPlayer->v.weapons;
|
||||||
|
break;
|
||||||
|
case deadflag:
|
||||||
|
iReturn = pPlayer->v.deadflag;
|
||||||
|
break;
|
||||||
|
case button:
|
||||||
|
iReturn = pPlayer->v.button;
|
||||||
|
break;
|
||||||
|
case impulse:
|
||||||
|
iReturn = pPlayer->v.impulse;
|
||||||
|
break;
|
||||||
|
case spawnflags:
|
||||||
|
iReturn = pPlayer->v.spawnflags;
|
||||||
|
break;
|
||||||
|
case flags:
|
||||||
|
iReturn = pPlayer->v.flags;
|
||||||
|
break;
|
||||||
|
case colormap:
|
||||||
|
iReturn = pPlayer->v.colormap;
|
||||||
|
break;
|
||||||
|
case team:
|
||||||
|
iReturn = pPlayer->v.team;
|
||||||
|
break;
|
||||||
|
case waterlevel:
|
||||||
|
iReturn = pPlayer->v.waterlevel;
|
||||||
|
break;
|
||||||
|
case watertype:
|
||||||
|
iReturn = pPlayer->v.watertype;
|
||||||
|
break;
|
||||||
|
case playerclass:
|
||||||
|
iReturn = pPlayer->v.playerclass;
|
||||||
|
break;
|
||||||
|
case weaponanim:
|
||||||
|
iReturn = pPlayer->v.weaponanim;
|
||||||
|
break;
|
||||||
|
case pushmsec:
|
||||||
|
iReturn = pPlayer->v.pushmsec;
|
||||||
|
break;
|
||||||
|
case bInDuck:
|
||||||
|
iReturn = pPlayer->v.bInDuck;
|
||||||
|
break;
|
||||||
|
case flTimeStepSound:
|
||||||
|
iReturn = pPlayer->v.flTimeStepSound;
|
||||||
|
break;
|
||||||
|
case flSwimTime:
|
||||||
|
iReturn = pPlayer->v.flSwimTime;
|
||||||
|
break;
|
||||||
|
case flDuckTime:
|
||||||
|
iReturn = pPlayer->v.flDuckTime;
|
||||||
|
break;
|
||||||
|
case iStepLeft:
|
||||||
|
iReturn = pPlayer->v.iStepLeft;
|
||||||
|
break;
|
||||||
|
case gamestate:
|
||||||
|
iReturn = pPlayer->v.gamestate;
|
||||||
|
break;
|
||||||
|
case oldbuttons:
|
||||||
|
iReturn = pPlayer->v.oldbuttons;
|
||||||
|
break;
|
||||||
|
case groupinfo:
|
||||||
|
iReturn = pPlayer->v.groupinfo;
|
||||||
|
break;
|
||||||
|
case iuser1:
|
||||||
|
iReturn = pPlayer->v.iuser1;
|
||||||
|
break;
|
||||||
|
case iuser2:
|
||||||
|
iReturn = pPlayer->v.iuser2;
|
||||||
|
break;
|
||||||
|
case iuser3:
|
||||||
|
iReturn = pPlayer->v.iuser3;
|
||||||
|
break;
|
||||||
|
case iuser4:
|
||||||
|
iReturn = pPlayer->v.iuser4;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (iSwitch > pev_float_start && iSwitch < pev_float_end)
|
||||||
|
{
|
||||||
|
valuetype=VALUETYPE_FLOAT;
|
||||||
|
switch(iSwitch)
|
||||||
|
{
|
||||||
|
case impacttime:
|
||||||
|
fReturn = pPlayer->v.impacttime;
|
||||||
|
break;
|
||||||
|
case starttime:
|
||||||
|
fReturn = pPlayer->v.starttime;
|
||||||
|
break;
|
||||||
|
case idealpitch:
|
||||||
|
fReturn = pPlayer->v.idealpitch;
|
||||||
|
break;
|
||||||
|
case pitch_speed:
|
||||||
|
fReturn = pPlayer->v.pitch_speed;
|
||||||
|
break;
|
||||||
|
case yaw_speed:
|
||||||
|
fReturn = pPlayer->v.yaw_speed;
|
||||||
|
break;
|
||||||
|
case ltime:
|
||||||
|
fReturn = pPlayer->v.ltime;
|
||||||
|
break;
|
||||||
|
case nextthink:
|
||||||
|
fReturn = pPlayer->v.nextthink;
|
||||||
|
break;
|
||||||
|
case gravity:
|
||||||
|
fReturn = pPlayer->v.gravity;
|
||||||
|
break;
|
||||||
|
case friction:
|
||||||
|
fReturn = pPlayer->v.friction;
|
||||||
|
break;
|
||||||
|
case frame:
|
||||||
|
fReturn = pPlayer->v.frame;
|
||||||
|
break;
|
||||||
|
case animtime:
|
||||||
|
fReturn = pPlayer->v.animtime;
|
||||||
|
break;
|
||||||
|
case framerate:
|
||||||
|
fReturn = pPlayer->v.framerate;
|
||||||
|
break;
|
||||||
|
case scale:
|
||||||
|
fReturn = pPlayer->v.scale;
|
||||||
|
break;
|
||||||
|
case renderamt:
|
||||||
|
fReturn = pPlayer->v.renderamt;
|
||||||
|
break;
|
||||||
|
case health:
|
||||||
|
fReturn = pPlayer->v.health;
|
||||||
|
break;
|
||||||
|
case frags:
|
||||||
|
fReturn = pPlayer->v.frags;
|
||||||
|
break;
|
||||||
|
case takedamage:
|
||||||
|
fReturn = pPlayer->v.takedamage;
|
||||||
|
break;
|
||||||
|
case max_health:
|
||||||
|
fReturn = pPlayer->v.max_health;
|
||||||
|
break;
|
||||||
|
case teleport_time:
|
||||||
|
fReturn = pPlayer->v.teleport_time;
|
||||||
|
break;
|
||||||
|
case armortype:
|
||||||
|
fReturn = pPlayer->v.armortype;
|
||||||
|
break;
|
||||||
|
case armorvalue:
|
||||||
|
fReturn = pPlayer->v.armorvalue;
|
||||||
|
break;
|
||||||
|
case dmg_take:
|
||||||
|
fReturn = pPlayer->v.dmg_take;
|
||||||
|
break;
|
||||||
|
case dmg_save:
|
||||||
|
fReturn = pPlayer->v.dmg_save;
|
||||||
|
break;
|
||||||
|
case dmg:
|
||||||
|
fReturn = pPlayer->v.dmg;
|
||||||
|
break;
|
||||||
|
case dmgtime:
|
||||||
|
fReturn = pPlayer->v.dmgtime;
|
||||||
|
break;
|
||||||
|
case speed:
|
||||||
|
fReturn = pPlayer->v.speed;
|
||||||
|
break;
|
||||||
|
case air_finished:
|
||||||
|
fReturn = pPlayer->v.air_finished;
|
||||||
|
break;
|
||||||
|
case pain_finished:
|
||||||
|
fReturn = pPlayer->v.pain_finished;
|
||||||
|
break;
|
||||||
|
case radsuit_finished:
|
||||||
|
fReturn = pPlayer->v.radsuit_finished;
|
||||||
|
break;
|
||||||
|
case maxspeed:
|
||||||
|
fReturn = pPlayer->v.maxspeed;
|
||||||
|
break;
|
||||||
|
case fov:
|
||||||
|
fReturn = pPlayer->v.fov;
|
||||||
|
break;
|
||||||
|
case flFallVelocity:
|
||||||
|
fReturn = pPlayer->v.flFallVelocity;
|
||||||
|
break;
|
||||||
|
case fuser1:
|
||||||
|
fReturn = pPlayer->v.fuser1;
|
||||||
|
break;
|
||||||
|
case fuser2:
|
||||||
|
fReturn = pPlayer->v.fuser2;
|
||||||
|
break;
|
||||||
|
case fuser3:
|
||||||
|
fReturn = pPlayer->v.fuser3;
|
||||||
|
break;
|
||||||
|
case fuser4:
|
||||||
|
fReturn = pPlayer->v.fuser4;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (iSwitch > pev_string_start && iSwitch < pev_string_end)
|
||||||
|
{
|
||||||
|
valuetype=VALUETYPE_STRING;
|
||||||
|
switch (iSwitch)
|
||||||
|
{
|
||||||
|
case classname:
|
||||||
|
iReturn = pPlayer->v.classname;
|
||||||
|
break;
|
||||||
|
case globalname:
|
||||||
|
iReturn = pPlayer->v.globalname;
|
||||||
|
break;
|
||||||
|
case model:
|
||||||
|
iReturn = pPlayer->v.model;
|
||||||
|
break;
|
||||||
|
case target:
|
||||||
|
iReturn = pPlayer->v.target;
|
||||||
|
break;
|
||||||
|
case targetname:
|
||||||
|
iReturn = pPlayer->v.targetname;
|
||||||
|
break;
|
||||||
|
case netname:
|
||||||
|
iReturn = pPlayer->v.netname;
|
||||||
|
break;
|
||||||
|
case message:
|
||||||
|
iReturn = pPlayer->v.message;
|
||||||
|
break;
|
||||||
|
case noise:
|
||||||
|
iReturn = pPlayer->v.noise;
|
||||||
|
break;
|
||||||
|
case noise1:
|
||||||
|
iReturn = pPlayer->v.noise1;
|
||||||
|
break;
|
||||||
|
case noise2:
|
||||||
|
iReturn = pPlayer->v.noise2;
|
||||||
|
break;
|
||||||
|
case noise3:
|
||||||
|
iReturn = pPlayer->v.noise3;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (iSwitch > pev_edict_start && iSwitch < pev_edict_end)
|
||||||
|
{
|
||||||
|
valuetype=VALUETYPE_EDICT;
|
||||||
|
switch (iSwitch)
|
||||||
|
{
|
||||||
|
case chain:
|
||||||
|
iReturn = ENTINDEX(pPlayer->v.chain);
|
||||||
|
break;
|
||||||
|
case dmg_inflictor:
|
||||||
|
iReturn = ENTINDEX(pPlayer->v.dmg_inflictor);
|
||||||
|
break;
|
||||||
|
case enemy:
|
||||||
|
iReturn = ENTINDEX(pPlayer->v.enemy);
|
||||||
|
break;
|
||||||
|
case aiment:
|
||||||
|
iReturn = ENTINDEX(pPlayer->v.aiment);
|
||||||
|
break;
|
||||||
|
case owner:
|
||||||
|
iReturn = ENTINDEX(pPlayer->v.owner);
|
||||||
|
break;
|
||||||
|
case groundentity:
|
||||||
|
iReturn = ENTINDEX(pPlayer->v.groundentity);
|
||||||
|
break;
|
||||||
|
case euser1:
|
||||||
|
iReturn = ENTINDEX(pPlayer->v.euser1);
|
||||||
|
break;
|
||||||
|
case euser2:
|
||||||
|
iReturn = ENTINDEX(pPlayer->v.euser2);
|
||||||
|
break;
|
||||||
|
case euser3:
|
||||||
|
iReturn = ENTINDEX(pPlayer->v.euser3);
|
||||||
|
break;
|
||||||
|
case euser4:
|
||||||
|
iReturn = ENTINDEX(pPlayer->v.euser4);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (iSwitch > pev_vecarray_start && iSwitch < pev_vecarray_end)
|
||||||
|
{
|
||||||
|
valuetype=VALUETYPE_VECTOR;
|
||||||
|
switch(iSwitch)
|
||||||
|
{
|
||||||
|
case origin:
|
||||||
|
vReturn = pPlayer->v.origin;
|
||||||
|
break;
|
||||||
|
case oldorigin:
|
||||||
|
vReturn = pPlayer->v.oldorigin;
|
||||||
|
break;
|
||||||
|
case velocity:
|
||||||
|
vReturn = pPlayer->v.velocity;
|
||||||
|
break;
|
||||||
|
case basevelocity:
|
||||||
|
vReturn = pPlayer->v.basevelocity;
|
||||||
|
break;
|
||||||
|
case movedir:
|
||||||
|
vReturn = pPlayer->v.movedir;
|
||||||
|
break;
|
||||||
|
case angles:
|
||||||
|
vReturn = pPlayer->v.angles;
|
||||||
|
break;
|
||||||
|
case avelocity:
|
||||||
|
vReturn = pPlayer->v.avelocity;
|
||||||
|
break;
|
||||||
|
case v_angle:
|
||||||
|
vReturn = pPlayer->v.v_angle;
|
||||||
|
break;
|
||||||
|
case endpos:
|
||||||
|
vReturn = pPlayer->v.endpos;
|
||||||
|
break;
|
||||||
|
case startpos:
|
||||||
|
vReturn = pPlayer->v.startpos;
|
||||||
|
break;
|
||||||
|
case absmin:
|
||||||
|
vReturn = pPlayer->v.absmin;
|
||||||
|
break;
|
||||||
|
case absmax:
|
||||||
|
vReturn = pPlayer->v.absmax;
|
||||||
|
break;
|
||||||
|
case mins:
|
||||||
|
vReturn = pPlayer->v.mins;
|
||||||
|
break;
|
||||||
|
case maxs:
|
||||||
|
vReturn = pPlayer->v.maxs;
|
||||||
|
break;
|
||||||
|
case size:
|
||||||
|
vReturn = pPlayer->v.size;
|
||||||
|
break;
|
||||||
|
case rendercolor:
|
||||||
|
vReturn = pPlayer->v.rendercolor;
|
||||||
|
break;
|
||||||
|
case view_ofs:
|
||||||
|
vReturn = pPlayer->v.view_ofs;
|
||||||
|
break;
|
||||||
|
case vuser1:
|
||||||
|
vReturn = pPlayer->v.vuser1;
|
||||||
|
break;
|
||||||
|
case vuser2:
|
||||||
|
vReturn = pPlayer->v.vuser2;
|
||||||
|
break;
|
||||||
|
case vuser3:
|
||||||
|
vReturn = pPlayer->v.vuser3;
|
||||||
|
break;
|
||||||
|
case vuser4:
|
||||||
|
vReturn = pPlayer->v.vuser4;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((iSwitch > pev_byte_start && iSwitch < pev_byte_end) || (iSwitch > pev_bytearray_start && iSwitch < pev_bytearray_end))
|
||||||
|
{
|
||||||
|
if (iSwitch > pev_byte_start && iSwitch < pev_byte_end)
|
||||||
|
valuetype=VALUETYPE_INT;
|
||||||
|
else
|
||||||
|
valuetype=VALUETYPE_BYTE;
|
||||||
|
switch(iSwitch)
|
||||||
|
{
|
||||||
|
case controller:
|
||||||
|
{
|
||||||
|
bReturn[0] = pPlayer->v.controller[0];
|
||||||
|
bReturn[1] = pPlayer->v.controller[1];
|
||||||
|
bReturn[2] = pPlayer->v.controller[2];
|
||||||
|
bReturn[3] = pPlayer->v.controller[3];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case controller_0:
|
||||||
|
iReturn = pPlayer->v.controller[0];
|
||||||
|
break;
|
||||||
|
case controller_1:
|
||||||
|
iReturn = pPlayer->v.controller[1];
|
||||||
|
break;
|
||||||
|
case controller_2:
|
||||||
|
iReturn = pPlayer->v.controller[2];
|
||||||
|
break;
|
||||||
|
case controller_3:
|
||||||
|
iReturn = pPlayer->v.controller[3];
|
||||||
|
break;
|
||||||
|
case blending:
|
||||||
|
{
|
||||||
|
bReturn[0] = pPlayer->v.blending[0];
|
||||||
|
bReturn[1] = pPlayer->v.blending[1];
|
||||||
|
bReturn[2]=0;
|
||||||
|
bReturn[3]=0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case blending_0:
|
||||||
|
iReturn = pPlayer->v.blending[0];
|
||||||
|
break;
|
||||||
|
case blending_1:
|
||||||
|
iReturn = pPlayer->v.blending[1];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (returntype == RETURNTYPE_INT)
|
||||||
|
{
|
||||||
|
// We are only returning an integer here.
|
||||||
|
// If the returned value is a string, return make_string value.
|
||||||
|
// If the returned value is a float, round it down.
|
||||||
|
// If the returned value is int, just return it.
|
||||||
|
// Otherwise, print a warning.
|
||||||
|
if (valuetype == VALUETYPE_INT || valuetype == VALUETYPE_EDICT)
|
||||||
|
{
|
||||||
|
return iReturn;
|
||||||
|
}
|
||||||
|
else if (valuetype == VALUETYPE_FLOAT)
|
||||||
|
{
|
||||||
|
return (int)fReturn;
|
||||||
|
}
|
||||||
|
MF_Log("Invalid return valuetype for pev().");
|
||||||
|
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else if (returntype == RETURNTYPE_FLOAT)
|
||||||
|
{
|
||||||
|
// We are setting a variable as a float here.
|
||||||
|
// If it's a float, just set it.
|
||||||
|
// If it's an integer, convert and set it.
|
||||||
|
// Otherwise, return an error.
|
||||||
|
if (valuetype == VALUETYPE_INT)
|
||||||
|
{
|
||||||
|
float fTemp = (float)iReturn;
|
||||||
|
cell *cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
*cRet = amx_ftoc(fTemp);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else if (valuetype == VALUETYPE_FLOAT)
|
||||||
|
{
|
||||||
|
cell *cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
*cRet = amx_ftoc(fReturn);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else if (valuetype == VALUETYPE_VECTOR)
|
||||||
|
{
|
||||||
|
cell *cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
cRet[0] = amx_ftoc(vReturn.x);
|
||||||
|
cRet[1] = amx_ftoc(vReturn.y);
|
||||||
|
cRet[2] = amx_ftoc(vReturn.z);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else if (valuetype == VALUETYPE_BYTE)
|
||||||
|
{
|
||||||
|
cell *cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
|
if (iSwitch == blending)
|
||||||
|
{
|
||||||
|
// Only 2 for blending.
|
||||||
|
cRet[0]=bReturn[0];
|
||||||
|
cRet[1]=bReturn[1];
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// There's 4 for controller.
|
||||||
|
cRet[0]=bReturn[0];
|
||||||
|
cRet[1]=bReturn[1];
|
||||||
|
cRet[2]=bReturn[2];
|
||||||
|
cRet[3]=bReturn[3];
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MF_Log("Invalid return valuetype for pev().");
|
||||||
|
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
||||||
|
}
|
||||||
|
else if (returntype == RETURNTYPE_STRING)
|
||||||
|
{
|
||||||
|
// Here is a string value that was requested.
|
||||||
|
// If the returned value is an integer or float, then sprintf() it to string.
|
||||||
|
// If the returned is a string, then string() it.
|
||||||
|
if (valuetype == VALUETYPE_INT || valuetype == VALUETYPE_STRING || valuetype == VALUETYPE_EDICT)
|
||||||
|
{
|
||||||
|
if (valuetype == VALUETYPE_STRING)
|
||||||
|
{
|
||||||
|
MF_SetAmxString(amx, params[3], STRING(iReturn), params[4]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char blah[64];
|
||||||
|
sprintf(blah,"%i",iReturn);
|
||||||
|
MF_SetAmxString(amx, params[3], blah, params[4]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (valuetype == VALUETYPE_FLOAT)
|
||||||
|
{
|
||||||
|
char blah[64];
|
||||||
|
sprintf(blah,"%f",fReturn);
|
||||||
|
MF_SetAmxString(amx, params[3], blah, params[4]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (valuetype == VALUETYPE_VECTOR)
|
||||||
|
{
|
||||||
|
char blah[256];
|
||||||
|
sprintf(blah,"%f %f %f",vReturn.x,vReturn.y,vReturn.z);
|
||||||
|
MF_SetAmxString(amx, params[3], blah, params[4]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (valuetype == VALUETYPE_BYTE)
|
||||||
|
{
|
||||||
|
if (iSwitch == controller)
|
||||||
|
{
|
||||||
|
char blah[128];
|
||||||
|
sprintf(blah,"%i %i",bReturn[0],bReturn[1]);
|
||||||
|
MF_SetAmxString(amx,params[3],blah,params[4]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char blah[256];
|
||||||
|
sprintf(blah,"%i %i %i %i",bReturn[0],bReturn[1],bReturn[2],bReturn[3]);
|
||||||
|
MF_SetAmxString(amx,params[3],blah,params[4]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MF_Log("Invalid return valuetype for pev().");
|
||||||
|
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
160
dlls/fakemeta/pev.h
Executable file
160
dlls/fakemeta/pev.h
Executable file
|
@ -0,0 +1,160 @@
|
||||||
|
#ifndef _INCLUDE_PEV_H
|
||||||
|
#define _INCLUDE_PEV_H
|
||||||
|
|
||||||
|
#define RETURNTYPE_INT 2
|
||||||
|
#define RETURNTYPE_FLOAT 3
|
||||||
|
#define RETURNTYPE_VECTOR 3
|
||||||
|
#define RETURNTYPE_STRING 4
|
||||||
|
#define VALUETYPE_INT 1
|
||||||
|
#define VALUETYPE_FLOAT 2
|
||||||
|
#define VALUETYPE_VECTOR 3
|
||||||
|
#define VALUETYPE_EDICT 4
|
||||||
|
#define VALUETYPE_STRING 5
|
||||||
|
#define VALUETYPE_BYTE 6
|
||||||
|
|
||||||
|
enum pev_pointers
|
||||||
|
{
|
||||||
|
pev_string_start = 0,
|
||||||
|
classname,
|
||||||
|
globalname,
|
||||||
|
model,
|
||||||
|
target,
|
||||||
|
targetname,
|
||||||
|
netname,
|
||||||
|
message,
|
||||||
|
noise,
|
||||||
|
noise1,
|
||||||
|
noise2,
|
||||||
|
noise3,
|
||||||
|
pev_string_end,
|
||||||
|
pev_edict_start,
|
||||||
|
chain,
|
||||||
|
dmg_inflictor,
|
||||||
|
enemy,
|
||||||
|
aiment,
|
||||||
|
owner,
|
||||||
|
groundentity,
|
||||||
|
euser1,
|
||||||
|
euser2,
|
||||||
|
euser3,
|
||||||
|
euser4,
|
||||||
|
pev_edict_end,
|
||||||
|
pev_float_start,
|
||||||
|
impacttime,
|
||||||
|
starttime,
|
||||||
|
idealpitch,
|
||||||
|
pitch_speed,
|
||||||
|
yaw_speed,
|
||||||
|
ltime,
|
||||||
|
nextthink,
|
||||||
|
gravity,
|
||||||
|
friction,
|
||||||
|
frame,
|
||||||
|
animtime,
|
||||||
|
framerate,
|
||||||
|
scale,
|
||||||
|
renderamt,
|
||||||
|
health,
|
||||||
|
frags,
|
||||||
|
takedamage,
|
||||||
|
max_health,
|
||||||
|
teleport_time,
|
||||||
|
armortype,
|
||||||
|
armorvalue,
|
||||||
|
dmg_take,
|
||||||
|
dmg_save,
|
||||||
|
dmg,
|
||||||
|
dmgtime,
|
||||||
|
speed,
|
||||||
|
air_finished,
|
||||||
|
pain_finished,
|
||||||
|
radsuit_finished,
|
||||||
|
maxspeed,
|
||||||
|
fov,
|
||||||
|
flFallVelocity,
|
||||||
|
fuser1,
|
||||||
|
fuser2,
|
||||||
|
fuser3,
|
||||||
|
fuser4,
|
||||||
|
pev_float_end,
|
||||||
|
pev_int_start,
|
||||||
|
fixangle,
|
||||||
|
modelindex,
|
||||||
|
viewmodel,
|
||||||
|
weaponmodel,
|
||||||
|
movetype,
|
||||||
|
solid,
|
||||||
|
skin,
|
||||||
|
body,
|
||||||
|
effects,
|
||||||
|
light_level,
|
||||||
|
sequence,
|
||||||
|
gaitsequence,
|
||||||
|
rendermode,
|
||||||
|
renderfx,
|
||||||
|
weapons,
|
||||||
|
deadflag,
|
||||||
|
button,
|
||||||
|
impulse,
|
||||||
|
spawnflags,
|
||||||
|
flags,
|
||||||
|
colormap,
|
||||||
|
team,
|
||||||
|
waterlevel,
|
||||||
|
watertype,
|
||||||
|
playerclass,
|
||||||
|
weaponanim,
|
||||||
|
pushmsec,
|
||||||
|
bInDuck,
|
||||||
|
flTimeStepSound,
|
||||||
|
flSwimTime,
|
||||||
|
flDuckTime,
|
||||||
|
iStepLeft,
|
||||||
|
gamestate,
|
||||||
|
oldbuttons,
|
||||||
|
groupinfo,
|
||||||
|
iuser1,
|
||||||
|
iuser2,
|
||||||
|
iuser3,
|
||||||
|
iuser4,
|
||||||
|
pev_int_end,
|
||||||
|
pev_byte_start,
|
||||||
|
controller_0,
|
||||||
|
controller_1,
|
||||||
|
controller_2,
|
||||||
|
controller_3,
|
||||||
|
blending_0,
|
||||||
|
blending_1,
|
||||||
|
pev_byte_end,
|
||||||
|
pev_bytearray_start,
|
||||||
|
controller,
|
||||||
|
blending,
|
||||||
|
pev_bytearray_end,
|
||||||
|
pev_vecarray_start,
|
||||||
|
origin,
|
||||||
|
oldorigin,
|
||||||
|
velocity,
|
||||||
|
basevelocity,
|
||||||
|
clbasevelocity,
|
||||||
|
movedir,
|
||||||
|
angles,
|
||||||
|
avelocity,
|
||||||
|
v_angle,
|
||||||
|
endpos,
|
||||||
|
startpos,
|
||||||
|
absmin,
|
||||||
|
absmax,
|
||||||
|
mins,
|
||||||
|
maxs,
|
||||||
|
size,
|
||||||
|
rendercolor,
|
||||||
|
view_ofs,
|
||||||
|
vuser1,
|
||||||
|
vuser2,
|
||||||
|
vuser3,
|
||||||
|
vuser4,
|
||||||
|
punchangle,
|
||||||
|
pev_vecarray_end
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //_INCLUDE_PEV_H
|
2990
dlls/fakemeta/sdk/amxxmodule.cpp
Executable file
2990
dlls/fakemeta/sdk/amxxmodule.cpp
Executable file
File diff suppressed because it is too large
Load Diff
2152
dlls/fakemeta/sdk/amxxmodule.h
Executable file
2152
dlls/fakemeta/sdk/amxxmodule.h
Executable file
File diff suppressed because it is too large
Load Diff
462
dlls/fakemeta/sdk/moduleconfig.h
Executable file
462
dlls/fakemeta/sdk/moduleconfig.h
Executable file
|
@ -0,0 +1,462 @@
|
||||||
|
// Configuration
|
||||||
|
|
||||||
|
#ifndef __MODULECONFIG_H__
|
||||||
|
#define __MODULECONFIG_H__
|
||||||
|
|
||||||
|
// Module info
|
||||||
|
#define MODULE_NAME "FakeMeta"
|
||||||
|
#define MODULE_VERSION "0.20"
|
||||||
|
#define MODULE_AUTHOR "AMX Mod X Dev Team"
|
||||||
|
#define MODULE_URL "http://www.amxmodx.org/"
|
||||||
|
#define MODULE_LOGTAG "FAKEMETA"
|
||||||
|
// If you want the module not to be reloaded on mapchange, remove / comment out the next line
|
||||||
|
#define MODULE_RELOAD_ON_MAPCHANGE
|
||||||
|
|
||||||
|
#ifdef __DATE__
|
||||||
|
#define MODULE_DATE __DATE__
|
||||||
|
#else // __DATE__
|
||||||
|
#define MODULE_DATE "Unknown"
|
||||||
|
#endif // __DATE__
|
||||||
|
|
||||||
|
// metamod plugin?
|
||||||
|
#define USE_METAMOD
|
||||||
|
|
||||||
|
// - AMXX Init functions
|
||||||
|
// Also consider using FN_META_*
|
||||||
|
// AMXX query
|
||||||
|
//#define FN_AMXX_QUERY OnAmxxQuery
|
||||||
|
// AMXX attach
|
||||||
|
// Do native functions init here (MF_AddNatives)
|
||||||
|
#define FN_AMXX_ATTACH OnAmxxAttach
|
||||||
|
// AMXX detach
|
||||||
|
//#define FN_AMXX_DETACH OnAmxxDetach
|
||||||
|
// All plugins loaded
|
||||||
|
// Do forward functions init here (MF_RegisterForward)
|
||||||
|
// #define FN_AMXX_PLUGINSLOADED OnPluginsLoaded
|
||||||
|
|
||||||
|
/**** METAMOD ****/
|
||||||
|
// If your module doesn't use metamod, you may close the file now :)
|
||||||
|
#ifdef USE_METAMOD
|
||||||
|
// ----
|
||||||
|
// Hook Functions
|
||||||
|
// Uncomment these to be called
|
||||||
|
// You can also change the function name
|
||||||
|
|
||||||
|
// - Metamod init functions
|
||||||
|
// Also consider using FN_AMXX_*
|
||||||
|
// Meta query
|
||||||
|
//#define FN_META_QUERY OnMetaQuery
|
||||||
|
// Meta attach
|
||||||
|
//#define FN_META_ATTACH OnMetaAttach
|
||||||
|
// Meta detach
|
||||||
|
//#define FN_META_DETACH OnMetaDetach
|
||||||
|
|
||||||
|
// (wd) are Will Day's notes
|
||||||
|
// - GetEntityAPI2 functions
|
||||||
|
// #define FN_GameDLLInit GameDLLInit /* pfnGameInit() */
|
||||||
|
// #define FN_DispatchSpawn DispatchSpawn /* pfnSpawn() */
|
||||||
|
// #define FN_DispatchThink DispatchThink /* pfnThink() */
|
||||||
|
// #define FN_DispatchUse DispatchUse /* pfnUse() */
|
||||||
|
// #define FN_DispatchTouch DispatchTouch /* pfnTouch() */
|
||||||
|
// #define FN_DispatchBlocked DispatchBlocked /* pfnBlocked() */
|
||||||
|
// #define FN_DispatchKeyValue DispatchKeyValue /* pfnKeyValue() */
|
||||||
|
// #define FN_DispatchSave DispatchSave /* pfnSave() */
|
||||||
|
// #define FN_DispatchRestore DispatchRestore /* pfnRestore() */
|
||||||
|
// #define FN_DispatchObjectCollsionBox DispatchObjectCollsionBox /* pfnSetAbsBox() */
|
||||||
|
// #define FN_SaveWriteFields SaveWriteFields /* pfnSaveWriteFields() */
|
||||||
|
// #define FN_SaveReadFields SaveReadFields /* pfnSaveReadFields() */
|
||||||
|
// #define FN_SaveGlobalState SaveGlobalState /* pfnSaveGlobalState() */
|
||||||
|
// #define FN_RestoreGlobalState RestoreGlobalState /* pfnRestoreGlobalState() */
|
||||||
|
// #define FN_ResetGlobalState ResetGlobalState /* pfnResetGlobalState() */
|
||||||
|
// #define FN_ClientConnect ClientConnect /* pfnClientConnect() (wd) Client has connected */
|
||||||
|
// #define FN_ClientDisconnect ClientDisconnect /* pfnClientDisconnect() (wd) Player has left the game */
|
||||||
|
// #define FN_ClientKill ClientKill /* pfnClientKill() (wd) Player has typed "kill" */
|
||||||
|
// #define FN_ClientPutInServer ClientPutInServer /* pfnClientPutInServer() (wd) Client is entering the game */
|
||||||
|
// #define FN_ClientCommand ClientCommand /* pfnClientCommand() (wd) Player has sent a command (typed or from a bind) */
|
||||||
|
// #define FN_ClientUserInfoChanged ClientUserInfoChanged /* pfnClientUserInfoChanged() (wd) Client has updated their setinfo structure */
|
||||||
|
// #define FN_ServerActivate ServerActivate /* pfnServerActivate() (wd) Server is starting a new map */
|
||||||
|
// #define FN_ServerDeactivate ServerDeactivate /* pfnServerDeactivate() (wd) Server is leaving the map (shutdown or changelevel); SDK2 */
|
||||||
|
// #define FN_PlayerPreThink PlayerPreThink /* pfnPlayerPreThink() */
|
||||||
|
// #define FN_PlayerPostThink PlayerPostThink /* pfnPlayerPostThink() */
|
||||||
|
// #define FN_StartFrame StartFrame /* pfnStartFrame() */
|
||||||
|
// #define FN_ParmsNewLevel ParmsNewLevel /* pfnParmsNewLevel() */
|
||||||
|
// #define FN_ParmsChangeLevel ParmsChangeLevel /* pfnParmsChangeLevel() */
|
||||||
|
// #define FN_GetGameDescription GetGameDescription /* pfnGetGameDescription() Returns string describing current .dll. E.g. "TeamFotrress 2" "Half-Life" */
|
||||||
|
// #define FN_PlayerCustomization PlayerCustomization /* pfnPlayerCustomization() Notifies .dll of new customization for player. */
|
||||||
|
// #define FN_SpectatorConnect SpectatorConnect /* pfnSpectatorConnect() Called when spectator joins server */
|
||||||
|
// #define FN_SpectatorDisconnect SpectatorDisconnect /* pfnSpectatorDisconnect() Called when spectator leaves the server */
|
||||||
|
// #define FN_SpectatorThink SpectatorThink /* pfnSpectatorThink() Called when spectator sends a command packet (usercmd_t) */
|
||||||
|
// #define FN_Sys_Error Sys_Error /* pfnSys_Error() Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint. SDK2 */
|
||||||
|
// #define FN_PM_Move PM_Move /* pfnPM_Move() (wd) SDK2 */
|
||||||
|
// #define FN_PM_Init PM_Init /* pfnPM_Init() Server version of player movement initialization; (wd) SDK2 */
|
||||||
|
// #define FN_PM_FindTextureType PM_FindTextureType /* pfnPM_FindTextureType() (wd) SDK2 */
|
||||||
|
// #define FN_SetupVisibility SetupVisibility /* pfnSetupVisibility() Set up PVS and PAS for networking for this client; (wd) SDK2 */
|
||||||
|
// #define FN_UpdateClientData UpdateClientData /* pfnUpdateClientData() Set up data sent only to specific client; (wd) SDK2 */
|
||||||
|
// #define FN_AddToFullPack AddToFullPack /* pfnAddToFullPack() (wd) SDK2 */
|
||||||
|
// #define FN_CreateBaseline CreateBaseline /* pfnCreateBaseline() Tweak entity baseline for network encoding allows setup of player baselines too.; (wd) SDK2 */
|
||||||
|
// #define FN_RegisterEncoders RegisterEncoders /* pfnRegisterEncoders() Callbacks for network encoding; (wd) SDK2 */
|
||||||
|
// #define FN_GetWeaponData GetWeaponData /* pfnGetWeaponData() (wd) SDK2 */
|
||||||
|
// #define FN_CmdStart CmdStart /* pfnCmdStart() (wd) SDK2 */
|
||||||
|
// #define FN_CmdEnd CmdEnd /* pfnCmdEnd() (wd) SDK2 */
|
||||||
|
// #define FN_ConnectionlessPacket ConnectionlessPacket /* pfnConnectionlessPacket() (wd) SDK2 */
|
||||||
|
// #define FN_GetHullBounds GetHullBounds /* pfnGetHullBounds() (wd) SDK2 */
|
||||||
|
// #define FN_CreateInstancedBaselines CreateInstancedBaselines /* pfnCreateInstancedBaselines() (wd) SDK2 */
|
||||||
|
// #define FN_InconsistentFile InconsistentFile /* pfnInconsistentFile() (wd) SDK2 */
|
||||||
|
// #define FN_AllowLagCompensation AllowLagCompensation /* pfnAllowLagCompensation() (wd) SDK2 */
|
||||||
|
|
||||||
|
// - GetEntityAPI2_Post functions
|
||||||
|
// #define FN_GameDLLInit_Post GameDLLInit_Post
|
||||||
|
// #define FN_DispatchSpawn_Post DispatchSpawn_Post
|
||||||
|
// #define FN_DispatchThink_Post DispatchThink_Post
|
||||||
|
// #define FN_DispatchUse_Post DispatchUse_Post
|
||||||
|
// #define FN_DispatchTouch_Post DispatchTouch_Post
|
||||||
|
// #define FN_DispatchBlocked_Post DispatchBlocked_Post
|
||||||
|
// #define FN_DispatchKeyValue_Post DispatchKeyValue_Post
|
||||||
|
// #define FN_DispatchSave_Post DispatchSave_Post
|
||||||
|
// #define FN_DispatchRestore_Post DispatchRestore_Post
|
||||||
|
// #define FN_DispatchObjectCollsionBox_Post DispatchObjectCollsionBox_Post
|
||||||
|
// #define FN_SaveWriteFields_Post SaveWriteFields_Post
|
||||||
|
// #define FN_SaveReadFields_Post SaveReadFields_Post
|
||||||
|
// #define FN_SaveGlobalState_Post SaveGlobalState_Post
|
||||||
|
// #define FN_RestoreGlobalState_Post RestoreGlobalState_Post
|
||||||
|
// #define FN_ResetGlobalState_Post ResetGlobalState_Post
|
||||||
|
// #define FN_ClientConnect_Post ClientConnect_Post
|
||||||
|
// #define FN_ClientDisconnect_Post ClientDisconnect_Post
|
||||||
|
// #define FN_ClientKill_Post ClientKill_Post
|
||||||
|
// #define FN_ClientPutInServer_Post ClientPutInServer_Post
|
||||||
|
// #define FN_ClientCommand_Post ClientCommand_Post
|
||||||
|
// #define FN_ClientUserInfoChanged_Post ClientUserInfoChanged_Post
|
||||||
|
// #define FN_ServerActivate_Post ServerActivate_Post
|
||||||
|
// #define FN_ServerDeactivate_Post ServerDeactivate_Post
|
||||||
|
// #define FN_PlayerPreThink_Post PlayerPreThink_Post
|
||||||
|
// #define FN_PlayerPostThink_Post PlayerPostThink_Post
|
||||||
|
// #define FN_StartFrame_Post StartFrame_Post
|
||||||
|
// #define FN_ParmsNewLevel_Post ParmsNewLevel_Post
|
||||||
|
// #define FN_ParmsChangeLevel_Post ParmsChangeLevel_Post
|
||||||
|
// #define FN_GetGameDescription_Post GetGameDescription_Post
|
||||||
|
// #define FN_PlayerCustomization_Post PlayerCustomization_Post
|
||||||
|
// #define FN_SpectatorConnect_Post SpectatorConnect_Post
|
||||||
|
// #define FN_SpectatorDisconnect_Post SpectatorDisconnect_Post
|
||||||
|
// #define FN_SpectatorThink_Post SpectatorThink_Post
|
||||||
|
// #define FN_Sys_Error_Post Sys_Error_Post
|
||||||
|
// #define FN_PM_Move_Post PM_Move_Post
|
||||||
|
// #define FN_PM_Init_Post PM_Init_Post
|
||||||
|
// #define FN_PM_FindTextureType_Post PM_FindTextureType_Post
|
||||||
|
// #define FN_SetupVisibility_Post SetupVisibility_Post
|
||||||
|
// #define FN_UpdateClientData_Post UpdateClientData_Post
|
||||||
|
// #define FN_AddToFullPack_Post AddToFullPack_Post
|
||||||
|
// #define FN_CreateBaseline_Post CreateBaseline_Post
|
||||||
|
// #define FN_RegisterEncoders_Post RegisterEncoders_Post
|
||||||
|
// #define FN_GetWeaponData_Post GetWeaponData_Post
|
||||||
|
// #define FN_CmdStart_Post CmdStart_Post
|
||||||
|
// #define FN_CmdEnd_Post CmdEnd_Post
|
||||||
|
// #define FN_ConnectionlessPacket_Post ConnectionlessPacket_Post
|
||||||
|
// #define FN_GetHullBounds_Post GetHullBounds_Post
|
||||||
|
// #define FN_CreateInstancedBaselines_Post CreateInstancedBaselines_Post
|
||||||
|
// #define FN_InconsistentFile_Post InconsistentFile_Post
|
||||||
|
// #define FN_AllowLagCompensation_Post AllowLagCompensation_Post
|
||||||
|
|
||||||
|
// - GetEngineAPI functions
|
||||||
|
// #define FN_PrecacheModel PrecacheModel
|
||||||
|
// #define FN_PrecacheSound PrecacheSound
|
||||||
|
// #define FN_SetModel SetModel
|
||||||
|
// #define FN_ModelIndex ModelIndex
|
||||||
|
// #define FN_ModelFrames ModelFrames
|
||||||
|
// #define FN_SetSize SetSize
|
||||||
|
// #define FN_ChangeLevel ChangeLevel
|
||||||
|
// #define FN_GetSpawnParms GetSpawnParms
|
||||||
|
// #define FN_SaveSpawnParms SaveSpawnParms
|
||||||
|
// #define FN_VecToYaw VecToYaw
|
||||||
|
// #define FN_VecToAngles VecToAngles
|
||||||
|
// #define FN_MoveToOrigin MoveToOrigin
|
||||||
|
// #define FN_ChangeYaw ChangeYaw
|
||||||
|
// #define FN_ChangePitch ChangePitch
|
||||||
|
// #define FN_FindEntityByString FindEntityByString
|
||||||
|
// #define FN_GetEntityIllum GetEntityIllum
|
||||||
|
// #define FN_FindEntityInSphere FindEntityInSphere
|
||||||
|
// #define FN_FindClientInPVS FindClientInPVS
|
||||||
|
// #define FN_EntitiesInPVS EntitiesInPVS
|
||||||
|
// #define FN_MakeVectors MakeVectors
|
||||||
|
// #define FN_AngleVectors AngleVectors
|
||||||
|
// #define FN_CreateEntity CreateEntity
|
||||||
|
// #define FN_RemoveEntity RemoveEntity
|
||||||
|
// #define FN_CreateNamedEntity CreateNamedEntity
|
||||||
|
// #define FN_MakeStatic MakeStatic
|
||||||
|
// #define FN_EntIsOnFloor EntIsOnFloor
|
||||||
|
// #define FN_DropToFloor DropToFloor
|
||||||
|
// #define FN_WalkMove WalkMove
|
||||||
|
// #define FN_SetOrigin SetOrigin
|
||||||
|
// #define FN_EmitSound EmitSound
|
||||||
|
// #define FN_EmitAmbientSound EmitAmbientSound
|
||||||
|
// #define FN_TraceLine TraceLine
|
||||||
|
// #define FN_TraceToss TraceToss
|
||||||
|
// #define FN_TraceMonsterHull TraceMonsterHull
|
||||||
|
// #define FN_TraceHull TraceHull
|
||||||
|
// #define FN_TraceModel TraceModel
|
||||||
|
// #define FN_TraceTexture TraceTexture
|
||||||
|
// #define FN_TraceSphere TraceSphere
|
||||||
|
// #define FN_GetAimVector GetAimVector
|
||||||
|
// #define FN_ServerCommand ServerCommand
|
||||||
|
// #define FN_ServerExecute ServerExecute
|
||||||
|
// #define FN_engClientCommand engClientCommand
|
||||||
|
// #define FN_ParticleEffect ParticleEffect
|
||||||
|
// #define FN_LightStyle LightStyle
|
||||||
|
// #define FN_DecalIndex DecalIndex
|
||||||
|
// #define FN_PointContents PointContents
|
||||||
|
// #define FN_MessageBegin MessageBegin
|
||||||
|
// #define FN_MessageEnd MessageEnd
|
||||||
|
// #define FN_WriteByte WriteByte
|
||||||
|
// #define FN_WriteChar WriteChar
|
||||||
|
// #define FN_WriteShort WriteShort
|
||||||
|
// #define FN_WriteLong WriteLong
|
||||||
|
// #define FN_WriteAngle WriteAngle
|
||||||
|
// #define FN_WriteCoord WriteCoord
|
||||||
|
// #define FN_WriteString WriteString
|
||||||
|
// #define FN_WriteEntity WriteEntity
|
||||||
|
// #define FN_CVarRegister CVarRegister
|
||||||
|
// #define FN_CVarGetFloat CVarGetFloat
|
||||||
|
// #define FN_CVarGetString CVarGetString
|
||||||
|
// #define FN_CVarSetFloat CVarSetFloat
|
||||||
|
// #define FN_CVarSetString CVarSetString
|
||||||
|
// #define FN_AlertMessage AlertMessage
|
||||||
|
// #define FN_EngineFprintf EngineFprintf
|
||||||
|
// #define FN_PvAllocEntPrivateData PvAllocEntPrivateData
|
||||||
|
// #define FN_PvEntPrivateData PvEntPrivateData
|
||||||
|
// #define FN_FreeEntPrivateData FreeEntPrivateData
|
||||||
|
// #define FN_SzFromIndex SzFromIndex
|
||||||
|
// #define FN_AllocString AllocString
|
||||||
|
// #define FN_GetVarsOfEnt GetVarsOfEnt
|
||||||
|
// #define FN_PEntityOfEntOffset PEntityOfEntOffset
|
||||||
|
// #define FN_EntOffsetOfPEntity EntOffsetOfPEntity
|
||||||
|
// #define FN_IndexOfEdict IndexOfEdict
|
||||||
|
// #define FN_PEntityOfEntIndex PEntityOfEntIndex
|
||||||
|
// #define FN_FindEntityByVars FindEntityByVars
|
||||||
|
// #define FN_GetModelPtr GetModelPtr
|
||||||
|
// #define FN_RegUserMsg RegUserMsg
|
||||||
|
// #define FN_AnimationAutomove AnimationAutomove
|
||||||
|
// #define FN_GetBonePosition GetBonePosition
|
||||||
|
// #define FN_FunctionFromName FunctionFromName
|
||||||
|
// #define FN_NameForFunction NameForFunction
|
||||||
|
// #define FN_ClientPrintf ClientPrintf
|
||||||
|
// #define FN_ServerPrint ServerPrint
|
||||||
|
// #define FN_Cmd_Args Cmd_Args
|
||||||
|
// #define FN_Cmd_Argv Cmd_Argv
|
||||||
|
// #define FN_Cmd_Argc Cmd_Argc
|
||||||
|
// #define FN_GetAttachment GetAttachment
|
||||||
|
// #define FN_CRC32_Init CRC32_Init
|
||||||
|
// #define FN_CRC32_ProcessBuffer CRC32_ProcessBuffer
|
||||||
|
// #define FN_CRC32_ProcessByte CRC32_ProcessByte
|
||||||
|
// #define FN_CRC32_Final CRC32_Final
|
||||||
|
// #define FN_RandomLong RandomLong
|
||||||
|
// #define FN_RandomFloat RandomFloat
|
||||||
|
// #define FN_SetView SetView
|
||||||
|
// #define FN_Time Time
|
||||||
|
// #define FN_CrosshairAngle CrosshairAngle
|
||||||
|
// #define FN_LoadFileForMe LoadFileForMe
|
||||||
|
// #define FN_FreeFile FreeFile
|
||||||
|
// #define FN_EndSection EndSection
|
||||||
|
// #define FN_CompareFileTime CompareFileTime
|
||||||
|
// #define FN_GetGameDir GetGameDir
|
||||||
|
// #define FN_Cvar_RegisterVariable Cvar_RegisterVariable
|
||||||
|
// #define FN_FadeClientVolume FadeClientVolume
|
||||||
|
// #define FN_SetClientMaxspeed SetClientMaxspeed
|
||||||
|
// #define FN_CreateFakeClient CreateFakeClient
|
||||||
|
// #define FN_RunPlayerMove RunPlayerMove
|
||||||
|
// #define FN_NumberOfEntities NumberOfEntities
|
||||||
|
// #define FN_GetInfoKeyBuffer GetInfoKeyBuffer
|
||||||
|
// #define FN_InfoKeyValue InfoKeyValue
|
||||||
|
// #define FN_SetKeyValue SetKeyValue
|
||||||
|
// #define FN_SetClientKeyValue SetClientKeyValue
|
||||||
|
// #define FN_IsMapValid IsMapValid
|
||||||
|
// #define FN_StaticDecal StaticDecal
|
||||||
|
// #define FN_PrecacheGeneric PrecacheGeneric
|
||||||
|
// #define FN_GetPlayerUserId GetPlayerUserId
|
||||||
|
// #define FN_BuildSoundMsg BuildSoundMsg
|
||||||
|
// #define FN_IsDedicatedServer IsDedicatedServer
|
||||||
|
// #define FN_CVarGetPointer CVarGetPointer
|
||||||
|
// #define FN_GetPlayerWONId GetPlayerWONId
|
||||||
|
// #define FN_Info_RemoveKey Info_RemoveKey
|
||||||
|
// #define FN_GetPhysicsKeyValue GetPhysicsKeyValue
|
||||||
|
// #define FN_SetPhysicsKeyValue SetPhysicsKeyValue
|
||||||
|
// #define FN_GetPhysicsInfoString GetPhysicsInfoString
|
||||||
|
// #define FN_PrecacheEvent PrecacheEvent
|
||||||
|
// #define FN_PlaybackEvent PlaybackEvent
|
||||||
|
// #define FN_SetFatPVS SetFatPVS
|
||||||
|
// #define FN_SetFatPAS SetFatPAS
|
||||||
|
// #define FN_CheckVisibility CheckVisibility
|
||||||
|
// #define FN_DeltaSetField DeltaSetField
|
||||||
|
// #define FN_DeltaUnsetField DeltaUnsetField
|
||||||
|
// #define FN_DeltaAddEncoder DeltaAddEncoder
|
||||||
|
// #define FN_GetCurrentPlayer GetCurrentPlayer
|
||||||
|
// #define FN_CanSkipPlayer CanSkipPlayer
|
||||||
|
// #define FN_DeltaFindField DeltaFindField
|
||||||
|
// #define FN_DeltaSetFieldByIndex DeltaSetFieldByIndex
|
||||||
|
// #define FN_DeltaUnsetFieldByIndex DeltaUnsetFieldByIndex
|
||||||
|
// #define FN_SetGroupMask SetGroupMask
|
||||||
|
// #define FN_engCreateInstancedBaseline engCreateInstancedBaseline
|
||||||
|
// #define FN_Cvar_DirectSet Cvar_DirectSet
|
||||||
|
// #define FN_ForceUnmodified ForceUnmodified
|
||||||
|
// #define FN_GetPlayerStats GetPlayerStats
|
||||||
|
// #define FN_AddServerCommand AddServerCommand
|
||||||
|
// #define FN_Voice_GetClientListening Voice_GetClientListening
|
||||||
|
// #define FN_Voice_SetClientListening Voice_SetClientListening
|
||||||
|
// #define FN_GetPlayerAuthId GetPlayerAuthId
|
||||||
|
|
||||||
|
// - GetEngineAPI_Post functions
|
||||||
|
// #define FN_PrecacheModel_Post PrecacheModel_Post
|
||||||
|
// #define FN_PrecacheSound_Post PrecacheSound_Post
|
||||||
|
// #define FN_SetModel_Post SetModel_Post
|
||||||
|
// #define FN_ModelIndex_Post ModelIndex_Post
|
||||||
|
// #define FN_ModelFrames_Post ModelFrames_Post
|
||||||
|
// #define FN_SetSize_Post SetSize_Post
|
||||||
|
// #define FN_ChangeLevel_Post ChangeLevel_Post
|
||||||
|
// #define FN_GetSpawnParms_Post GetSpawnParms_Post
|
||||||
|
// #define FN_SaveSpawnParms_Post SaveSpawnParms_Post
|
||||||
|
// #define FN_VecToYaw_Post VecToYaw_Post
|
||||||
|
// #define FN_VecToAngles_Post VecToAngles_Post
|
||||||
|
// #define FN_MoveToOrigin_Post MoveToOrigin_Post
|
||||||
|
// #define FN_ChangeYaw_Post ChangeYaw_Post
|
||||||
|
// #define FN_ChangePitch_Post ChangePitch_Post
|
||||||
|
// #define FN_FindEntityByString_Post FindEntityByString_Post
|
||||||
|
// #define FN_GetEntityIllum_Post GetEntityIllum_Post
|
||||||
|
// #define FN_FindEntityInSphere_Post FindEntityInSphere_Post
|
||||||
|
// #define FN_FindClientInPVS_Post FindClientInPVS_Post
|
||||||
|
// #define FN_EntitiesInPVS_Post EntitiesInPVS_Post
|
||||||
|
// #define FN_MakeVectors_Post MakeVectors_Post
|
||||||
|
// #define FN_AngleVectors_Post AngleVectors_Post
|
||||||
|
// #define FN_CreateEntity_Post CreateEntity_Post
|
||||||
|
// #define FN_RemoveEntity_Post RemoveEntity_Post
|
||||||
|
// #define FN_CreateNamedEntity_Post CreateNamedEntity_Post
|
||||||
|
// #define FN_MakeStatic_Post MakeStatic_Post
|
||||||
|
// #define FN_EntIsOnFloor_Post EntIsOnFloor_Post
|
||||||
|
// #define FN_DropToFloor_Post DropToFloor_Post
|
||||||
|
// #define FN_WalkMove_Post WalkMove_Post
|
||||||
|
// #define FN_SetOrigin_Post SetOrigin_Post
|
||||||
|
// #define FN_EmitSound_Post EmitSound_Post
|
||||||
|
// #define FN_EmitAmbientSound_Post EmitAmbientSound_Post
|
||||||
|
// #define FN_TraceLine_Post TraceLine_Post
|
||||||
|
// #define FN_TraceToss_Post TraceToss_Post
|
||||||
|
// #define FN_TraceMonsterHull_Post TraceMonsterHull_Post
|
||||||
|
// #define FN_TraceHull_Post TraceHull_Post
|
||||||
|
// #define FN_TraceModel_Post TraceModel_Post
|
||||||
|
// #define FN_TraceTexture_Post TraceTexture_Post
|
||||||
|
// #define FN_TraceSphere_Post TraceSphere_Post
|
||||||
|
// #define FN_GetAimVector_Post GetAimVector_Post
|
||||||
|
// #define FN_ServerCommand_Post ServerCommand_Post
|
||||||
|
// #define FN_ServerExecute_Post ServerExecute_Post
|
||||||
|
// #define FN_engClientCommand_Post engClientCommand_Post
|
||||||
|
// #define FN_ParticleEffect_Post ParticleEffect_Post
|
||||||
|
// #define FN_LightStyle_Post LightStyle_Post
|
||||||
|
// #define FN_DecalIndex_Post DecalIndex_Post
|
||||||
|
// #define FN_PointContents_Post PointContents_Post
|
||||||
|
// #define FN_MessageBegin_Post MessageBegin_Post
|
||||||
|
// #define FN_MessageEnd_Post MessageEnd_Post
|
||||||
|
// #define FN_WriteByte_Post WriteByte_Post
|
||||||
|
// #define FN_WriteChar_Post WriteChar_Post
|
||||||
|
// #define FN_WriteShort_Post WriteShort_Post
|
||||||
|
// #define FN_WriteLong_Post WriteLong_Post
|
||||||
|
// #define FN_WriteAngle_Post WriteAngle_Post
|
||||||
|
// #define FN_WriteCoord_Post WriteCoord_Post
|
||||||
|
// #define FN_WriteString_Post WriteString_Post
|
||||||
|
// #define FN_WriteEntity_Post WriteEntity_Post
|
||||||
|
// #define FN_CVarRegister_Post CVarRegister_Post
|
||||||
|
// #define FN_CVarGetFloat_Post CVarGetFloat_Post
|
||||||
|
// #define FN_CVarGetString_Post CVarGetString_Post
|
||||||
|
// #define FN_CVarSetFloat_Post CVarSetFloat_Post
|
||||||
|
// #define FN_CVarSetString_Post CVarSetString_Post
|
||||||
|
// #define FN_AlertMessage_Post AlertMessage_Post
|
||||||
|
// #define FN_EngineFprintf_Post EngineFprintf_Post
|
||||||
|
// #define FN_PvAllocEntPrivateData_Post PvAllocEntPrivateData_Post
|
||||||
|
// #define FN_PvEntPrivateData_Post PvEntPrivateData_Post
|
||||||
|
// #define FN_FreeEntPrivateData_Post FreeEntPrivateData_Post
|
||||||
|
// #define FN_SzFromIndex_Post SzFromIndex_Post
|
||||||
|
// #define FN_AllocString_Post AllocString_Post
|
||||||
|
// #define FN_GetVarsOfEnt_Post GetVarsOfEnt_Post
|
||||||
|
// #define FN_PEntityOfEntOffset_Post PEntityOfEntOffset_Post
|
||||||
|
// #define FN_EntOffsetOfPEntity_Post EntOffsetOfPEntity_Post
|
||||||
|
// #define FN_IndexOfEdict_Post IndexOfEdict_Post
|
||||||
|
// #define FN_PEntityOfEntIndex_Post PEntityOfEntIndex_Post
|
||||||
|
// #define FN_FindEntityByVars_Post FindEntityByVars_Post
|
||||||
|
// #define FN_GetModelPtr_Post GetModelPtr_Post
|
||||||
|
// #define FN_RegUserMsg_Post RegUserMsg_Post
|
||||||
|
// #define FN_AnimationAutomove_Post AnimationAutomove_Post
|
||||||
|
// #define FN_GetBonePosition_Post GetBonePosition_Post
|
||||||
|
// #define FN_FunctionFromName_Post FunctionFromName_Post
|
||||||
|
// #define FN_NameForFunction_Post NameForFunction_Post
|
||||||
|
// #define FN_ClientPrintf_Post ClientPrintf_Post
|
||||||
|
// #define FN_ServerPrint_Post ServerPrint_Post
|
||||||
|
// #define FN_Cmd_Args_Post Cmd_Args_Post
|
||||||
|
// #define FN_Cmd_Argv_Post Cmd_Argv_Post
|
||||||
|
// #define FN_Cmd_Argc_Post Cmd_Argc_Post
|
||||||
|
// #define FN_GetAttachment_Post GetAttachment_Post
|
||||||
|
// #define FN_CRC32_Init_Post CRC32_Init_Post
|
||||||
|
// #define FN_CRC32_ProcessBuffer_Post CRC32_ProcessBuffer_Post
|
||||||
|
// #define FN_CRC32_ProcessByte_Post CRC32_ProcessByte_Post
|
||||||
|
// #define FN_CRC32_Final_Post CRC32_Final_Post
|
||||||
|
// #define FN_RandomLong_Post RandomLong_Post
|
||||||
|
// #define FN_RandomFloat_Post RandomFloat_Post
|
||||||
|
// #define FN_SetView_Post SetView_Post
|
||||||
|
// #define FN_Time_Post Time_Post
|
||||||
|
// #define FN_CrosshairAngle_Post CrosshairAngle_Post
|
||||||
|
// #define FN_LoadFileForMe_Post LoadFileForMe_Post
|
||||||
|
// #define FN_FreeFile_Post FreeFile_Post
|
||||||
|
// #define FN_EndSection_Post EndSection_Post
|
||||||
|
// #define FN_CompareFileTime_Post CompareFileTime_Post
|
||||||
|
// #define FN_GetGameDir_Post GetGameDir_Post
|
||||||
|
// #define FN_Cvar_RegisterVariable_Post Cvar_RegisterVariable_Post
|
||||||
|
// #define FN_FadeClientVolume_Post FadeClientVolume_Post
|
||||||
|
// #define FN_SetClientMaxspeed_Post SetClientMaxspeed_Post
|
||||||
|
// #define FN_CreateFakeClient_Post CreateFakeClient_Post
|
||||||
|
// #define FN_RunPlayerMove_Post RunPlayerMove_Post
|
||||||
|
// #define FN_NumberOfEntities_Post NumberOfEntities_Post
|
||||||
|
// #define FN_GetInfoKeyBuffer_Post GetInfoKeyBuffer_Post
|
||||||
|
// #define FN_InfoKeyValue_Post InfoKeyValue_Post
|
||||||
|
// #define FN_SetKeyValue_Post SetKeyValue_Post
|
||||||
|
// #define FN_SetClientKeyValue_Post SetClientKeyValue_Post
|
||||||
|
// #define FN_IsMapValid_Post IsMapValid_Post
|
||||||
|
// #define FN_StaticDecal_Post StaticDecal_Post
|
||||||
|
// #define FN_PrecacheGeneric_Post PrecacheGeneric_Post
|
||||||
|
// #define FN_GetPlayerUserId_Post GetPlayerUserId_Post
|
||||||
|
// #define FN_BuildSoundMsg_Post BuildSoundMsg_Post
|
||||||
|
// #define FN_IsDedicatedServer_Post IsDedicatedServer_Post
|
||||||
|
// #define FN_CVarGetPointer_Post CVarGetPointer_Post
|
||||||
|
// #define FN_GetPlayerWONId_Post GetPlayerWONId_Post
|
||||||
|
// #define FN_Info_RemoveKey_Post Info_RemoveKey_Post
|
||||||
|
// #define FN_GetPhysicsKeyValue_Post GetPhysicsKeyValue_Post
|
||||||
|
// #define FN_SetPhysicsKeyValue_Post SetPhysicsKeyValue_Post
|
||||||
|
// #define FN_GetPhysicsInfoString_Post GetPhysicsInfoString_Post
|
||||||
|
// #define FN_PrecacheEvent_Post PrecacheEvent_Post
|
||||||
|
// #define FN_PlaybackEvent_Post PlaybackEvent_Post
|
||||||
|
// #define FN_SetFatPVS_Post SetFatPVS_Post
|
||||||
|
// #define FN_SetFatPAS_Post SetFatPAS_Post
|
||||||
|
// #define FN_CheckVisibility_Post CheckVisibility_Post
|
||||||
|
// #define FN_DeltaSetField_Post DeltaSetField_Post
|
||||||
|
// #define FN_DeltaUnsetField_Post DeltaUnsetField_Post
|
||||||
|
// #define FN_DeltaAddEncoder_Post DeltaAddEncoder_Post
|
||||||
|
// #define FN_GetCurrentPlayer_Post GetCurrentPlayer_Post
|
||||||
|
// #define FN_CanSkipPlayer_Post CanSkipPlayer_Post
|
||||||
|
// #define FN_DeltaFindField_Post DeltaFindField_Post
|
||||||
|
// #define FN_DeltaSetFieldByIndex_Post DeltaSetFieldByIndex_Post
|
||||||
|
// #define FN_DeltaUnsetFieldByIndex_Post DeltaUnsetFieldByIndex_Post
|
||||||
|
// #define FN_SetGroupMask_Post SetGroupMask_Post
|
||||||
|
// #define FN_engCreateInstancedBaseline_Post engCreateInstancedBaseline_Post
|
||||||
|
// #define FN_Cvar_DirectSet_Post Cvar_DirectSet_Post
|
||||||
|
// #define FN_ForceUnmodified_Post ForceUnmodified_Post
|
||||||
|
// #define FN_GetPlayerStats_Post GetPlayerStats_Post
|
||||||
|
// #define FN_AddServerCommand_Post AddServerCommand_Post
|
||||||
|
// #define FN_Voice_GetClientListening_Post Voice_GetClientListening_Post
|
||||||
|
// #define FN_Voice_SetClientListening_Post Voice_SetClientListening_Post
|
||||||
|
// #define FN_GetPlayerAuthId_Post GetPlayerAuthId_Post
|
||||||
|
|
||||||
|
// #define FN_OnFreeEntPrivateData OnFreeEntPrivateData
|
||||||
|
// #define FN_GameShutdown GameShutdown
|
||||||
|
// #define FN_ShouldCollide ShouldCollide
|
||||||
|
|
||||||
|
// #define FN_OnFreeEntPrivateData_Post OnFreeEntPrivateData_Post
|
||||||
|
// #define FN_GameShutdown_Post GameShutdown_Post
|
||||||
|
// #define FN_ShouldCollide_Post ShouldCollide_Post
|
||||||
|
|
||||||
|
|
||||||
|
#endif // USE_METAMOD
|
||||||
|
|
||||||
|
#endif // __MODULECONFIG_H__
|
Loading…
Reference in New Issue
Block a user