An optional array parameter (LIKE TEH TASKS ONE) can be now passed to cvar query handlers

This commit is contained in:
Pavol Marko
2005-09-06 10:12:02 +00:00
parent 2f27b7da8d
commit 6bebf37f1a
4 changed files with 133 additions and 83 deletions

View File

@ -1031,8 +1031,18 @@ void C_CvarValue(const edict_t *pEdict, const char *value)
if (pPlayer->cvarQueryQueue.front()->querying)
{
executeForwards(pQuery->resultFwd, ENTINDEX(pEdict), pQuery->cvarName.c_str(), value);
if (pQuery->paramLen)
{
cell arr = prepareCellArray(pQuery->params, pQuery->paramLen);
executeForwards(pQuery->resultFwd, ENTINDEX(pEdict), pQuery->cvarName.c_str(), value, arr);
}
else
executeForwards(pQuery->resultFwd, ENTINDEX(pEdict), pQuery->cvarName.c_str(), value);
unregisterSPForward(pQuery->resultFwd);
if (pQuery->params)
delete [] pQuery->params;
delete pQuery;
pPlayer->cvarQueryQueue.pop();
RETURN_META(MRES_HANDLED);