From 4a43ac1bddac7b413b4300b978f0eb353f7242c7 Mon Sep 17 00:00:00 2001 From: Impact Date: Fri, 21 May 2021 01:07:11 +0200 Subject: [PATCH] entities.inc: Clarify EntIndexToEntRef / EntRefToEntIndex errors (#1370) --- plugins/include/halflife.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/include/halflife.inc b/plugins/include/halflife.inc index 60186ed2..c95580d7 100644 --- a/plugins/include/halflife.inc +++ b/plugins/include/halflife.inc @@ -649,7 +649,8 @@ stock void DisplayAskConnectBox(int client, float time, const char[] ip, const c * Converts an entity index into a serial encoded entity reference. * * @param entity Entity index. - * @return Entity reference. + * @return Entity reference or -1 on invalid entity. + * @error Entity index >= GetMaxEntities() or < 0 */ native int EntIndexToEntRef(int entity); @@ -657,7 +658,7 @@ native int EntIndexToEntRef(int entity); * Retrieves the entity index from a reference. * * @param ref Entity reference. - * @return Entity index. + * @return Entity index or -1 on invalid reference. */ native int EntRefToEntIndex(int ref);