📄 q_shared.pas
字号:
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,
TE_BLUEHYPERBLASTER,
TE_PLASMA_EXPLOSION,
TE_TUNNEL_SPARKS,
//ROGUE
TE_BLASTER2,
TE_RAILTRAIL2,
TE_FLAME,
TE_LIGHTNING,
TE_DEBUGTRAIL,
TE_PLAIN_EXPLOSION,
TE_FLASHLIGHT,
TE_FORCEWALL,
TE_HEATBEAM,
TE_MONSTER_HEATBEAM,
TE_STEAM,
TE_BUBBLETRAIL2,
TE_MOREBLOOD,
TE_HEATBEAM_SPARKS,
TE_HEATBEAM_STEAM,
TE_CHAINFIST_SMOKE,
TE_ELECTRIC_SPARKS,
TE_TRACKER_EXPLOSION,
TE_TELEPORT_EFFECT,
TE_DBALL_GOAL,
TE_WIDOWBEAMOUT,
TE_NUKEBLAST,
TE_WIDOWSPLASH,
TE_EXPLOSION1_BIG,
TE_EXPLOSION1_NP,
TE_FLECHETTE
//ROGUE
);
const SPLASH_UNKNOWN = 0;
const SPLASH_SPARKS = 1;
const SPLASH_BLUE_WATER = 2;
const SPLASH_BROWN_WATER = 3;
const SPLASH_SLIME = 4;
const SPLASH_LAVA = 5;
const SPLASH_BLOOD = 6;
// sound channels
// channel 0 never willingly overrides
// other channels (1-7) allways override a playing sound on that channel
const
CHAN_AUTO = 0;
CHAN_WEAPON = 1;
CHAN_VOICE = 2;
CHAN_ITEM = 3;
CHAN_BODY = 4;
// modifier flags
CHAN_NO_PHS_ADD = 8; // send to all clients, not just ones in PHS (ATTN 0 will also do this)
CHAN_RELIABLE = 16; // send by reliable message, not datagram
// sound attenuation values
ATTN_NONE = 0; // full volume the entire level
ATTN_NORM = 1;
ATTN_IDLE = 2;
ATTN_STATIC = 3; // diminish very rapidly with distance
// player_state->stats[] indexes
STAT_HEALTH_ICON = 0;
STAT_HEALTH = 1;
STAT_AMMO_ICON = 2;
STAT_AMMO = 3;
STAT_ARMOR_ICON = 4;
STAT_ARMOR = 5;
STAT_SELECTED_ICON = 6;
STAT_PICKUP_ICON = 7;
STAT_PICKUP_STRING = 8;
STAT_TIMER_ICON = 9;
STAT_TIMER = 10;
STAT_HELPICON = 11;
STAT_SELECTED_ITEM = 12;
STAT_LAYOUTS = 13;
STAT_FRAGS = 14;
STAT_FLASHES = 15; // cleared each frame, 1 = health, 2 = armor
STAT_CHASE = 16;
STAT_SPECTATOR = 17;
MAX_STATS = g_local.MAX_STATS; // CAK - MOVED to g_local
// dmflags->value flags
DF_NO_HEALTH = $00000001; // 1
DF_NO_ITEMS = $00000002; // 2
DF_WEAPONS_STAY = $00000004; // 4
DF_NO_FALLING = $00000008; // 8
DF_INSTANT_ITEMS = $00000010; // 16
DF_SAME_LEVEL = $00000020; // 32
DF_SKINTEAMS = $00000040; // 64
DF_MODELTEAMS = $00000080; // 128
DF_NO_FRIENDLY_FIRE = $00000100; // 256
DF_SPAWN_FARTHEST = $00000200; // 512
DF_FORCE_RESPAWN = $00000400; // 1024
DF_NO_ARMOR = $00000800; // 2048
DF_ALLOW_EXIT = $00001000; // 4096
DF_INFINITE_AMMO = $00002000; // 8192
DF_QUAD_DROP = $00004000; // 16384
DF_FIXED_FOV = $00008000; // 32768
// RAFAEL
DF_QUADFIRE_DROP = $00010000; // 65536
//ROGUE
const
DF_NO_MINES = $00020000;
DF_NO_STACK_DOUBLE = $00040000;
DF_NO_NUKES = $00080000;
DF_NO_SPHERES = $00100000;
//ROGUE
// player_state_t is the information needed in addition to pmove_state_t
// to rendered a view. There will only be 10 player_state_t sent each second,
// but the number of pmove_state_t changes will be reletive to client
// frame rates
// this structure needs to be communicated bit-accurate
// from the server to the client to guarantee that
// prediction stays in sync, so no floats are used.
// if any part of the game code modifies this struct, it
// will result in a prediction error of some degree.
type
// client data that stays across multiple level loads
Pclient_persistant_t = ^client_persistant_t;
client_persistant_t = record
userinfo: array[0..MAX_INFO_STRING -1] of char;
netname: array[0..15] of char;
hand: integer;
connected: boolean; // a loadgame will leave valid entities that
// just don't have a connection yet
// values saved and restored from edicts when changing levels
health,
max_health,
savedFlags,
selected_item: integer;
inventory: array[0..MAX_ITEMS-1] of integer;
// ammo capacities
max_bullets,
max_shells,
max_rockets,
max_grenades,
max_cells,
max_slugs: integer;
weapon,
lastweapon: gitem_p;
power_cubes, // used for tracking the cubes in coop games
score, // for calculating total unit score in coop games
game_helpchanged,
helpchanged: integer;
spectator: boolean; // client is a spectator
end;
gclient_s = record
// known to server
ps: player_state_t; // communicated by server to clients
ping: Integer;
// private to game
pers: client_persistant_t;
resp: client_respawn_t;
old_pmove: pmove_state_t; // for detecting out-of-pmove changes
showscores, // set layout stat
showinventory, // set layout stat
showhelp,
showhelpicon: boolean;
ammo_index,
buttons,
oldbuttons,
latched_buttons: integer;
weapon_thunk: boolean;
newweapon: gitem_p;
// sum up damage over an entire frame, so
// shotgun blasts give a single big kick
damage_armor, // damage absorbed by armor
damage_parmor, // damage absorbed by power armor
damage_blood, // damage taken out of health
damage_knockback: integer; // impact damage
damage_from: vec3_t; // origin for vector calculation
killer_yaw: Single; // when dead, look at killer
weaponstate: weaponstate_t;
kick_angles: vec3_t; // weapon kicks
kick_origin: vec3_t;
v_dmg_roll, v_dmg_pitch, v_dmg_time, // damage kicks
fall_time, fall_value, // for view drop on fall
damage_alpha,
bonus_alpha: single;
damage_blend,
v_angle: vec3_t; // aiming direction
bobtime: Single; // so off-ground doesn't change it
oldviewangles: vec3_t;
oldvelocity: vec3_t;
next_drown_time: Single;
old_waterlevel,
breather_sound,
machinegun_shots: integer; // for weapon raising
// animation vars
anim_end,
anim_priority: integer;
anim_duck,
anim_run: boolean;
// powerup timers
quad_framenum,
invincible_framenum,
breather_framenum,
enviro_framenum: single;
grenade_blew_up: boolean;
grenade_time: single;
silencer_shots,
weapon_sound: integer;
pickup_msg_time,
flood_locktill: single; // locked from talking
flood_when: array[0..9] of single; // when messages were said
flood_whenhead: integer; // head pointer for when said
respawn_time: single; // can respawn when time > this
chase_target: edict_p; // player we are chasing
update_chase: boolean; // need to update chase info?
end;
// a trace is returned when a box is swept through the world
trace_p = ^trace_t;
ptrace_t = trace_p;
trace_t = record
allsolid: qboolean; // if true, plane is not valid
startsolid: qboolean; // if true, the initial po : integer was in a solid area
fraction: single; // time completed, 1.0 := didn't hit anything
endpos: vec3_t; // final position
plane: cplane_t; // surface normal at impact
surface: csurface_p; // surface hit
contents: Integer; // contents on other side of surface hit
ent: edict_p; // not set by CM_* functions
end;
pmove_p = ^pmove_t;
pmove_t = record
// state (in / out)
s: pmove_state_t;
// command (in)
cmd: usercmd_t;
snapinitial: qboolean; // if s has been changed outside pmove
// results (out)
numtouch: integer;
touchents: array[0..MAXTOUCH - 1] of edict_p;
viewangles: vec3_t; // clamped
viewheight: single;
mins, maxs: vec3_t; // bounding box size
groundentity: edict_p;
watertype: integer;
waterlevel: integer;
// callbacks to test the world
trace: function(var start,mins,maxs,_end: vec3_t): trace_t; cdecl;
pointcontents: function(var point: vec3_t): Integer; cdecl;
end;
(*
ROGUE - VERSIONS
1234 08/13/1998 Activision
1235 08/14/1998 Id Software
1236 08/15/1998 Steve Tietze
1237 08/15/1998 Phil Dobranski
1238 08/15/1998 John Sheley
1239 08/17/1998 Barrett Alexander
1230 08/17/1998 Brandon Fish
1245 08/17/1998 Don MacAskill
1246 08/17/1998 David "Zoid" Kirsch
1247 08/17/1998 Manu Smith
1248 08/17/1998 Geoff Scully
1249 08/17/1998 Andy Van Fossen
1240 08/20/1998 Activision Build 2
1256 08/20/1998 Ranger Clan
1257 08/20/1998 Ensemble Studios
1258 08/21/1998 Robert Duffy
1259 08/21/1998 Stephen Seachord
1250 08/21/1998 Stephen Heaslip
1267 08/21/1998 Samir Sandesara
1268 08/21/1998 Oliver Wyman
1269 08/21/1998 Steven Marchegiano
1260 08/21/1998 Build #2 for Nihilistic
1278 08/21/1998 Build #2 for Ensemble
9999 08/20/1998 Internal Use
*)
const
ROGUE_VERSION_ID = 1278;
ROGUE_VERSION_STRING = '08/21/1998 Beta 2 for Ensemble';
// ROGUE
(*
==========================================================
ELEMENTS COMMUNICATED ACROSS THE NET
==========================================================
*)
function ANGLE2SHORT(x: Single): Word;
function SHORT2ANGLE(x: Word): Single;
//
// config strings are a general means of communication from
// the server to all connected clients.
// Each config string can be at most MAX_QPATH characters.
//
const
CS_NAME = 0;
CS_CDTRACK = 1;
CS_SKY = 2;
CS_SKYAXIS = 3; // %f %f %f format
CS_SKYROTATE = 4;
CS_STATUSBAR = 5; // display program string
CS_AIRACCEL = 29; // air acceleration control
CS_MAXCLIENTS = 30;
CS_MAPCHECKSUM = 31; // for catching cheater maps
CS_MODELS = 32;
CS_SOUNDS = (CS_MODELS+MAX_MODELS);
CS_IMAGES = (CS_SOUNDS+MAX_SOUNDS);
CS_LIGHTS = (CS_IMAGES+MAX_IMAGES);
CS_ITEMS = (CS_LIGHTS+MAX_LIGHTSTYLES);
CS_PLAYERSKINS = (CS_ITEMS+MAX_ITEMS);
CS_GENERAL = (CS_PLAYERSKINS+MAX_CLIENTS);
MAX_CONFIGSTRINGS = (CS_GENERAL+MAX_GENERAL);
// ==================
// PGM
const
VIDREF_GL = 1;
VIDREF_SOFT = 2;
VIDREF_OTHER = 3;
var vidref_val: Integer; // CAK - external for cl_ents.c
// PGM
// ==================
procedure DelphiStrFmt(buf: PChar; fmt: PChar; args: array of const);
implementation
uses
CPas,
Common,
SysUtils,
Dialogs;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -