Back ported revision 3242 - Every include file now is const correct (am49281)
This commit is contained in:
@ -25,13 +25,13 @@
|
||||
native traceresult(type,{Float,Sql,Result,_}:...);
|
||||
|
||||
/* Registers a client impulse to a function. Function is passed the ID of the user. */
|
||||
native register_impulse(impulse, function[]);
|
||||
native register_impulse(impulse, const function[]);
|
||||
|
||||
/* Registers a touch action to a function by classnames. Use * to specify any classname. */
|
||||
native register_touch(Touched[], Toucher[], function[]);
|
||||
native register_touch(const Touched[], const Toucher[], const function[]);
|
||||
|
||||
/* Registers a think action to a function by classname. */
|
||||
native register_think(Classname[], function[]);
|
||||
native register_think(const Classname[], const function[]);
|
||||
|
||||
/* NOTE: In old engine versions, this was not the case. Values are now WINDOWS values.
|
||||
* You must pass with the windows offset (e.g. if 230 on windows, pass 230 no matter what)
|
||||
@ -39,7 +39,7 @@ native register_think(Classname[], function[]);
|
||||
*/
|
||||
|
||||
/* Precaches an event. */
|
||||
native precache_event(type, Name[], {Float,Sql,Result,_}:...);
|
||||
native precache_event(type, const Name[], {Float,Sql,Result,_}:...);
|
||||
|
||||
/* set/get a user's speak flags */
|
||||
native set_speak(iIndex, iSpeakFlags)
|
||||
@ -62,7 +62,7 @@ native get_global_vector(variable, Float:vector[3]);
|
||||
native get_global_edict(variable);
|
||||
|
||||
/* Set entity bounds. */
|
||||
native entity_set_size(index, Float:mins[3], Float:maxs[3]);
|
||||
native entity_set_size(index, const Float:mins[3], const Float:maxs[3]);
|
||||
|
||||
/* Get decal index */
|
||||
native get_decal_index(const szDecalName[]);
|
||||
@ -76,7 +76,7 @@ native entity_set_int(iIndex, iKey, iVal);
|
||||
native Float:entity_get_float(iIndex, iKey);
|
||||
native entity_set_float(iIndex, iKey, Float:iVal);
|
||||
native entity_get_vector(iIndex, iKey, Float:vRetVector[3]);
|
||||
native entity_set_vector(iIndex, iKey, Float:vNewVector[3]);
|
||||
native entity_set_vector(iIndex, iKey, const Float:vNewVector[3]);
|
||||
native entity_get_edict(iIndex, iKey);
|
||||
native entity_set_edict(iIndex, iKey, iNewIndex);
|
||||
native entity_get_string(iIndex, iKey, szReturn[], iRetLen);
|
||||
@ -85,17 +85,17 @@ native entity_get_byte(iIndex, iKey);
|
||||
native entity_set_byte(iIndex, iKey, iVal);
|
||||
|
||||
/* Creates an entity, will return the index of the created entity. ClassName must be valid. */
|
||||
native create_entity(szClassname[]);
|
||||
native create_entity(const szClassname[]);
|
||||
|
||||
/* Finds an entity in the world, will return 0 if nothing is found */
|
||||
native find_ent_by_class(iIndex, szClass[]);
|
||||
native find_ent_by_class(iIndex, const szClass[]);
|
||||
//optionally you can set a jghg2 type
|
||||
// 1: target, 2:targetname, 0:classname (default)
|
||||
native find_ent_by_owner(iIndex, szClass[], iOwner, iJghgType=0);
|
||||
native find_ent_by_target(iIndex, szClass[]);
|
||||
native find_ent_by_tname(iIndex, szClass[]);
|
||||
native find_ent_by_model(iIndex, szClass[], szModel[]);
|
||||
native find_ent_in_sphere(start_from_ent, Float:origin[3], Float:radius);
|
||||
native find_ent_by_owner(iIndex, const szClass[], iOwner, iJghgType=0);
|
||||
native find_ent_by_target(iIndex, const szClass[]);
|
||||
native find_ent_by_tname(iIndex, const szClass[]);
|
||||
native find_ent_by_model(iIndex, const szClass[], const szModel[]);
|
||||
native find_ent_in_sphere(start_from_ent, const Float:origin[3], Float:radius);
|
||||
|
||||
//this will CBaseEntity::Think() or something from the entity
|
||||
native call_think(entity)
|
||||
@ -104,7 +104,7 @@ native call_think(entity)
|
||||
native is_valid_ent(iIndex);
|
||||
|
||||
/* Proper origin setting, keeps updated with Half-Life engine. */
|
||||
native entity_set_origin(iIndex, Float:fNewOrigin[3]);
|
||||
native entity_set_origin(iIndex, const Float:fNewOrigin[3]);
|
||||
|
||||
/* Sets the model of an Entity. */
|
||||
native entity_set_model(iIndex, const szModel[]);
|
||||
@ -125,7 +125,7 @@ native fake_touch(entTouched, entToucher);
|
||||
native DispatchKeyValue(...);
|
||||
#endif
|
||||
|
||||
native get_keyvalue(entity, szKey[], value[], maxLength);
|
||||
native get_keyvalue(entity, const szKey[], value[], maxLength);
|
||||
|
||||
native copy_keyvalue(szClassName[],sizea,szKeyName[],sizeb,szValue[],sizec);
|
||||
|
||||
@ -134,24 +134,24 @@ native DispatchSpawn(iIndex);
|
||||
|
||||
/* Hurts/Kills players in a sphere, like an explosion, Multiplier determines damage. */
|
||||
#if !defined AMXMOD_BCOMPAT
|
||||
native radius_damage(Float:fExplodeAt[3], iDamageMultiplier, iRadiusMultiplier);
|
||||
native radius_damage(const Float:fExplodeAt[3], iDamageMultiplier, iRadiusMultiplier);
|
||||
#endif
|
||||
|
||||
/* Will return the contents of a point (inside map? in sky? outside map? etc.). */
|
||||
native point_contents(Float:fCheckAt[3]);
|
||||
native point_contents(const Float:fCheckAt[3]);
|
||||
|
||||
/* Trace a line from Start(X, Y, Z) to End(X, Y, Z), will return the point hit in vReturn[3]
|
||||
* and an entity index if an entity is hit. */
|
||||
#if !defined AMXMOD_BCOMPAT
|
||||
native trace_line(iIgnoreEnt, Float:fStart[3], Float:fEnd[3], Float:vReturn[3]);
|
||||
native trace_line(iIgnoreEnt, const Float:fStart[3], const Float:fEnd[3], Float:vReturn[3]);
|
||||
#endif
|
||||
|
||||
/* Traces a hull. */
|
||||
native trace_hull(Float:origin[3],hull,ignoredent=0,ignoremonsters=0);
|
||||
native trace_hull(const Float:origin[3],hull,ignoredent=0,ignoremonsters=0);
|
||||
|
||||
/* Traces a line, and returns the normal to the plane hit in vReturn.
|
||||
* Returns 0 if theres no normal. */
|
||||
native trace_normal(iIgnoreEnt, Float:fStart[3], Float:fEnd[3], Float:vReturn[3]);
|
||||
native trace_normal(iIgnoreEnt, const Float:fStart[3], const Float:fEnd[3], Float:vReturn[3]);
|
||||
|
||||
/* Gets the ID of a grenade. */
|
||||
native get_grenade_id(id, model[], len, grenadeid = 0);
|
||||
@ -169,7 +169,7 @@ native attach_view(iIndex, iTargetIndex);
|
||||
native set_view(iIndex, ViewType);
|
||||
|
||||
/* Direct copy of PLAYBACK_EVENT_FULL from Metamod/HLSDK. If you don't know how that works, you probably shouldn't be using it. */
|
||||
native playback_event(flags,invoker,eventindex,Float:delay,Float:origin[3],Float:angles[3],Float:fparam1,Float:fparam2,iparam1,iparam2,bparam1,bparam2);
|
||||
native playback_event(flags,invoker,eventindex,Float:delay,const Float:origin[3],const Float:angles[3],Float:fparam1,Float:fparam2,iparam1,iparam2,bparam1,bparam2);
|
||||
|
||||
/* Gets parameters sent from CmdStart.
|
||||
Note that you will receive modified values if any other plugin have
|
||||
@ -224,17 +224,17 @@ forward pfn_spawn(entid);
|
||||
* If aroundent is 0 its origin is not used, but origin in 6th parameter. Ie, do not specify 6th parameter (origin) if you specified an entity
|
||||
* in aroundent.
|
||||
*/
|
||||
native find_sphere_class(aroundent, _lookforclassname[], Float:radius, entlist[], maxents, Float:origin[3] = {0.0, 0.0, 0.0});
|
||||
native find_sphere_class(aroundent, const _lookforclassname[], Float:radius, entlist[], maxents, const Float:origin[3] = {0.0, 0.0, 0.0});
|
||||
|
||||
/* SDK function - checks if an origin is in an entity's view cone
|
||||
* Set use3d to 1 to do the calculation in 3D. Otherwise it will be in 2D.
|
||||
*/
|
||||
native is_in_viewcone(entity, Float:origin[3], use3d = 0);
|
||||
native is_in_viewcone(entity, const Float:origin[3], use3d = 0);
|
||||
|
||||
//SDK function - checks if an entity is visible to an entity
|
||||
native is_visible(entity, target);
|
||||
|
||||
//Added at twistedeuphoria's request, see funcwiki for details
|
||||
native trace_forward(Float:start[3], Float:angle[3], Float:give, ignoreEnt, &Float:hitX, &Float:hitY, &Float:shortestDistance, &Float:shortestDistLow, &Float:shortestDistHigh);
|
||||
native trace_forward(const Float:start[3], const Float:angle[3], Float:give, ignoreEnt, &Float:hitX, &Float:hitY, &Float:shortestDistance, &Float:shortestDistLow, &Float:shortestDistHigh);
|
||||
|
||||
#include <engine_stocks>
|
||||
|
Reference in New Issue
Block a user