Add error messages and fix documentation

This commit is contained in:
Arkshine
2015-01-31 14:45:37 +01:00
parent e0426f10b2
commit 4ceb767022
4 changed files with 64 additions and 32 deletions

View File

@ -354,17 +354,18 @@ native cs_set_c4_defusing(c4index, bool:defusing);
* Creates an entity using Counter-Strike's custom CreateNamedEntity wrapper.
*
* @note Unlike other mods CS keeps track of entities using a custom hashtable.
* This function will add entities to this hashtable, providing benefits
* over the default engine functions (used by create_entity() for example):
* This function adds entities to this hashtable, providing benefits over
* the default CreateNamedEntity (used by create_entity() for example):
* - Storing entities in a hashtable allows CS to improve classname lookup
* performance compared to functions like FindEntityByString that usually
* have to loop incrementally through all entities.
* performance compared to functions like FindEntityByString (used by
* find_ent_by_class() for example) that usually have to loop
* through all entities incrementally.
* - As CS exclusively uses the hashtable for classname lookup, entities
* created using the default engine functions will not be found by the
* game. For example "weaponbox" entities are supposed to be
* automatically cleaned up on round restart but are not considered if
* they have not been added to the hashtable.
* @note CS's faster hashtable lookup can be utilized with cs_find_ent_by_class()
* @note The faster hashtable lookup can be utilized with cs_find_ent_by_class()
*
* @param classname Entity class name
*
@ -372,14 +373,14 @@ native cs_set_c4_defusing(c4index, bool:defusing);
*/
native cs_create_entity(const classname[]);
/**
/**
* Finds an entity in the world using Counter-Strike's custom FindEntityByString
* wrapper.
*
* @note Unlike other mods CS keeps track of entities using a custom hashtable.
* This function utilizes the custom hasthable and allows for considerably
* faster classname lookup compared to the default engine functions (used
* by find_ent_by_class() for example).
* This function utilizes the hasthable and allows for considerably faster
* classname lookup compared to the default FindEntityByString (used by
* find_ent_by_class() for example).
* @note This exclusively considers entities in the hashtable, created by the
* game itself or using cs_create_entity().
*