2014-08-04 16:12:15 +04:00
|
|
|
// vim: set ts=4 sw=4 tw=99 noet:
|
|
|
|
//
|
|
|
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
|
|
|
// Copyright (C) The AMX Mod X Development Team.
|
|
|
|
//
|
|
|
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
|
|
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
|
|
|
// https://alliedmods.net/amxmodx-license
|
|
|
|
|
|
|
|
//
|
|
|
|
// Engine Constants
|
|
|
|
//
|
2004-02-15 05:29:51 +03:00
|
|
|
|
2004-02-21 23:30:04 +03:00
|
|
|
#if defined _engine_const_included
|
2019-02-11 14:15:45 +03:00
|
|
|
#endinput
|
2004-02-21 23:30:04 +03:00
|
|
|
#endif
|
|
|
|
#define _engine_const_included
|
|
|
|
|
2006-05-17 01:42:06 +04:00
|
|
|
#include <hlsdk_const>
|
|
|
|
|
2015-05-10 15:37:36 +03:00
|
|
|
/**
|
|
|
|
* Flags for the [set|get]_speak() natives.
|
|
|
|
*
|
|
|
|
* @note These do not correspond to any HLSDK constants and are only relevant to
|
|
|
|
* the custom functionality provided by the engine module.
|
|
|
|
*/
|
|
|
|
#define SPEAK_NORMAL 0 // Normal behavior, client follows alltalk rules
|
|
|
|
#define SPEAK_MUTED 1 // Client can not talk
|
|
|
|
#define SPEAK_ALL 2 // Client can talk to every other client
|
|
|
|
#define SPEAK_LISTENALL 4 // Client can listen to every other client
|
2004-02-15 05:29:51 +03:00
|
|
|
|
2015-05-10 15:37:36 +03:00
|
|
|
/**
|
|
|
|
* View types for the set_view() native.
|
|
|
|
*
|
|
|
|
* @note These do not correspond to any HLSDK constants and are only relevant to
|
|
|
|
* the custom functionality provided by the engine module.
|
|
|
|
*/
|
|
|
|
#define CAMERA_NONE 0
|
|
|
|
#define CAMERA_3RDPERSON 1
|
|
|
|
#define CAMERA_UPLEFT 2
|
|
|
|
#define CAMERA_TOPDOWN 3
|
2004-02-15 05:29:51 +03:00
|
|
|
|
2015-05-10 15:37:36 +03:00
|
|
|
/**
|
|
|
|
* @section Entvar constants used with entity_[get|set]_* functions.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Integers, use with entity_[get|set]_int()
|
|
|
|
*/
|
2004-02-15 05:29:51 +03:00
|
|
|
enum {
|
|
|
|
EV_INT_gamestate = 0,
|
|
|
|
EV_INT_oldbuttons,
|
|
|
|
EV_INT_groupinfo,
|
|
|
|
EV_INT_iuser1,
|
|
|
|
EV_INT_iuser2,
|
|
|
|
EV_INT_iuser3,
|
|
|
|
EV_INT_iuser4,
|
|
|
|
EV_INT_weaponanim,
|
|
|
|
EV_INT_pushmsec,
|
|
|
|
EV_INT_bInDuck,
|
|
|
|
EV_INT_flTimeStepSound,
|
|
|
|
EV_INT_flSwimTime,
|
|
|
|
EV_INT_flDuckTime,
|
|
|
|
EV_INT_iStepLeft,
|
|
|
|
EV_INT_movetype,
|
|
|
|
EV_INT_solid,
|
2004-02-21 23:30:04 +03:00
|
|
|
EV_INT_skin,
|
2004-02-15 05:29:51 +03:00
|
|
|
EV_INT_body,
|
|
|
|
EV_INT_effects,
|
|
|
|
EV_INT_light_level,
|
|
|
|
EV_INT_sequence,
|
|
|
|
EV_INT_gaitsequence,
|
|
|
|
EV_INT_modelindex,
|
|
|
|
EV_INT_playerclass,
|
|
|
|
EV_INT_waterlevel,
|
|
|
|
EV_INT_watertype,
|
|
|
|
EV_INT_spawnflags,
|
|
|
|
EV_INT_flags,
|
|
|
|
EV_INT_colormap,
|
|
|
|
EV_INT_team,
|
|
|
|
EV_INT_fixangle,
|
|
|
|
EV_INT_weapons,
|
|
|
|
EV_INT_rendermode,
|
|
|
|
EV_INT_renderfx,
|
|
|
|
EV_INT_button,
|
|
|
|
EV_INT_impulse,
|
|
|
|
EV_INT_deadflag,
|
2007-08-10 08:52:12 +04:00
|
|
|
};
|
2004-02-15 05:29:51 +03:00
|
|
|
|
2015-05-10 15:37:36 +03:00
|
|
|
/**
|
|
|
|
* Floats, use with entity_[get|set]_float()
|
|
|
|
*/
|
2004-02-15 05:29:51 +03:00
|
|
|
enum {
|
|
|
|
EV_FL_impacttime = 0,
|
|
|
|
EV_FL_starttime,
|
|
|
|
EV_FL_idealpitch,
|
|
|
|
EV_FL_pitch_speed,
|
|
|
|
EV_FL_ideal_yaw,
|
|
|
|
EV_FL_yaw_speed,
|
|
|
|
EV_FL_ltime,
|
|
|
|
EV_FL_nextthink,
|
|
|
|
EV_FL_gravity,
|
|
|
|
EV_FL_friction,
|
|
|
|
EV_FL_frame,
|
|
|
|
EV_FL_animtime,
|
|
|
|
EV_FL_framerate,
|
|
|
|
EV_FL_health,
|
|
|
|
EV_FL_frags,
|
|
|
|
EV_FL_takedamage,
|
|
|
|
EV_FL_max_health,
|
|
|
|
EV_FL_teleport_time,
|
|
|
|
EV_FL_armortype,
|
|
|
|
EV_FL_armorvalue,
|
|
|
|
EV_FL_dmg_take,
|
|
|
|
EV_FL_dmg_save,
|
|
|
|
EV_FL_dmg,
|
|
|
|
EV_FL_dmgtime,
|
|
|
|
EV_FL_speed,
|
|
|
|
EV_FL_air_finished,
|
|
|
|
EV_FL_pain_finished,
|
|
|
|
EV_FL_radsuit_finished,
|
|
|
|
EV_FL_scale,
|
|
|
|
EV_FL_renderamt,
|
|
|
|
EV_FL_maxspeed,
|
|
|
|
EV_FL_fov,
|
|
|
|
EV_FL_flFallVelocity,
|
|
|
|
EV_FL_fuser1,
|
|
|
|
EV_FL_fuser2,
|
|
|
|
EV_FL_fuser3,
|
|
|
|
EV_FL_fuser4,
|
2007-08-10 08:52:12 +04:00
|
|
|
};
|
2004-02-15 05:29:51 +03:00
|
|
|
|
2015-05-10 15:37:36 +03:00
|
|
|
/**
|
|
|
|
* Vectors, use with entity_[get|set]_vector()
|
|
|
|
*/
|
2004-02-15 05:29:51 +03:00
|
|
|
enum {
|
|
|
|
EV_VEC_origin = 0,
|
|
|
|
EV_VEC_oldorigin,
|
|
|
|
EV_VEC_velocity,
|
|
|
|
EV_VEC_basevelocity,
|
|
|
|
EV_VEC_clbasevelocity,
|
|
|
|
EV_VEC_movedir,
|
|
|
|
EV_VEC_angles,
|
|
|
|
EV_VEC_avelocity,
|
|
|
|
EV_VEC_punchangle,
|
|
|
|
EV_VEC_v_angle,
|
|
|
|
EV_VEC_endpos,
|
|
|
|
EV_VEC_startpos,
|
|
|
|
EV_VEC_absmin,
|
|
|
|
EV_VEC_absmax,
|
|
|
|
EV_VEC_mins,
|
|
|
|
EV_VEC_maxs,
|
|
|
|
EV_VEC_size,
|
|
|
|
EV_VEC_rendercolor,
|
|
|
|
EV_VEC_view_ofs,
|
|
|
|
EV_VEC_vuser1,
|
|
|
|
EV_VEC_vuser2,
|
|
|
|
EV_VEC_vuser3,
|
|
|
|
EV_VEC_vuser4,
|
2007-08-10 08:52:12 +04:00
|
|
|
};
|
2004-02-15 05:29:51 +03:00
|
|
|
|
2015-05-10 15:37:36 +03:00
|
|
|
/**
|
|
|
|
* Edicts, use with entity_[get|set]_edict()
|
|
|
|
*/
|
2004-02-15 05:29:51 +03:00
|
|
|
enum {
|
|
|
|
EV_ENT_chain = 0,
|
|
|
|
EV_ENT_dmg_inflictor,
|
|
|
|
EV_ENT_enemy,
|
|
|
|
EV_ENT_aiment,
|
|
|
|
EV_ENT_owner,
|
|
|
|
EV_ENT_groundentity,
|
|
|
|
EV_ENT_pContainingEntity,
|
|
|
|
EV_ENT_euser1,
|
|
|
|
EV_ENT_euser2,
|
|
|
|
EV_ENT_euser3,
|
|
|
|
EV_ENT_euser4,
|
2007-08-10 08:52:12 +04:00
|
|
|
};
|
2004-02-15 05:29:51 +03:00
|
|
|
|
2015-05-10 15:37:36 +03:00
|
|
|
/**
|
|
|
|
* Strings, use with entity_[get|set]_string()
|
|
|
|
*/
|
2004-02-15 05:29:51 +03:00
|
|
|
enum {
|
|
|
|
EV_SZ_classname = 0,
|
|
|
|
EV_SZ_globalname,
|
|
|
|
EV_SZ_model,
|
|
|
|
EV_SZ_target,
|
|
|
|
EV_SZ_targetname,
|
|
|
|
EV_SZ_netname,
|
|
|
|
EV_SZ_message,
|
|
|
|
EV_SZ_noise,
|
|
|
|
EV_SZ_noise1,
|
|
|
|
EV_SZ_noise2,
|
|
|
|
EV_SZ_noise3,
|
|
|
|
EV_SZ_viewmodel,
|
|
|
|
EV_SZ_weaponmodel,
|
2007-08-10 08:52:12 +04:00
|
|
|
};
|
2004-02-15 05:29:51 +03:00
|
|
|
|
2015-05-10 15:37:36 +03:00
|
|
|
/**
|
|
|
|
* Bytearrays, use with entity_[get|set]_byte()
|
|
|
|
*/
|
2004-02-15 05:29:51 +03:00
|
|
|
enum {
|
|
|
|
EV_BYTE_controller1 = 0,
|
|
|
|
EV_BYTE_controller2,
|
|
|
|
EV_BYTE_controller3,
|
|
|
|
EV_BYTE_controller4,
|
|
|
|
EV_BYTE_blending1,
|
|
|
|
EV_BYTE_blending2,
|
2007-08-10 08:52:12 +04:00
|
|
|
};
|
2004-02-15 05:29:51 +03:00
|
|
|
|
2015-05-10 15:37:36 +03:00
|
|
|
/**
|
|
|
|
* @endsection
|
|
|
|
*/
|
|
|
|
|
2004-03-24 08:01:33 +03:00
|
|
|
#if defined _jghg_enums
|
2019-02-11 14:15:45 +03:00
|
|
|
#endinput
|
2004-03-24 08:01:33 +03:00
|
|
|
#endif
|
|
|
|
#define _jghg_enums
|
2019-02-11 14:15:45 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Used by get_global_[edict/float/int/string/vector]()
|
|
|
|
*/
|
2004-03-14 11:23:42 +03:00
|
|
|
enum {
|
|
|
|
|
2019-02-11 14:15:45 +03:00
|
|
|
// Edict
|
|
|
|
GL_trace_ent = 0,
|
2004-03-14 11:23:42 +03:00
|
|
|
|
2019-02-11 14:15:45 +03:00
|
|
|
// 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,
|
2004-03-14 11:23:42 +03:00
|
|
|
|
2019-02-11 14:15:45 +03:00
|
|
|
// Int
|
|
|
|
GL_cdAudioTrack,
|
|
|
|
GL_maxClients,
|
|
|
|
GL_maxEntities,
|
|
|
|
GL_msg_entity,
|
|
|
|
GL_trace_flags,
|
|
|
|
GL_trace_hitgroup,
|
2004-03-14 11:23:42 +03:00
|
|
|
|
2019-02-11 14:15:45 +03:00
|
|
|
// String
|
|
|
|
GL_pStringBase,
|
|
|
|
GL_mapname,
|
|
|
|
GL_startspot,
|
2004-03-14 11:23:42 +03:00
|
|
|
|
2019-02-11 14:15:45 +03:00
|
|
|
// Vector
|
|
|
|
GL_trace_endpos,
|
|
|
|
GL_trace_plane_normal,
|
|
|
|
GL_v_forward,
|
|
|
|
GL_v_right,
|
|
|
|
GL_v_up,
|
|
|
|
GL_vecLandmarkOffset,
|
|
|
|
|
|
|
|
// Void (not supported)
|
|
|
|
GL_pSaveData
|
2007-08-10 08:52:12 +04:00
|
|
|
};
|
2004-05-26 11:59:33 +04:00
|
|
|
|
2019-02-11 14:15:45 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Used by [get/set]_usercmd()
|
|
|
|
*/
|
2004-05-26 11:59:33 +04:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
usercmd_float_start,
|
2015-05-10 15:37:36 +03:00
|
|
|
usercmd_forwardmove, // Float
|
|
|
|
usercmd_sidemove, // Float
|
|
|
|
usercmd_upmove, // Float
|
2004-05-26 11:59:33 +04:00
|
|
|
usercmd_float_end,
|
|
|
|
usercmd_int_start,
|
2015-05-10 15:37:36 +03:00
|
|
|
usercmd_lerp_msec, // short
|
|
|
|
usercmd_msec, // byte
|
|
|
|
usercmd_lightlevel, // byte
|
|
|
|
usercmd_buttons, // unsigned short
|
|
|
|
usercmd_impulse, // byte
|
|
|
|
usercmd_weaponselect, // byte
|
|
|
|
usercmd_impact_index, // int
|
2004-05-26 11:59:33 +04:00
|
|
|
usercmd_int_end,
|
|
|
|
usercmd_vec_start,
|
2015-05-10 15:37:36 +03:00
|
|
|
usercmd_viewangles, // Vector
|
|
|
|
usercmd_impact_position, // vec
|
2004-05-26 11:59:33 +04:00
|
|
|
usercmd_vec_end
|
2004-06-26 08:48:32 +04:00
|
|
|
};
|
|
|
|
|
2019-02-11 14:15:45 +03:00
|
|
|
/**
|
|
|
|
* Used by the traceresult()
|
|
|
|
*/
|
2004-06-26 08:48:32 +04:00
|
|
|
enum
|
|
|
|
{
|
2015-05-10 15:37:36 +03:00
|
|
|
TR_AllSolid, // (int) if true, plane is not valid
|
|
|
|
TR_StartSolid, // (int) if true, the initial point was in a solid area
|
|
|
|
TR_InOpen, // (int)
|
|
|
|
TR_InWater, // (int)
|
|
|
|
TR_Fraction, // (float) time completed, 1.0 = didn't hit anything
|
|
|
|
TR_EndPos, // (vector) final position
|
|
|
|
TR_PlaneDist, // (float)
|
|
|
|
TR_PlaneNormal, // (vector) surface normal at impact
|
|
|
|
TR_Hit, // (entity) entity the surface is on
|
|
|
|
TR_Hitgroup // (int) 0 == generic, non zero is specific body part
|
2004-06-26 08:48:32 +04:00
|
|
|
};
|
2004-09-05 22:13:52 +04:00
|
|
|
|