📄 q_shared.h
字号:
#define MZ2_MAKRON_BLASTER_9 110
#define MZ2_MAKRON_BLASTER_10 111
#define MZ2_MAKRON_BLASTER_11 112
#define MZ2_MAKRON_BLASTER_12 113
#define MZ2_MAKRON_BLASTER_13 114
#define MZ2_MAKRON_BLASTER_14 115
#define MZ2_MAKRON_BLASTER_15 116
#define MZ2_MAKRON_BLASTER_16 117
#define MZ2_MAKRON_BLASTER_17 118
#define MZ2_MAKRON_RAILGUN_1 119
#define MZ2_JORG_MACHINEGUN_L1 120
#define MZ2_JORG_MACHINEGUN_L2 121
#define MZ2_JORG_MACHINEGUN_L3 122
#define MZ2_JORG_MACHINEGUN_L4 123
#define MZ2_JORG_MACHINEGUN_L5 124
#define MZ2_JORG_MACHINEGUN_L6 125
#define MZ2_JORG_MACHINEGUN_R1 126
#define MZ2_JORG_MACHINEGUN_R2 127
#define MZ2_JORG_MACHINEGUN_R3 128
#define MZ2_JORG_MACHINEGUN_R4 129
#define MZ2_JORG_MACHINEGUN_R5 130
#define MZ2_JORG_MACHINEGUN_R6 131
#define MZ2_JORG_BFG_1 132
#define MZ2_BOSS2_MACHINEGUN_R1 133
#define MZ2_BOSS2_MACHINEGUN_R2 134
#define MZ2_BOSS2_MACHINEGUN_R3 135
#define MZ2_BOSS2_MACHINEGUN_R4 136
#define MZ2_BOSS2_MACHINEGUN_R5 137
extern vec3_t monster_flash_offset [];
#endif
// temp entity events
//
// Temp entity events are for things that happen
// at a location seperate from any existing entity.
// Temporary entity messages are explicitly constructed
// and broadcast.
typedef enum
{
TE_GUNSHOT,
#ifndef SIN
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_SPARKS,
#else
TE_PARTICLES,
TE_RANDOM_PARTICLES,
TE_TESSELATE,
TE_LASER,
TE_BURNWALL,
TE_TEMPMODEL,
TE_STRIKE,
TE_DLIGHT,
TE_ROCKET_EXPLOSION,
TE_BEAM,
TE_DAMAGE_WALL,
TE_TELEPORT_EFFECT,
TE_BULLET_SPRAY,
TE_SCALED_EXPLOSION,
TE_PULSE_EXPLOSION,
// 2015 code
TE_FLAMETHROWER, // flames for the flamethrower
TE_FLAMETHROWERROW, // row of flames for the flamethrower
TE_FLAMETHROWERHIT, // hit flames for the flamethrower
TE_FLAME, // a puff or row of flames (multipurpose)
TE_NUKE_EXPLOSION, // fire explosion entity for the nuke
TE_BOW_EXPLOSION, // explosion entity for the bow
TE_HOVERBOOSTER, // vertical booster effect for the hoverbike
TE_SIZED_PARTICLES,
TE_RANDOM_SIZED_PARTICLES,
TE_PARTICLES_FULL,
TE_RANDOM_PARTICLES_FULL,
TE_TRACER // bullet tracer
#endif
} temp_event_t;
#ifdef SIN
#define TM_ORIGIN 0x01
#define TM_ANGLES 0x02
#define TM_ANIM 0x04
#define TM_SCALE 0x08
#define TM_FLAGS 0x10
#define TM_OWNER 0x20
#define TM_LIFE 0x40
#define TM_ALPHA 0x80
#define TEMPMODEL_RANDOM_ROLL 0x0001
#define TEMPMODEL_AUTO_ANIMATE 0x0002
#define TEMPMODEL_ANIMATE_ONCE 0x0004
#define TEMPMODEL_ANIMATE_FAST 0x0008
#define TEMPMODEL_RANDOM_PITCH 0x0010
#define TEMPMODEL_RANDOM_YAW 0x0020
#define TEMPMODEL_ALPHAFADE 0x0040
#define TEMPMODEL_ANIMATE_SCALE 0x0080
//
// these flags are not sent over the net for now
//
#define TEMPMODEL_USE_PHYSICS 0x0100
#define TEMPMODEL_BOUNCE 0x0200
#define TEMPMODEL_TOUCH_DIE 0x0400
#define TEMPMODEL_LERP 0x0800
#define TEMPMODEL_FRAMELERP 0x1000
#define TEMPMODEL_TOUCH_DIE_NO_FADE 0x2000
#define BM_ALPHA (1<<0)
#define BM_SCALE (1<<1)
#define BM_FLAGS (1<<2)
#define BM_LIFE (1<<3)
#define BEAM_AUTO_ANIMATE (1<<0)
#define BEAM_ANIMATE_ONCE (1<<1)
#define BEAM_ANIMATE_FAST (1<<2)
#define BEAM_ROLL (1<<3)
#define BEAM_ANIMATE_RANDOM_START (1<<4)
#define BEAM_LIGHTNING_EFFECT (1<<5)
#define BEAM_RANDOM_ALPHA (1<<6)
#define TESS_ORIGIN 0x01
#define TESS_MINSIZE 0x02
#define TESS_MAXSIZE 0x04
#define TESS_DIR 0x08
#define TESS_POWER 0x10
#define TESS_PERCENT 0x20
#define TESS_THICK 0x40
#define TESS_ENTNUM 0x80
#define TESS_LIGHTSTYLE 0x100
#define TESS_TYPE 0x200
#define TESSELATE_FALL 1
#define TESSELATE_EXPANDANDSHRINK 2
#define TESSELATE_EXPLODE 3
#define TESSELATE_FALLANDTRAIL 4
#define TESSELATE_IMPLODE 5
#define TESS_DEFAULT_MIN_SIZE 10
#define TESS_DEFAULT_MAX_SIZE 25
#define TESS_DEFAULT_PERCENT 0.15f
#define TESS_DEFAULT_POWER 128
#define TESS_DEFAULT_LIGHTSTYLE 125
#define TESS_DEFAULT_TYPE 0
#endif
#define SPLASH_UNKNOWN 0
#define SPLASH_SPARKS 1
#define SPLASH_BLUE_WATER 2
#define SPLASH_BROWN_WATER 3
#define SPLASH_SLIME 4
#define SPLASH_LAVA 5
#define SPLASH_BLOOD 6
// sound channels
// channel 0 never willingly overrides
// other channels (1-7) allways override a playing sound on that channel
#define CHAN_AUTO 0
#define CHAN_WEAPON 1
#define CHAN_VOICE 2
#define CHAN_ITEM 3
#define CHAN_BODY 4
#define CHAN_DIALOG 5
#define CHAN_DIALOG_SECONDARY 6
#define CHAN_WEAPONIDLE 7
// modifier flags
#define CHAN_NO_PHS_ADD 8 // send to all clients, not just ones in PHS (ATTN 0 will also do this)
#define CHAN_RELIABLE 16 // send by reliable message, not datagram
// sound attenuation values
#define ATTN_NONE 0 // full volume the entire level
#define ATTN_NORM 1
#define ATTN_IDLE 2
#define ATTN_STATIC 3 // diminish very rapidly with distance
#ifdef SIN
#define STAT_HEALTH 0
#define STAT_WEAPONLIST 1
#define STAT_AMMO 2
#define STAT_SELECTED_ICON 3 // Icon of currently selected inventory item
#define STAT_SELECTED_AMOUNT 4 // Amount of this item
#define STAT_PREVIOUS_ICON 5 // Icon of previous inventory item
#define STAT_NEXT_ICON 6 // Icon of next inventory item
#define STAT_PICKUP_ICON 7
#define STAT_PICKUP_STRING 8
#define STAT_LAYOUTS 9
#define STAT_FRAGS 10
#define STAT_FLASHES 11
#define STAT_AMMO_BULLET357 12
#define STAT_AMMO_SHOTGUN 13
#define STAT_AMMO_BULLET10MM 14
#define STAT_AMMO_BULLET50MM 15
#define STAT_AMMO_BULLETPULSE 16
#define STAT_AMMO_BULLETSNIPER 17
#define STAT_AMMO_ROCKETS 18
#define STAT_AMMO_SPIDERMINES 19
#define STAT_ARMOR_HEAD 20
#define STAT_ARMOR_BODY 21
#define STAT_ARMOR_LEGS 22
#define STAT_ARMOR 23
#define STAT_SELECTED_MODELINDEX 24
#define STAT_CURRENT_WEAPON 25
#define STAT_CROSSHAIR 26
#define STAT_CLIPAMMO 27
#define STAT_POWERUPTIMER 28
#define STAT_POWERUPTYPE 29
#define STAT_SELECTED_NAME 30
#define STAT_EXITSIGN 31 // cleared each frame
// 2015 code
#define STAT_LASTLAP 12 // this is set to the client's last lap time * 10
#define STAT_CURRENTLAP 13 // this is set to the client's current lap time * 10
#define STAT_CPCOUNT 14 // number of checkpoints left to touch this lap
#define STAT_NIGHTVISION 15 // set when player is in night vision mode
#define P_SHIELDS 1
#define P_ADRENALINE 2
#define P_CLOAK 3
#define P_MUTAGEN 4
#define P_OXYGEN 5
#else
// player_state->stats[] indexes
#define STAT_HEALTH_ICON 0
#define STAT_HEALTH 1
#define STAT_AMMO_ICON 2
#define STAT_AMMO 3
#define STAT_ARMOR_ICON 4
#define STAT_ARMOR 5
#define STAT_SELECTED_ICON 6
#define STAT_PICKUP_ICON 7
#define STAT_PICKUP_STRING 8
#define STAT_TIMER_ICON 9
#define STAT_TIMER 10
#define STAT_HELPICON 11
#define STAT_SELECTED_ITEM 12
#define STAT_LAYOUTS 13
#define STAT_FRAGS 14
#define STAT_FLASHES 15 // cleared each frame, 1 = health, 2 = armor
#endif
#define MAX_STATS 32
#ifdef SIN
#define NUM_AMMO_TYPES 8
// 2015 code
// added new ammo types
#define NUM_2015_AMMO_TYPES 4 // number of additional 2015 ammo types
#define STAT_AMMO_BASE (STAT_AMMO_BULLET357)
#define NUM_ARMOR_TYPES 3
#define STAT_ARMOR_BASE (STAT_ARMOR_HEAD)
#endif
#ifdef SIN
#define DRAW_STATS (1<<0)
#define DRAW_SPECTATOR (1<<1)
#define DRAW_MISSIONCPU (1<<2)
#define DRAW_SCORES (1<<3)
#define DRAW_OVERLAY (1<<4)
#else
#define DRAW_STATS (1<<0)
#define DRAW_LAYOUT (1<<1)
#define DRAW_INVENTORY (1<<2)
#endif
#ifdef SIN
// dmflags->value flags
#define DF_NO_HEALTH (1<<0)
#define DF_NO_POWERUPS (1<<1)
#define DF_WEAPONS_STAY (1<<2)
#define DF_NO_FALLING (1<<3)
#define DF_INSTANT_ITEMS (1<<4)
#define DF_SAME_LEVEL (1<<5)
#define DF_SKINTEAMS (1<<6)
#define DF_MODELTEAMS (1<<7)
#define DF_FRIENDLY_FIRE (1<<8)
#define DF_SPAWN_FARTHEST (1<<9)
#define DF_FORCE_RESPAWN (1<<10)
#define DF_NO_ARMOR (1<<11)
#define DF_FAST_WEAPONS (1<<12)
#define DF_NOEXIT (1<<13)
#define DF_INFINITE_AMMO (1<<14)
#define DF_FIXED_FOV (1<<15)
#define DF_NO_DROP_WEAPONS (1<<16)
// 2015 code
#define DF_BBOX_BULLETS (1<<17)
#define DF_AUTO_INFORMER (1<<18)
#define DF_INFORMER_LOCK (1<<19)
#define DF_MIDNIGHT (1<<20) // wasn't able to get implimented
#define DF_FLASHLIGHT (1<<21)
#define DF_FLASHLIGHTON (1<<22)
#define DF_GOGGLES (1<<23)
#define DF_GOGGLESON (1<<24)
#else
// dmflags->value flags
#define DF_NO_HEALTH 1
#define DF_NO_ITEMS 2
#define DF_WEAPONS_STAY 4
#define DF_NO_FALLING 8
#define DF_INSTANT_ITEMS 16
#define DF_SAME_LEVEL 32
#define DF_SKINTEAMS 64
#define DF_MODELTEAMS 128
#define DF_FRIENDLY_FIRE 256
#define DF_SPAWN_FARTHEST 512
#define DF_FORCE_RESPAWN 1024
#define DF_NO_ARMOR 2048
#endif
/*
==========================================================
ELEMENTS COMMUNICATED ACROSS THE NET
==========================================================
*/
#define ANGLE2SHORT(x) ((int)((x)*65536/360) & 65535)
#define SHORT2ANGLE(x) ((x)*(360.0/65536))
#ifdef SIN
//
// 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.
//
#define CS_NAME 0
#define CS_CDTRACK 1
#define CS_SKY 2
#define CS_SKYAXIS 3 // %f %f %f format
#define CS_SKYROTATE 4
#define CS_MAXCLIENTS 5
#define CS_STATUSBAR 6 // display program string
// STATUSBAR reserves configstrings from 6-30
#define CS_MAPCHECKSUM 31 // for catching cheater maps
#define CS_MODELS 32
#define CS_SOUNDS (CS_MODELS+MAX_MODELS)
#define CS_IMAGES (CS_SOUNDS+MAX_SOUNDS)
#define CS_LIGHTS (CS_IMAGES+MAX_IMAGES)
#define CS_ITEMS (CS_LIGHTS+MAX_LIGHTSTYLES)
#define CS_PLAYERSKINS (CS_ITEMS+MAX_ITEMS)
#define CS_SOUNDTRACK (CS_PLAYERSKINS+MAX_CLIENTS)
// 2015 code
#define CS_CHECKPOINTS (CS_SOUNDTRACK + 1)
#define CS_BIKESKINS (CS_CHECKPOINTS + 1)
#define MAX_CONFIGSTRINGS (CS_BIKESKINS + MAX_CLIENTS) // # of config strings with 2015 stuff
#define MAX_NORMCONFIGSTRINGS (CS_SOUNDTRACK + 1) // # of config strings in original Sin
#else
//
// 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.
//
#define CS_NAME 0
#define CS_CDTRACK 1
#define CS_SKY 2
#define CS_SKYAXIS 3 // %f %f %f format
#define CS_SKYROTATE 4
#define CS_STATUSBAR 5 // display program string
// STATUSBAR reserves configstrings from 5-30
#define CS_MAPCHECKSUM 31 // for catching cheater maps
#define CS_MODELS 32
#define CS_SOUNDS (CS_MODELS+MAX_MODELS)
#define CS_IMAGES (CS_SOUNDS+MAX_SOUNDS)
#define CS_LIGHTS (CS_IMAGES+MAX_IMAGES)
#define CS_ITEMS (CS_LIGHTS+MAX_LIGHTSTYLES)
#define CS_PLAYERSKINS (CS_ITEMS+MAX_ITEMS)
#define MAX_CONFIGSTRINGS (CS_PLAYERSKINS+MAX_CLIENTS)
#endif
//==============================================
// 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...
typedef enum
{
EV_NONE,
EV_ITEM_RESPAWN,
EV_FOOTSTEP,
EV_FALLSHORT,
EV_MALE_FALL,
EV_MALE_FALLFAR,
EV_FEMALE_FALL,
EV_FEMALE_FALLFAR,
EV_PLAYER_TELEPORT
} entity_event_t;
#ifdef SIN
#define MAX_MODEL_GROUPS 24
typedef struct
{
int group_num; // the group which the triangle belongs to
int tri_num; // the actual triangle at which the bone is
vec3_t orientation; // orientation of bone
} bone_t;
#endif
/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -