Added new ENGINE stocks and natives

This commit is contained in:
David Anderson
2004-03-14 08:23:42 +00:00
parent faafdf9498
commit 5b56c27e67
6 changed files with 611 additions and 7 deletions

View File

@ -39,7 +39,7 @@ native register_message(iMsgId, szFunction[]);
/* The get/set _msg commands will utterly fail if used outside a hooked message scope.
* They should never, NEVER, EVER be used unless inside a registered message function.
* There are eight different ways of sending a message, five are ints, two are floats, and one is string.
* These are denoted by iArgType. msg_tid is the message you are hooking. argn is the number
* These are denoted by iArgType. argn is the number
* of the argument. Exceeding the bounds of 1 to get_msg_args() is a bad idea. */
/* Gets number of arguments that were passed to this message */
@ -74,6 +74,31 @@ native set_offset_short(id, offset);
/* Precaches any file. */
native precache_generic(szFile[]);
/* Precaches an event. */
native precache_event(type, Name[], {float,_}:...);
//Drops an entity to the floor (work?)
native drop_to_floor(entity)
/* Get whole buffer containing keys and their data. */
native get_info_keybuffer(id, buffer[], length);
/* Use an entity with another entity. "used" could be a hostage, "user" a player. */
native force_use(pPlayer, pEntity);
/* Get globals from server. */
native Float:get_global_float(variable);
native get_global_int(variable);
native get_global_string(variable, string[], maxlen);
native get_global_vector(variable, Float:vector[3]);
native get_global_edict(variable);
/* Set entity bounds. */
native set_size(index, Float:mins[3], Float:maxs[3]);
/* Get decal index */
native get_decal_index(const szDecalName[]);
/* Sets/gets things in an entities Entvars Struct. */
native entity_get_int(iIndex, iKey);

View File

@ -307,4 +307,49 @@ enum {
#define EF_INVLIGHT 16 /* get lighting from ceiling */
#define EF_NOINTERP 32 /* don't interpolate the next frame */
#define EF_LIGHT 64 /* rocket flare glow sprite */
#define EF_NODRAW 128 /* don't draw entity */
#define EF_NODRAW 128 /* don't draw entity */
enum {
// Edict
GL_trace_ent = 0,
// Float
GL_coop,
GL_deathmatch,
GL_force_retouch,
GL_found_secrets,
GL_frametime,
GL_serverflags,
GL_teamplay,
GL_time,
GL_trace_allsolid,
GL_trace_fraction,
GL_trace_inopen,
GL_trace_inwater,
GL_trace_plane_dist,
GL_trace_startsolid,
// Int
GL_cdAudioTrack,
GL_maxClients,
GL_maxEntities,
GL_msg_entity,
GL_trace_flags,
GL_trace_hitgroup,
// String
GL_pStringBase,
GL_mapname,
GL_startspot,
// Vector
GL_trace_endpos,
GL_trace_plane_normal,
GL_v_forward,
GL_v_right,
GL_v_up,
GL_vecLandmarkOffset,
// Void (not supported)
GL_pSaveData
}

View File

@ -11,6 +11,12 @@
#endif
#define _engine_stocks_included
//wrapper for find_ent_by_class
stock find_ent(iStart, szClassname[])
{
return find_ent_by_classname(iStart, szClassname)
}
/* Changes an integer vec to a floating vec */
stock IVecFVec(IVec[3], Float:FVec[3])