djcev.com

//

Git Repos / fte_dogmode / qc / defs_const.qc

Last update to this file was on 2024-04-05 at 14:18.

Show defs_const.qc

//==============================================================================
// Global Program Constants
//==============================================================================

//======================================================================
// constants
//======================================================================

// inspired by Copper
const string version = "\n\"Dog\" mode for FTE\nversion 0.1b";

const float FALSE = 0; //
const float TRUE = 1;
const float NEGATIVE = -1;

const float FL_FLY = 1; // standard id1 .flags follow
const float FL_SWIM = 2;
const float FL_CLIENT = 8; // set for all client edicts
const float FL_INWATER = 16; // for enter / leave water splash
const float FL_MONSTER = 32;
const float FL_GODMODE = 64; // player cheat
const float FL_NOTARGET = 128; // player cheat
const float FL_ITEM = 256; // extra wide size for bonus items
const float FL_ONGROUND = 512; // standing on something
const float FL_PARTIALGROUND = 1024; // not all corners are valid
const float FL_WATERJUMP = 2048; // player jumping out of water
const float FL_JUMPRELEASED = 4096; // for jump debouncing
const float FL_NOSELECT = 8192; // ignored by entity selector
const float FL_NOCENTERPRINT = 65536; // don't centerprint entity's message
// field when its targets are used

const float MOVETYPE_NONE = 0; // .movetype values; never moves
// const float MOVETYPE_ANGLENOCLIP = 1;
// const float MOVETYPE_ANGLECLIP = 2;
const float MOVETYPE_WALK = 3; // players only
const float MOVETYPE_STEP = 4; // discrete, not real time unless fall
const float MOVETYPE_FLY = 5;
const float MOVETYPE_TOSS = 6; // gravity
const float MOVETYPE_PUSH = 7; // no clip to world, push and crush
const float MOVETYPE_NOCLIP = 8;
const float MOVETYPE_FLYMISSILE = 9; // fly with extra size against monsters
const float MOVETYPE_BOUNCE = 10; // standard bounce
const float MOVETYPE_BOUNCEMISSILE = 11;// bounce with extra size

const float SOLID_NOT = 0; // .solid values; no interaction
const float SOLID_TRIGGER = 1; // touch on edge, but not blocking
const float SOLID_BBOX = 2; // touch on edge, block
const float SOLID_SLIDEBOX = 3; // touch on edge, but not an onground
const float SOLID_BSP = 4; // bsp clip, touch on edge, block

// the following block from fteextensions.qc was originally ifdef CSQC;
// I've removed that check because these are just constants -- CEV
const float STAT_HEALTH = 0; // Player's health.
// This is the modelindex of the current viewmodel (renamed from the
// original name 'STAT_WEAPON' due to confusions).
const float STAT_WEAPONMODELI = 2;
const float STAT_AMMO = 3; // player.currentammo
const float STAT_ARMOR = 4;
const float STAT_WEAPONFRAME = 5;
const float STAT_SHELLS = 6;
const float STAT_NAILS = 7;
const float STAT_ROCKETS = 8;
const float STAT_CELLS = 9;
const float STAT_ACTIVEWEAPON = 10; // player.weapon
const float STAT_TOTALSECRETS = 11;
const float STAT_TOTALMONSTERS = 12; // required by Hipnotic code
const float STAT_FOUNDSECRETS = 13;
const float STAT_KILLEDMONSTERS = 14;
// self.items | (self.items2<<23).
// In order to decode this stat properly, you need to use
// getstatbits(STAT_ITEMS,0,23) to read self.items, and
// getstatbits(STAT_ITEMS,23,11) to read self.items2 or
// getstatbits(STAT_ITEMS,28,4) to read the visible part
// of serverflags, whichever is applicable.
const float STAT_ITEMS = 15;
const float STAT_VIEWHEIGHT = 16; // player.view_ofs_z
// This stat contains the number of the entity in the server's .view2 field.
const float STAT_VIEW2 = 20;
// Scales fov and sensitiity. Part of DP_VIEWZOOM.
const float STAT_VIEWZOOM = 21;
const float STAT_IDEALPITCH = 25;
const float STAT_PUNCHANGLE_X = 26;
const float STAT_PUNCHANGLE_Y = 27;
const float STAT_PUNCHANGLE_Z = 28;
// Custom user stats start here (lower values are reserved for engine use).
// const float STAT_USER = 32;

const float IT_AXE = 4096; // .items flag values
const float IT_SHOTGUN = 1; // this is pretty much maxed out at
const float IT_SUPER_SHOTGUN = 2; // 23 values already -- CEV
const float IT_NAILGUN = 4;
const float IT_SUPER_NAILGUN = 8;
const float IT_GRENADE_LAUNCHER = 16;
const float IT_ROCKET_LAUNCHER = 32;
const float IT_LIGHTNING = 64;
const float IT_EXTRA_WEAPON = 128;
const float IT_SHELLS = 256;
const float IT_NAILS = 512;
const float IT_ROCKETS = 1024;
const float IT_CELLS = 2048;
const float IT_ARMOR1 = 8192;
const float IT_ARMOR2 = 16384;
const float IT_ARMOR3 = 32768;
const float IT_SUPERHEALTH = 65536;
const float IT_KEY1 = 131072;
const float IT_KEY2 = 262144;
const float IT_INVISIBILITY = 524288;
const float IT_INVULNERABILITY = 1048576;
const float IT_SUIT = 2097152;
const float IT_QUAD = 4194304;

const float SERVERFLAGS_RUNE1 = 32; //
const float SERVERFLAGS_RUNE2 = 64; //
const float SERVERFLAGS_RUNE3 = 128; //
const float SERVERFLAGS_RUNE4 = 256; //

const float CONTENT_EMPTY = -1; // values returned by pointcontents ()
const float CONTENT_SOLID = -2;
const float CONTENT_WATER = -3;
const float CONTENT_SLIME = -4;
const float CONTENT_LAVA = -5;
const float CONTENT_SKY = -6;

const vector VEC_ORIGIN = '0 0 0'; // origin & null vector value

const vector VEC_HULL_MIN = '-16 -16 -24';
const vector VEC_HULL_MAX = '16 16 32'; // Quake standard HULL1
const vector VEC_HULL_SIZE = '32 32 56';
const vector VEC_HULL2_MIN = '-32 -32 -24';
const vector VEC_HULL2_MAX = '32 32 64';// Quake standard HULL2
const vector VEC_HULL2_SIZE = '64 64 88';

// common protocol bytes
const float SVC_UPDATESTAT = 3; // required by Hipnotic code
const float SVC_SETVIEWPORT = 5; // Camera Hip. Drake devkit dumptruck_ds
const float SVC_SETVIEWANGLES = 10; // Camera Hip. Drake devkit dumptruck_ds
const float SVC_TEMPENTITY = 23;
const float SVC_KILLEDMONSTER = 27;
const float SVC_FOUNDSECRET = 28;
const float SVC_INTERMISSION = 30;
const float SVC_FINALE = 31;
const float SVC_CDTRACK = 32;
const float SVC_SELLSCREEN = 33;
const float SVC_CUTSCENE = 34; // Hipnotic Drake devkit -- dumptruck_ds

const float TE_SPIKE = 0; // temporary entity protocol bytes
const float TE_SUPERSPIKE = 1;
const float TE_GUNSHOT = 2;
const float TE_EXPLOSION = 3;
const float TE_TAREXPLOSION = 4;
const float TE_LIGHTNING1 = 5;
const float TE_LIGHTNING2 = 6;
const float TE_WIZSPIKE = 7;
const float TE_KNIGHTSPIKE = 8;
const float TE_LIGHTNING3 = 9;
const float TE_LAVASPLASH = 10;
const float TE_TELEPORT = 11;
const float TE_EXPLOSION2 = 12; // from doe -- dumptruck_ds

const float CHAN_AUTO = 0; // sound channels; 0 never overrides
const float CHAN_WEAPON = 1; // 1-7 always override a sound on that
const float CHAN_VOICE = 2; // channel
const float CHAN_ITEM = 3;
const float CHAN_BODY = 4;
const float CHAN_FEET = 5; // dedicated channel for steps -- CEV

const float ATTN_NONE = 0; // sound attenuation; no attenuation
const float ATTN_NORM = 1; // standard attenuation
const float ATTN_IDLE = 2; // extra attenuation
const float ATTN_FEET = 2;
const float ATTN_STATIC = 3; // even more attn. (good for torches)

