]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/constants.qh
Properly support team field on trigger_multiple
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / constants.qh
index b0445abf18b175b11a0aacdada1f5b81999b14cb..18ea6d7d16f6204d2b3e6df82e40b851d865af53 100644 (file)
@@ -1,90 +1,7 @@
-#ifndef CONSTANTS_H
-#define CONSTANTS_H
+#pragma once
 
-// COMMIT-TODO: Update if necessary before committing
-// Revision 1: additional statistics sent (flag caps, returns, deaths)
-// Revision 2: Mapvote preview pictures
-// Revision 3: optimized map vote protocol
-// Revision 4: CSQC config var system
-// Revision 5: mapvote time fix
-// Revision 6: more robust against packet loss/delays, also show not yet connected clients
-// Revision 7: packet loss column
-// Revision 8: race
-// Revision 9: race delta
-// Revision 10: scoreboard force
-// Revision 11: scoreboard unforce; spectator support beginning
-// Revision 12: smaller scores updates (SERVER: requires new engine)
-// Revision 13: pointparticles
-// Revision 14: laser
-// Revision 15: zoom
-// Revision 16: multi-weapons
-// Revision 17: multi-weaponimpulses
-// Revision 18: warmup
-// Revision 19: fog
-// Revision 20: naggers
-// Revision 21: entcs for players optimized (position data down from 12 to 7 bytes); waypointsprites in csqc for team radar
-// Revision 22: hook shot origin
-#define CSQC_REVISION 22
-
-REGISTER_NET_TEMP(TE_CSQC_PICTURE)
-REGISTER_NET_TEMP(TE_CSQC_RACE)
-REGISTER_NET_TEMP(TE_CSQC_TEAMNAGGER)
-REGISTER_NET_TEMP(TE_CSQC_PINGPLREPORT)
-REGISTER_NET_TEMP(TE_CSQC_WEAPONCOMPLAIN)
-REGISTER_NET_TEMP(TE_CSQC_VEHICLESETUP)
-
-const int RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
-const int RACE_NET_CHECKPOINT_CLEAR = 1;
-const int RACE_NET_CHECKPOINT_NEXT_QUALIFYING = 2; // byte nextcheckpoint, short recordtime, string recordholder
-const int RACE_NET_CHECKPOINT_HIT_RACE = 3; // byte checkpoint, short delta, byte lapsdelta, string opponent
-const int RACE_NET_CHECKPOINT_HIT_RACE_BY_OPPONENT = 4; // byte checkpoint, short delta, byte lapsdelta, string opponent
-const int RACE_NET_CHECKPOINT_NEXT_SPEC_QUALIFYING = 5; // byte nextcheckpoint, float laptime, short recordtime, string recordholder
-const int RACE_NET_PENALTY_RACE = 6; // byte penaltytime, string reason
-const int RACE_NET_PENALTY_QUALIFYING = 7; // byte penaltytime, string reason
-const int RACE_NET_SERVER_RECORD = 8; // server record, sent to client
-const int RACE_NET_SPEED_AWARD = 9; // speed award, sent to client
-const int RACE_NET_SPEED_AWARD_BEST = 10; // all time best speed award, sent to client
-const int RACE_NET_SERVER_RANKINGS = 11;
-const int RACE_NET_SERVER_STATUS = 12;
 const int RANKINGS_CNT = 15;
 
-REGISTER_NET_LINKED(_ENT_CLIENT_INIT)
-#ifdef CSQC
-NET_HANDLE(_ENT_CLIENT_INIT, bool isnew) { return true; }
-#endif
-/** Sent as a temp entity from a persistent linked entity */
-REGISTER_NET_TEMP(ENT_CLIENT_INIT)
-
-REGISTER_NET_LINKED(ENT_CLIENT_SCORES_INFO)
-REGISTER_NET_LINKED(ENT_CLIENT_SCORES)
-REGISTER_NET_LINKED(ENT_CLIENT_TEAMSCORES)
-REGISTER_NET_LINKED(ENT_CLIENT_NAGGER) // flags [votecalledvote]
-REGISTER_NET_LINKED(ENT_CLIENT_RADARLINK) // flags [startorigin] [endorigin] [startcolor+16*endcolor]
-REGISTER_NET_LINKED(ENT_CLIENT_PROJECTILE)
-REGISTER_NET_LINKED(ENT_CLIENT_MAPVOTE)
-REGISTER_NET_LINKED(ENT_CLIENT_CLIENTDATA)
-REGISTER_NET_LINKED(ENT_CLIENT_RANDOMSEED)
-REGISTER_NET_LINKED(ENT_CLIENT_ACCURACY)
-REGISTER_NET_LINKED(ENT_CLIENT_ELIMINATEDPLAYERS)
-
-REGISTER_NET_LINKED(ENT_CLIENT_MODEL)
-
-REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE)
-REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE_CAMERA)
-REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE_TELEPORTED)
-
-REGISTER_NET_LINKED(ENT_CLIENT_ARC_BEAM)
-REGISTER_NET_LINKED(ENT_CLIENT_HOOK)
-REGISTER_NET_LINKED(ENT_CLIENT_TUBANOTE)
-
-REGISTER_NET_LINKED(ENT_CLIENT_SPAWNPOINT)
-REGISTER_NET_LINKED(ENT_CLIENT_SPAWNEVENT)
-REGISTER_NET_LINKED(ENT_CLIENT_WALL)
-
-const int SPRITERULE_DEFAULT = 0;
-const int SPRITERULE_TEAMPLAY = 1;
-const int SPRITERULE_SPECTATOR = 2;
-
 ///////////////////////////
 // keys pressed
 const int KEY_FORWARD = BIT(0);
@@ -113,99 +30,6 @@ const int HUD_BUMBLEBEE_GUN = 25;
 // # of maps, I'll use arrays for them :P
 const int MAPVOTE_COUNT = 30;
 
-/**
- * Lower scores are better (e.g. suicides)
- */
-const int SFL_LOWER_IS_BETTER = BIT(0);
-
-/**
- * Don't show zero values as scores
- */
-const int SFL_HIDE_ZERO = BIT(1);
-
-/**
- * Allow a column to be hidden (do not automatically add it even if it is a sorting key)
- */
-const int SFL_ALLOW_HIDE = BIT(4);
-
-/**
- * Display as a rank (with st, nd, rd, th suffix)
- */
-const int SFL_RANK = BIT(5);
-
-/**
- * Display as mm:ss.s, value is stored as 10ths of a second (AND 0 is the worst possible value!)
- */
-const int SFL_TIME = BIT(6);
-
-// not an extra constant yet
-#define SFL_ZERO_IS_WORST SFL_TIME
-
-/**
- * Scoring priority (NOTE: PRIMARY is used for fraglimit)
- */
-const int SFL_SORT_PRIO_SECONDARY = 4;
-const int SFL_SORT_PRIO_PRIMARY = 8;
-const int SFL_SORT_PRIO_MASK = 12;
-
-/**
- * Score indices
- */
-#define MAX_SCORE 12
-#define MAX_TEAMSCORE 2
-
-const int ST_SCORE = 0;
-const int SP_KILLS = 0;
-const int SP_DEATHS = 1;
-const int SP_SUICIDES = 2;
-const int SP_SCORE = 3;
-const int SP_DMG = 10;
-const int SP_DMGTAKEN = 11;
-// game mode specific indices are not in common/, but in server/scores_rules.qc!
-
-// WEAPONTODO: move this into separate/new projectile handling code // this sets sounds and other properties of the projectiles in csqc
-const int PROJECTILE_ELECTRO = 1;
-const int PROJECTILE_ROCKET = 2;
-const int PROJECTILE_TAG = 3;
-const int PROJECTILE_CRYLINK = 5;
-const int PROJECTILE_ELECTRO_BEAM = 6;
-const int PROJECTILE_GRENADE = 7;
-const int PROJECTILE_GRENADE_BOUNCING = 8;
-const int PROJECTILE_MINE = 9;
-const int PROJECTILE_BLASTER = 10;
-const int PROJECTILE_HLAC = 11;
-const int PROJECTILE_SEEKER = 12;
-const int PROJECTILE_FLAC = 13;
-const int PROJECTILE_PORTO_RED = 14;
-const int PROJECTILE_PORTO_BLUE = 15;
-const int PROJECTILE_HOOKBOMB = 16;
-const int PROJECTILE_HAGAR = 17;
-const int PROJECTILE_HAGAR_BOUNCING = 18;
-const int PROJECTILE_CRYLINK_BOUNCING = 20;
-const int PROJECTILE_FIREBALL = 21;
-const int PROJECTILE_FIREMINE = 22;
-
-const int PROJECTILE_RAPTORCANNON = 24;
-const int PROJECTILE_RAPTORBOMB = 25;
-const int PROJECTILE_RAPTORBOMBLET = 26;
-const int PROJECTILE_SPIDERROCKET = 27;
-const int PROJECTILE_WAKIROCKET = 28;
-const int PROJECTILE_WAKICANNON = 29;
-
-const int PROJECTILE_BUMBLE_GUN = 30;
-const int PROJECTILE_BUMBLE_BEAM = 31;
-
-const int PROJECTILE_MAGE_SPIKE = 32;
-const int PROJECTILE_SHAMBLER_LIGHTNING = 33;
-
-const int PROJECTILE_ROCKETMINSTA_LASER = 34;
-
-const int PROJECTILE_ARC_BOLT = 35;
-
-// projectile IDs 40-50 reserved
-
-const int PROJECTILE_RPC = 60;
-
 const int SPECIES_HUMAN = 0;
 const int SPECIES_ROBOT_SOLID = 1;
 const int SPECIES_ALIEN = 2;
@@ -217,42 +41,19 @@ const int SPECIES_RESERVED = 15;
 const int FRAGS_PLAYER = 0;
 const int FRAGS_SPECTATOR = -666;
 const int FRAGS_LMS_LOSER = -616;
-const int FRAGS_PLAYER_NONSOLID = -616;
+const int FRAGS_PLAYER_NONSOLID = FRAGS_LMS_LOSER;
 // we can use this frags value for both
 
-// water levels
-const int WATERLEVEL_NONE = 0;
-const int WATERLEVEL_WETFEET = 1;
-const int WATERLEVEL_SWIMMING = 2;
-const int WATERLEVEL_SUBMERGED = 3;
-
 // server flags
 const int SERVERFLAG_ALLOW_FULLBRIGHT = 1;
 const int SERVERFLAG_TEAMPLAY = 2;
 const int SERVERFLAG_PLAYERSTATS = 4;
 
-// FIXME/EXPLAINME: why? Mario: because
-vector autocvar_sv_player_maxs = '16 16 45';
-vector autocvar_sv_player_mins = '-16 -16 -24';
-vector autocvar_sv_player_viewoffset = '0 0 20';
-vector autocvar_sv_player_crouch_maxs = '16 16 25';
-vector autocvar_sv_player_crouch_mins = '-16 -16 -24';
-vector autocvar_sv_player_crouch_viewoffset = '0 0 20';
-vector autocvar_sv_player_headsize = '24 24 12';
-
-
 // a bit more constant
 const vector PL_MAX_CONST = '16 16 45';
 const vector PL_MIN_CONST = '-16 -16 -24';
 
-// spawnpoint prios
-const int SPAWN_PRIO_NEAR_TEAMMATE_FOUND = 200;
-const int SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM = 100;
-const int SPAWN_PRIO_RACE_PREVIOUS_SPAWN = 50;
-const int SPAWN_PRIO_GOOD_DISTANCE = 10;
-
 // gametype vote flags
 const int GTV_FORBIDDEN = 0; // Cannot be voted
 const int GTV_AVAILABLE = 1; // Can be voted
 const int GTV_CUSTOM    = 2; // Custom entry
-#endif