📄 q_shared.pas
字号:
origin: vec3_t; // for sounds or lights
headnode: Integer;
end;
cmodel_t = cmodel_s;
pcmodel_t = cmodel_p;
pcmodel_s = cmodel_p;
mapsurface_p = ^mapsurface_s;
mapsurface_s = record // used internally due to name len probs //ZOID
c: csurface_t;
rname: array[0..31] of Char;
end;
mapsurface_t = mapsurface_s;
pmapsurface_t = mapsurface_p;
pmapsurface_s = mapsurface_p;
//==============================================
// entity_state_t->event values
// ertity events are for effects that take place reletive
// to an existing entities origin. Very network efficient.
// All muzzle flashes really should be converted to events...
entity_event_p = ^entity_event_t;
entity_event_t = (
EV_NONE,
EV_ITEM_RESPAWN,
EV_FOOTSTEP,
EV_FALLSHORT,
EV_FALL,
EV_FALLFAR,
EV_PLAYER_TELEPORT,
EV_OTHER_TELEPORT
);
//==============================================
// pmove.pm_flags
const
PMF_DUCKED = 1;
PMF_JUMP_HELD = 2;
PMF_ON_GROUND = 4;
PMF_TIME_WATERJUMP = 8; // pm_time is waterjump
PMF_TIME_LAND = 16; // pm_time is time before rejump
PMF_TIME_TELEPORT = 32; // pm_time is non-moving time
PMF_NO_PREDICTION = 64; // temporarily disables prediction (used for grappling hook)
//
// button bits
//
const
BUTTON_ATTACK = 1;
BUTTON_USE = 2;
BUTTON_ANY = 128; // any key whatsoever
// usercmd_t is sent to the server each client frame
type
usercmd_p = ^usercmd_t;
pusercmd_s = usercmd_p;
usercmd_s = record
msec: byte;
buttons: byte;
angles: array[0..3 - 1] of smallint;
forwardmove, sidemove, upmove: smallint;
impulse: byte; // remove?
lightlevel: byte; // light level the player is standing on
end;
usercmd_t = usercmd_s;
pusercmd_t = usercmd_p;
TUserCmd = usercmd_t;
PUserCmd = usercmd_p;
const
MAXTOUCH = 32;
// entity_state_t.effects
// Effects are things handled on the client side (lights, particles, frame animations)
// that happen constantly on the given entity.
// An entity that has effects will be sent to the client
// even if it has a zero index model.
const EF_ROTATE = $00000001; // rotate (bonus items)
const EF_GIB = $00000002; // leave a trail
const EF_BLASTER = $00000008; // redlight + trail
const EF_ROCKET = $00000010; // redlight + trail
const EF_GRENADE = $00000020;
const EF_HYPERBLASTER = $00000040;
const EF_BFG = $00000080;
const EF_COLOR_SHELL = $00000100;
const EF_POWERSCREEN = $00000200;
const EF_ANIM01 = $00000400; // automatically cycle between frames 0 and 1 at 2 hz
const EF_ANIM23 = $00000800; // automatically cycle between frames 2 and 3 at 2 hz
const EF_ANIM_ALL = $00001000; // automatically cycle through all frames at 2hz
const EF_ANIM_ALLFAST = $00002000; // automatically cycle through all frames at 10hz
const EF_FLIES = $00004000;
const EF_QUAD = $00008000;
const EF_PENT = $00010000;
const EF_TELEPORTER = $00020000; // particle fountain
const EF_FLAG1 = $00040000;
const EF_FLAG2 = $00080000;
// RAFAEL
const EF_IONRIPPER = $00100000;
const EF_GREENGIB = $00200000;
const EF_BLUEHYPERBLASTER = $00400000;
const EF_SPINNINGLIGHTS = $00800000;
const EF_PLASMA = $01000000;
const EF_TRAP = $02000000;
//ROGUE
const EF_TRACKER = $04000000;
const EF_DOUBLE = $08000000;
const EF_SPHERETRANS = $10000000;
const EF_TAGTRAIL = $20000000;
const EF_HALF_DAMAGE = $40000000;
const EF_TRACKERTRAIL = $80000000;
//ROGUE
// entity_state_t.renderfx flags
const RF_MINLIGHT = 1; // allways have some light (viewmodel)
const RF_VIEWERMODEL = 2; // don't draw through eyes, only mirrors
const RF_WEAPONMODEL = 4; // only draw through eyes
const RF_FULLBRIGHT = 8; // allways draw full intensity
const RF_DEPTHHACK = 16; // for view weapon Z crunching
const RF_TRANSLUCENT = 32;
const RF_FRAMELERP = 64;
const RF_BEAM = 128;
const RF_CUSTOMSKIN = 256; // skin is an index in image_precache
const RF_GLOW = 512; // pulse lighting for bonus items
const RF_SHELL_RED = 1024;
const RF_SHELL_GREEN = 2048;
const RF_SHELL_BLUE = 4096;
//ROGUE
const RF_IR_VISIBLE = $00008000; // 32768
const RF_SHELL_DOUBLE = $00010000; // 65536
const RF_SHELL_HALF_DAM = $00020000;
const RF_USE_DISGUISE = $00040000;
//ROGUE
// player_state_t.refdef flags
const RDF_UNDERWATER = 1; // warp the screen as apropriate
const RDF_NOWORLDMODEL = 2; // used for player configuration screen
//ROGUE
const RDF_IRGOGGLES = 4;
const RDF_UVGOGGLES = 8;
//ROGUE
//
// muzzle flashes / player effects
//
const MZ_BLASTER = 0;
const MZ_MACHINEGUN = 1;
const MZ_SHOTGUN = 2;
const MZ_CHAINGUN1 = 3;
const MZ_CHAINGUN2 = 4;
const MZ_CHAINGUN3 = 5;
const MZ_RAILGUN = 6;
const MZ_ROCKET = 7;
const MZ_GRENADE = 8;
const MZ_LOGIN = 9;
const MZ_LOGOUT = 10;
const MZ_RESPAWN = 11;
const MZ_BFG = 12;
const MZ_SSHOTGUN = 13;
const MZ_HYPERBLASTER = 14;
const MZ_ITEMRESPAWN = 15;
// RAFAEL
const MZ_IONRIPPER = 16;
const MZ_BLUEHYPERBLASTER = 17;
const MZ_PHALANX = 18;
const MZ_SILENCED = 128; // bit flag ORed with one of the above numbers
//ROGUE
const MZ_ETF_RIFLE = 30;
const MZ_UNUSED = 31;
const MZ_SHOTGUN2 = 32;
const MZ_HEATBEAM = 33;
const MZ_BLASTER2 = 34;
const MZ_TRACKER = 35;
const MZ_NUKE1 = 36;
const MZ_NUKE2 = 37;
const MZ_NUKE4 = 38;
const MZ_NUKE8 = 39;
//ROGUE
//
// monster muzzle flashes
//
const MZ2_TANK_BLASTER_1 = 1;
const MZ2_TANK_BLASTER_2 = 2;
const MZ2_TANK_BLASTER_3 = 3;
const MZ2_TANK_MACHINEGUN_1 = 4;
const MZ2_TANK_MACHINEGUN_2 = 5;
const MZ2_TANK_MACHINEGUN_3 = 6;
const MZ2_TANK_MACHINEGUN_4 = 7;
const MZ2_TANK_MACHINEGUN_5 = 8;
const MZ2_TANK_MACHINEGUN_6 = 9;
const MZ2_TANK_MACHINEGUN_7 = 10;
const MZ2_TANK_MACHINEGUN_8 = 11;
const MZ2_TANK_MACHINEGUN_9 = 12;
const MZ2_TANK_MACHINEGUN_10 = 13;
const MZ2_TANK_MACHINEGUN_11 = 14;
const MZ2_TANK_MACHINEGUN_12 = 15;
const MZ2_TANK_MACHINEGUN_13 = 16;
const MZ2_TANK_MACHINEGUN_14 = 17;
const MZ2_TANK_MACHINEGUN_15 = 18;
const MZ2_TANK_MACHINEGUN_16 = 19;
const MZ2_TANK_MACHINEGUN_17 = 20;
const MZ2_TANK_MACHINEGUN_18 = 21;
const MZ2_TANK_MACHINEGUN_19 = 22;
const MZ2_TANK_ROCKET_1 = 23;
const MZ2_TANK_ROCKET_2 = 24;
const MZ2_TANK_ROCKET_3 = 25;
const MZ2_INFANTRY_MACHINEGUN_1 = 26;
const MZ2_INFANTRY_MACHINEGUN_2 = 27;
const MZ2_INFANTRY_MACHINEGUN_3 = 28;
const MZ2_INFANTRY_MACHINEGUN_4 = 29;
const MZ2_INFANTRY_MACHINEGUN_5 = 30;
const MZ2_INFANTRY_MACHINEGUN_6 = 31;
const MZ2_INFANTRY_MACHINEGUN_7 = 32;
const MZ2_INFANTRY_MACHINEGUN_8 = 33;
const MZ2_INFANTRY_MACHINEGUN_9 = 34;
const MZ2_INFANTRY_MACHINEGUN_10 = 35;
const MZ2_INFANTRY_MACHINEGUN_11 = 36;
const MZ2_INFANTRY_MACHINEGUN_12 = 37;
const MZ2_INFANTRY_MACHINEGUN_13 = 38;
const MZ2_SOLDIER_BLASTER_1 = 39;
const MZ2_SOLDIER_BLASTER_2 = 40;
const MZ2_SOLDIER_SHOTGUN_1 = 41;
const MZ2_SOLDIER_SHOTGUN_2 = 42;
const MZ2_SOLDIER_MACHINEGUN_1 = 43;
const MZ2_SOLDIER_MACHINEGUN_2 = 44;
const MZ2_GUNNER_MACHINEGUN_1 = 45;
const MZ2_GUNNER_MACHINEGUN_2 = 46;
const MZ2_GUNNER_MACHINEGUN_3 = 47;
const MZ2_GUNNER_MACHINEGUN_4 = 48;
const MZ2_GUNNER_MACHINEGUN_5 = 49;
const MZ2_GUNNER_MACHINEGUN_6 = 50;
const MZ2_GUNNER_MACHINEGUN_7 = 51;
const MZ2_GUNNER_MACHINEGUN_8 = 52;
const MZ2_GUNNER_GRENADE_1 = 53;
const MZ2_GUNNER_GRENADE_2 = 54;
const MZ2_GUNNER_GRENADE_3 = 55;
const MZ2_GUNNER_GRENADE_4 = 56;
const MZ2_CHICK_ROCKET_1 = 57;
const MZ2_FLYER_BLASTER_1 = 58;
const MZ2_FLYER_BLASTER_2 = 59;
const MZ2_MEDIC_BLASTER_1 = 60;
const MZ2_GLADIATOR_RAILGUN_1 = 61;
const MZ2_HOVER_BLASTER_1 = 62;
const MZ2_ACTOR_MACHINEGUN_1 = 63;
const MZ2_SUPERTANK_MACHINEGUN_1 = 64;
const MZ2_SUPERTANK_MACHINEGUN_2 = 65;
const MZ2_SUPERTANK_MACHINEGUN_3 = 66;
const MZ2_SUPERTANK_MACHINEGUN_4 = 67;
const MZ2_SUPERTANK_MACHINEGUN_5 = 68;
const MZ2_SUPERTANK_MACHINEGUN_6 = 69;
const MZ2_SUPERTANK_ROCKET_1 = 70;
const MZ2_SUPERTANK_ROCKET_2 = 71;
const MZ2_SUPERTANK_ROCKET_3 = 72;
const MZ2_BOSS2_MACHINEGUN_L1 = 73;
const MZ2_BOSS2_MACHINEGUN_L2 = 74;
const MZ2_BOSS2_MACHINEGUN_L3 = 75;
const MZ2_BOSS2_MACHINEGUN_L4 = 76;
const MZ2_BOSS2_MACHINEGUN_L5 = 77;
const MZ2_BOSS2_ROCKET_1 = 78;
const MZ2_BOSS2_ROCKET_2 = 79;
const MZ2_BOSS2_ROCKET_3 = 80;
const MZ2_BOSS2_ROCKET_4 = 81;
const MZ2_FLOAT_BLASTER_1 = 82;
const MZ2_SOLDIER_BLASTER_3 = 83;
const MZ2_SOLDIER_SHOTGUN_3 = 84;
const MZ2_SOLDIER_MACHINEGUN_3 = 85;
const MZ2_SOLDIER_BLASTER_4 = 86;
const MZ2_SOLDIER_SHOTGUN_4 = 87;
const MZ2_SOLDIER_MACHINEGUN_4 = 88;
const MZ2_SOLDIER_BLASTER_5 = 89;
const MZ2_SOLDIER_SHOTGUN_5 = 90;
const MZ2_SOLDIER_MACHINEGUN_5 = 91;
const MZ2_SOLDIER_BLASTER_6 = 92;
const MZ2_SOLDIER_SHOTGUN_6 = 93;
const MZ2_SOLDIER_MACHINEGUN_6 = 94;
const MZ2_SOLDIER_BLASTER_7 = 95;
const MZ2_SOLDIER_SHOTGUN_7 = 96;
const MZ2_SOLDIER_MACHINEGUN_7 = 97;
const MZ2_SOLDIER_BLASTER_8 = 98;
const MZ2_SOLDIER_SHOTGUN_8 = 99;
const MZ2_SOLDIER_MACHINEGUN_8 = 100;
// --- Xian shit below ---
const MZ2_MAKRON_BFG = 101;
const MZ2_MAKRON_BLASTER_1 = 102;
const MZ2_MAKRON_BLASTER_2 = 103;
const MZ2_MAKRON_BLASTER_3 = 104;
const MZ2_MAKRON_BLASTER_4 = 105;
const MZ2_MAKRON_BLASTER_5 = 106;
const MZ2_MAKRON_BLASTER_6 = 107;
const MZ2_MAKRON_BLASTER_7 = 108;
const MZ2_MAKRON_BLASTER_8 = 109;
const MZ2_MAKRON_BLASTER_9 = 110;
const MZ2_MAKRON_BLASTER_10 = 111;
const MZ2_MAKRON_BLASTER_11 = 112;
const MZ2_MAKRON_BLASTER_12 = 113;
const MZ2_MAKRON_BLASTER_13 = 114;
const MZ2_MAKRON_BLASTER_14 = 115;
const MZ2_MAKRON_BLASTER_15 = 116;
const MZ2_MAKRON_BLASTER_16 = 117;
const MZ2_MAKRON_BLASTER_17 = 118;
const MZ2_MAKRON_RAILGUN_1 = 119;
const MZ2_JORG_MACHINEGUN_L1 = 120;
const MZ2_JORG_MACHINEGUN_L2 = 121;
const MZ2_JORG_MACHINEGUN_L3 = 122;
const MZ2_JORG_MACHINEGUN_L4 = 123;
const MZ2_JORG_MACHINEGUN_L5 = 124;
const MZ2_JORG_MACHINEGUN_L6 = 125;
const MZ2_JORG_MACHINEGUN_R1 = 126;
const MZ2_JORG_MACHINEGUN_R2 = 127;
const MZ2_JORG_MACHINEGUN_R3 = 128;
const MZ2_JORG_MACHINEGUN_R4 = 129;
const MZ2_JORG_MACHINEGUN_R5 = 130;
const MZ2_JORG_MACHINEGUN_R6 = 131;
const MZ2_JORG_BFG_1 = 132;
const MZ2_BOSS2_MACHINEGUN_R1 = 133;
const MZ2_BOSS2_MACHINEGUN_R2 = 134;
const MZ2_BOSS2_MACHINEGUN_R3 = 135;
const MZ2_BOSS2_MACHINEGUN_R4 = 136;
const MZ2_BOSS2_MACHINEGUN_R5 = 137;
//ROGUE
const MZ2_CARRIER_MACHINEGUN_L1= 138;
const MZ2_CARRIER_MACHINEGUN_R1= 139;
const MZ2_CARRIER_GRENADE = 140;
const MZ2_TURRET_MACHINEGUN = 141;
const MZ2_TURRET_ROCKET = 142;
const MZ2_TURRET_BLASTER = 143;
const MZ2_STALKER_BLASTER = 144;
const MZ2_DAEDALUS_BLASTER = 145;
const MZ2_MEDIC_BLASTER_2 = 146;
const MZ2_CARRIER_RAILGUN = 147;
const MZ2_WIDOW_DISRUPTOR = 148;
const MZ2_WIDOW_BLASTER = 149;
const MZ2_WIDOW_RAIL = 150;
const MZ2_WIDOW_PLASMABEAM = 151; // PMM - not used
const MZ2_CARRIER_MACHINEGUN_L2= 152;
const MZ2_CARRIER_MACHINEGUN_R2= 153;
const MZ2_WIDOW_RAIL_LEFT = 154;
const MZ2_WIDOW_RAIL_RIGHT = 155;
const MZ2_WIDOW_BLASTER_SWEEP1 = 156;
const MZ2_WIDOW_BLASTER_SWEEP2 = 157;
const MZ2_WIDOW_BLASTER_SWEEP3 = 158;
const MZ2_WIDOW_BLASTER_SWEEP4 = 159;
const MZ2_WIDOW_BLASTER_SWEEP5 = 160;
const MZ2_WIDOW_BLASTER_SWEEP6 = 161;
const MZ2_WIDOW_BLASTER_SWEEP7 = 162;
const MZ2_WIDOW_BLASTER_SWEEP8 = 163;
const MZ2_WIDOW_BLASTER_SWEEP9 = 164;
const MZ2_WIDOW_BLASTER_100 = 165;
const MZ2_WIDOW_BLASTER_90 = 166;
const MZ2_WIDOW_BLASTER_80 = 167;
const MZ2_WIDOW_BLASTER_70 = 168;
const MZ2_WIDOW_BLASTER_60 = 169;
const MZ2_WIDOW_BLASTER_50 = 170;
const MZ2_WIDOW_BLASTER_40 = 171;
const MZ2_WIDOW_BLASTER_30 = 172;
const MZ2_WIDOW_BLASTER_20 = 173;
const MZ2_WIDOW_BLASTER_10 = 174;
const MZ2_WIDOW_BLASTER_0 = 175;
const MZ2_WIDOW_BLASTER_10L = 176;
const MZ2_WIDOW_BLASTER_20L = 177;
const MZ2_WIDOW_BLASTER_30L = 178;
const MZ2_WIDOW_BLASTER_40L = 179;
const MZ2_WIDOW_BLASTER_50L = 180;
const MZ2_WIDOW_BLASTER_60L = 181;
const MZ2_WIDOW_BLASTER_70L = 182;
const MZ2_WIDOW_RUN_1 = 183;
const MZ2_WIDOW_RUN_2 = 184;
const MZ2_WIDOW_RUN_3 = 185;
const MZ2_WIDOW_RUN_4 = 186;
const MZ2_WIDOW_RUN_5 = 187;
const MZ2_WIDOW_RUN_6 = 188;
const MZ2_WIDOW_RUN_7 = 189;
const MZ2_WIDOW_RUN_8 = 190;
const MZ2_CARRIER_ROCKET_1 = 191;
const MZ2_CARRIER_ROCKET_2 = 192;
const MZ2_CARRIER_ROCKET_3 = 193;
const MZ2_CARRIER_ROCKET_4 = 194;
const MZ2_WIDOW2_BEAMER_1 = 195;
const MZ2_WIDOW2_BEAMER_2 = 196;
const MZ2_WIDOW2_BEAMER_3 = 197;
const MZ2_WIDOW2_BEAMER_4 = 198;
const MZ2_WIDOW2_BEAMER_5 = 199;
const MZ2_WIDOW2_BEAM_SWEEP_1 = 200;
const MZ2_WIDOW2_BEAM_SWEEP_2 = 201;
const MZ2_WIDOW2_BEAM_SWEEP_3 = 202;
const MZ2_WIDOW2_BEAM_SWEEP_4 = 203;
const MZ2_WIDOW2_BEAM_SWEEP_5 = 204;
const MZ2_WIDOW2_BEAM_SWEEP_6 = 205;
const MZ2_WIDOW2_BEAM_SWEEP_7 = 206;
const MZ2_WIDOW2_BEAM_SWEEP_8 = 207;
const MZ2_WIDOW2_BEAM_SWEEP_9 = 208;
const MZ2_WIDOW2_BEAM_SWEEP_10 = 209;
const MZ2_WIDOW2_BEAM_SWEEP_11 = 210;
// ROGUE
// CAK - monster_flash_offset is the only thing in m_flash.c
// So the variable will be declared there and nowhere else.
// Also it is never used in Capture The Flag.
// It was here originally
// temp entity events
//
// Temp entity events are for things that happen
// at a location seperate from any existing entity.
// Temporary entity messages are explicitly contype = recorded
// and broadcast.
type temp_event_t = (
TE_GUNSHOT,
TE_BLOOD,
TE_BLASTER,
TE_RAILTRAIL,
TE_SHOTGUN,
TE_EXPLOSION1,
TE_EXPLOSION2,
TE_ROCKET_EXPLOSION,
TE_GRENADE_EXPLOSION,
TE_SPARKS,
TE_SPLASH,
TE_BUBBLETRAIL,
TE_SCREEN_SPARKS,
TE_SHIELD_SPARKS,
TE_BULLET_SPARKS,
TE_LASER_SPARKS,
TE_PARASITE_ATTACK,
TE_ROCKET_EXPLOSION_WATER,
TE_GRENADE_EXPLOSION_WATER,
TE_MEDIC_CABLE_ATTACK,
TE_BFG_EXPLOSION,
TE_BFG_BIGEXPLOSION,
TE_BOSSTPORT, // used as '22' in a map, so DON'T RENUMBER!!!
TE_BFG_LASER,
TE_GRAPPLE_CABLE,
TE_WELDING_SPARKS,
TE_GREENBLOOD,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -