Return array type info with FindSendPropInfo (#1548)

This commit is contained in:
Asher Baker
2021-08-01 19:44:18 +01:00
committed by GitHub
parent c6917296d3
commit 296deb95e6
3 changed files with 62 additions and 13 deletions
+4 -2
View File
@@ -428,6 +428,7 @@ native int FindSendPropOffs(const char[] cls, const char[] prop);
* for strings.
* @param local_offset Optional parameter to store the local offset, as
* FindSendPropOffs() would return.
* @param array_size Optional parameter to store array size, 0 if not an array.
* @return On success, returns an absolutely computed offset.
* If no offset is available, 0 is returned.
* If the property is not found, -1 is returned.
@@ -436,7 +437,8 @@ native int FindSendPropInfo(const char[] cls,
const char[] prop,
PropFieldType &type=view_as<PropFieldType>(0),
int &num_bits=0,
int &local_offset=0);
int &local_offset=0,
int &array_size=0);
/**
* Given an entity, finds a datamap property offset.
@@ -700,7 +702,7 @@ native int SetEntPropString(int entity, PropType type, const char[] prop, const
* @param entity Entity/edict index.
* @param type Property type.
* @param prop Property name.
* @return Size of array (in elements) or 1 if property is not an array.
* @return Size of array (in elements) or 0 if property is not an array.
* @error Invalid entity or property not found.
*/
native int GetEntPropArraySize(int entity, PropType type, const char[] prop);