Add Call_PushNullVector and Call_PushNullString
Be able to push NULL_[VECTOR|STRING] to a forward or direct function call. The callee can check the parameter using the IsNullVector/IsNullString natives.
This commit is contained in:
+18
-1
@@ -50,7 +50,7 @@
|
||||
using namespace SourcePawn;
|
||||
|
||||
#define SMINTERFACE_FORWARDMANAGER_NAME "IForwardManager"
|
||||
#define SMINTERFACE_FORWARDMANAGER_VERSION 3
|
||||
#define SMINTERFACE_FORWARDMANAGER_VERSION 4
|
||||
|
||||
/*
|
||||
* There is some very important documentation at the bottom of this file.
|
||||
@@ -118,6 +118,7 @@ namespace SourceMod
|
||||
cell_t val;
|
||||
ByrefInfo byref;
|
||||
ParamType pushedas;
|
||||
bool isnull;
|
||||
};
|
||||
|
||||
class IForwardFilter
|
||||
@@ -183,6 +184,22 @@ namespace SourceMod
|
||||
* @return Error code, if any.
|
||||
*/
|
||||
virtual int PushArray(cell_t *inarray, unsigned int cells, int flags=0) =0;
|
||||
|
||||
/**
|
||||
* @brief Pushes the NULL_STRING onto the current call. This will always push the
|
||||
* correct reference to each function in the forward.
|
||||
*
|
||||
* @return Error code, if any.
|
||||
*/
|
||||
virtual int PushNullString() =0;
|
||||
|
||||
/**
|
||||
* @brief Pushes the NULL_VECTOR onto the current call. This will always push the
|
||||
* correct reference to each function in the forward.
|
||||
*
|
||||
* @return Error code, if any.
|
||||
*/
|
||||
virtual int PushNullVector() =0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user