fixed a bug where NULL_VECTOR was not allowed in TeleportEntity()
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40991
This commit is contained in:
parent
773af3ad7f
commit
3250d8a062
@ -4,9 +4,9 @@
|
||||
|
||||
List<ValveCall *> g_RegCalls;
|
||||
|
||||
inline void InitPass(ValvePassInfo &info, ValveType vtype, PassType type, unsigned int flags)
|
||||
inline void InitPass(ValvePassInfo &info, ValveType vtype, PassType type, unsigned int flags, unsigned int decflags=0)
|
||||
{
|
||||
info.decflags = 0;
|
||||
info.decflags = decflags;
|
||||
info.encflags = 0;
|
||||
info.flags = flags;
|
||||
info.type = type;
|
||||
@ -228,9 +228,9 @@ static cell_t TeleportPlayer(IPluginContext *pContext, const cell_t *params)
|
||||
if (!pCall)
|
||||
{
|
||||
ValvePassInfo pass[3];
|
||||
InitPass(pass[0], Valve_Vector, PassType_Basic, PASSFLAG_BYVAL);
|
||||
InitPass(pass[1], Valve_QAngle, PassType_Basic, PASSFLAG_BYVAL);
|
||||
InitPass(pass[2], Valve_Vector, PassType_Basic, PASSFLAG_BYVAL);
|
||||
InitPass(pass[0], Valve_Vector, PassType_Basic, PASSFLAG_BYVAL, VDECODE_FLAG_ALLOWNULL);
|
||||
InitPass(pass[1], Valve_QAngle, PassType_Basic, PASSFLAG_BYVAL, VDECODE_FLAG_ALLOWNULL);
|
||||
InitPass(pass[2], Valve_Vector, PassType_Basic, PASSFLAG_BYVAL, VDECODE_FLAG_ALLOWNULL);
|
||||
if (!CreateBaseCall("Teleport", ValveCall_Entity, NULL, pass, 3, &pCall))
|
||||
{
|
||||
return pContext->ThrowNativeError("\"Teleport\" not supported by this mod");
|
||||
|
Loading…
Reference in New Issue
Block a user