Added support for logical (non-networked) entities using entity references - See http://wiki.alliedmods.net/Entity_References_%28SourceMod%29 (bug 2459, r=dvander)

This commit is contained in:
Matt Woodrow
2009-07-24 12:34:31 +12:00
parent 7ec656db09
commit 3e36382b58
27 changed files with 863 additions and 480 deletions
+27
View File
@@ -56,6 +56,8 @@ enum DialogType
DialogType_AskConnect /**< ask the client to connect to a specified IP */
};
#define INVALID_ENT_REFERENCE 0xFFFFFFFF
/**
* Logs a generic message to the HL2 logs.
*
@@ -544,3 +546,28 @@ stock DisplayAskConnectBox(client, Float:time, const String:ip[])
CreateDialog(client, Kv, DialogType_AskConnect);
CloseHandle(Kv);
}
/**
* Converts an entity index into a serial encoded entity reference.
*
* @param entity Entity index.
* @return Entity reference.
*/
native EntIndexToEntRef(entity);
/**
* Retrieves the entity index from a reference.
*
* @param ref Entity reference.
* @return Entity index.
*/
native EntRefToEntIndex(ref);
/**
* Converts a reference into a backwards compatible version.
*
* @param ref Entity reference.
* @return Bcompat reference.
*/
native MakeCompatEntRef(ref);