Exposed SDKCall_Engine call type to use CVEngineServer methods (#1648)
* Update vdecoder.h * Update vcaller.cpp * Update sdktools.inc
This commit is contained in:
parent
5f7b22d2a4
commit
e5ebd65176
@ -336,15 +336,25 @@ static cell_t SDKCall(IPluginContext *pContext, const cell_t *params)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ValveCall_Server:
|
case ValveCall_Server:
|
||||||
{
|
{
|
||||||
if (iserver == NULL)
|
if (iserver == NULL)
|
||||||
{
|
{
|
||||||
vc->stk_put(ptr);
|
vc->stk_put(ptr);
|
||||||
return pContext->ThrowNativeError("Server unsupported or not available; file a bug report");
|
return pContext->ThrowNativeError("Server unsupported or not available; file a bug report");
|
||||||
}
|
}
|
||||||
*(void **)ptr = iserver;
|
*(void **)ptr = iserver;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case ValveCall_Engine:
|
||||||
|
{
|
||||||
|
if (engine == NULL)
|
||||||
|
{
|
||||||
|
vc->stk_put(ptr);
|
||||||
|
return pContext->ThrowNativeError("Engine unsupported or not available; file a bug report");
|
||||||
|
}
|
||||||
|
*(void **)ptr = engine;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case ValveCall_GameRules:
|
case ValveCall_GameRules:
|
||||||
{
|
{
|
||||||
void *pGameRules = GameRules();
|
void *pGameRules = GameRules();
|
||||||
|
@ -83,6 +83,7 @@ enum ValveCallType
|
|||||||
ValveCall_EntityList, /**< Thiscall (CGlobalEntityList implicit first paramater) */
|
ValveCall_EntityList, /**< Thiscall (CGlobalEntityList implicit first paramater) */
|
||||||
ValveCall_Raw, /**< Thiscall (address explicit first parameter) */
|
ValveCall_Raw, /**< Thiscall (address explicit first parameter) */
|
||||||
ValveCall_Server, /**< Thiscall (CBaseServer implicit first parameter) */
|
ValveCall_Server, /**< Thiscall (CBaseServer implicit first parameter) */
|
||||||
|
ValveCall_Engine, /**< Thiscall (CVEngineServer implicit first parameter) */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -61,7 +61,8 @@ enum SDKCallType
|
|||||||
SDKCall_GameRules, /**< CGameRules call */
|
SDKCall_GameRules, /**< CGameRules call */
|
||||||
SDKCall_EntityList, /**< CGlobalEntityList call */
|
SDKCall_EntityList, /**< CGlobalEntityList call */
|
||||||
SDKCall_Raw, /**< |this| pointer with an arbitrary address */
|
SDKCall_Raw, /**< |this| pointer with an arbitrary address */
|
||||||
SDKCall_Server /**< CBaseServer call */
|
SDKCall_Server, /**< CBaseServer call */
|
||||||
|
SDKCall_Engine /**< CVEngineServer call */
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SDKLibrary
|
enum SDKLibrary
|
||||||
|
Loading…
Reference in New Issue
Block a user