const float EF_BRIGHTFIELD = 1; // entity .effects values
const float EF_MUZZLEFLASH = 2;
const float EF_BRIGHTLIGHT = 4;
const float EF_DIMLIGHT = 8;

const float MSG_BROADCAST = 0; // net message dest.; unreliable to all
const float MSG_ONE = 1; // reliable to one (msg_entity)
const float MSG_ALL = 2; // reliable to all
const float MSG_INIT = 3; // write to the init string
// The byte(s) will be written into the multicast buffer for more
// selective sending. Messages sent this way will never be split across
// packets, and using this for csqc-only messages will not break protocol
// translation.
const float MSG_MULTICAST = 4;
const float MSG_ENTITY = 5; // used only in 'SendEntity' functions

const float TRIGGER_CENTERPRINTALL = 1048576; // program-wide spawnflags
const float SPAWN_SILENTLY = 2097152;

const float MOVE_NORMAL = 0; // trace flags;
const float MOVE_NOMONSTERS = 1; // ignore all non-solid_bsp entities
const float MOVE_MISSILE = 2; // bbox of +/- 15 against FL_MONSTER
const float MOVE_HITMODEL = 4; // impact mesh instead of bbox
const float MOVE_TRIGGERS = 16; // impact only triggers
const float MOVE_EVERYTHING = 32; // solids & triggers & non-solid ents

const float DEAD_NO = 0; // .deadflag values
const float DEAD_DYING = 1;
const float DEAD_DEAD = 2;
const float DEAD_RESPAWNABLE = 3;

const float DAMAGE_NO = 0; // .takedamage values
const float DAMAGE_YES = 1;
const float DAMAGE_AIM = 2;

const float EV_VOID = 0; // variable types
const float EV_STRING = 1;
const float EV_FLOAT = 2;
const float EV_VECTOR = 3;
const float EV_ENTITY = 4;
const float EV_FIELD = 5;
const float EV_FUNCTION = 6;
const float EV_POINTER = 7;
const float EV_INTEGER = 8;

#ifdef CSQC
//----------------------------------------------------------------------
// Valid as a return value from the predraw function. Returning this will
// simply move on to the next entity without the autoadd behaviour, so can
// be used for particle/invisible/special entites, or entities that were
// explicitly drawn with addentity.
//----------------------------------------------------------------------
const float PREDRAW_NEXT = 1;

//----------------------------------------------------------------------
// These constants are only used in CSQC_UpdateView
//----------------------------------------------------------------------
const float MASK_ENGINE = 1;
const float MASK_VIEWMODEL = 2;
const float MASK_NORMAL = 4;

//----------------------------------------------------------------------
const float VF_MIN = 1;
const float VF_SIZE = 4;
const float VF_ORIGIN = 11;
const float VF_ORIGIN_X = 12;
const float VF_ORIGIN_Y = 13;
const float VF_ORIGIN_Z = 14;
const float VF_ANGLES = 15;
const float VF_ANGLES_X = 16;
const float VF_ANGLES_Y = 17;
const float VF_ANGLES_Z = 18;
const float VF_DRAWWORLD = 19;
const float VF_DRAWENGINESBAR = 20;
const float VF_DRAWCROSSHAIR = 21;
const float VF_CL_VIEWANGLES = 33;
const float VF_CL_VIEWANGLES_X = 34;
const float VF_CL_VIEWANGLES_Y = 35;
const float VF_CL_VIEWANGLES_Z = 36;
const float VF_VIEWENTITY = 206;

enumflags {
RF_VIEWMODEL,
RF_EXTERNALMODEL,
RF_DEPTHHACK,
RF_ADDITIVE,
RF_USEAXIS,
RF_NOSHADOW
};
#endif

Return to the top of this page or return to the overview of this repo.

Log defs_const.qc

Date Commit Message Author + -
2024-04-05 Player footsteps, shareware monsters, misc? cev +1  
2024-03-24 Fix projectile and func_ blocked interaction cev   -7
2024-03-24 2nd pass refactor, rework QC class structure cev +268  

Return to the top of this page or return to the overview of this repo.