]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/defs.qh
Merge remote branch 'origin/master' into samual/mutator_ctf
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / defs.qh
index 6d322acc5a4c7bf687bab4b37d1aa03258bc45ca..4a0b5ad8cc253c7440c60faf006d65b76e179452 100644 (file)
@@ -1,6 +1,6 @@
 #define INDEPENDENT_ATTACK_FINISHED
 
-float require_spawnfunc_prefix; // if this float exists, only functions with spawnfunc_ name prefix qualify as spawn functions
+noref float require_spawnfunc_prefix; // if this float exists, only functions with spawnfunc_ name prefix qualify as spawn functions
 
 #define BUTTON_ATCK       button0
 #define BUTTON_JUMP       button2
@@ -18,23 +18,23 @@ float require_spawnfunc_prefix; // if this float exists, only functions with spa
 
 float ctf_ReadScore(string parameter); // SOON WON'T BE NEEDED. // FIXCTF
 
-float g_dm, g_domination, g_ctf, g_tdm, g_keyhunt, g_onslaught, g_assault, g_arena, g_ca, g_lms, g_runematch, g_race, g_nexball, g_cts, g_freezetag, g_keepaway;
 float g_cloaked, g_footsteps, g_jump_grunt, g_grappling_hook, g_midair, g_minstagib, g_pinata, g_norecoil, g_minstagib_invis_alpha, g_bloodloss;
 float g_warmup_limit;
 float g_warmup_allguns;
 float g_warmup_allow_timeout;
-float g_ctf_win_mode;
 float g_ctf_ignore_frags;
 float g_ctf_reverse;
 float g_race_qualifying;
 float inWarmupStage;
 float g_pickup_respawntime_weapon;
+float g_pickup_respawntime_superweapon;
 float g_pickup_respawntime_ammo;
 float g_pickup_respawntime_short;
 float g_pickup_respawntime_medium;
 float g_pickup_respawntime_long;
 float g_pickup_respawntime_powerup;
 float g_pickup_respawntimejitter_weapon;
+float g_pickup_respawntimejitter_superweapon;
 float g_pickup_respawntimejitter_ammo;
 float g_pickup_respawntimejitter_short;
 float g_pickup_respawntimejitter_medium;
@@ -91,9 +91,8 @@ float maxclients;
 .float  crouch;        // Crouching or not?
 
 .float strength_finished;
-//.float       speed_finished;
 .float invincible_finished;
-//.float       slowmo_finished;
+.float superweapons_finished;
 
 .vector                finaldest, finalangle;          //plat.qc stuff
 .void()                think1;
@@ -106,8 +105,8 @@ float maxclients;
 //.float cnt2;
 
 .float play_time;
+.float respawn_time;
 .float death_time;
-.float dead_frame;
 .float fade_time;
 .float fade_rate;
 
@@ -128,7 +127,7 @@ float maxclients;
 .vector anim_die1; // player dies
 .vector anim_die2; // player dies differently
 .vector anim_draw; // player pulls out a weapon
-.vector anim_duck; // player crouches (from idle to duckidle)
+// .vector anim_duck; // player crouches (from idle to duckidle)
 .vector anim_duckwalk; // player walking while crouching
 .vector anim_duckjump; // player jumping from a crouch
 .vector anim_duckidle; // player idling while crouching
@@ -142,13 +141,21 @@ float maxclients;
 .vector anim_runbackwards; // player running backward
 .vector anim_strafeleft; // player shuffling left quickly
 .vector anim_straferight; // player shuffling right quickly
-.vector anim_dead1; // player dead (must be identical to last frame of die1)
-.vector anim_dead2; // player dead (must be identical to last frame of die2)
+//.vector anim_dead1; // player dead (must be identical to last frame of die1)
+//.vector anim_dead2; // player dead (must be identical to last frame of die2)
 .vector anim_forwardright; // player running forward and right
 .vector anim_forwardleft; // player running forward and left
 .vector anim_backright; // player running backward and right
 .vector anim_backleft; // player running back and left
 .vector anim_melee; // player doing the melee action
+.vector anim_duck; // player doing the melee action
+.vector anim_duckwalkbackwards;
+.vector anim_duckwalkstrafeleft;
+.vector anim_duckwalkstraferight;
+.vector anim_duckwalkforwardright;
+.vector anim_duckwalkforwardleft;
+.vector anim_duckwalkbackright;
+.vector anim_duckwalkbackleft;
 
 // weapon animation vectors:
 .vector anim_fire1;
@@ -171,6 +178,9 @@ void setanim(entity e, vector anim, float looping, float override, float restart
 //.float       chasecam;
 
 .float damageforcescale;
+#define MIN_DAMAGEEXTRARADIUS 2
+#define MAX_DAMAGEEXTRARADIUS 16
+.float damageextraradius;
 
 //.float          gravity;
 
@@ -189,6 +199,7 @@ void setanim(entity e, vector anim, float looping, float override, float restart
 
 .float watersound_finished;
 .float iscreature;
+.float damagedbycontents;
 .vector oldvelocity;
 
 .float pauseregen_finished;
@@ -202,7 +213,12 @@ void setanim(entity e, vector anim, float looping, float override, float restart
 .entity weaponentity;
 .entity exteriorweaponentity;
 .vector weaponentity_glowmod;
-.float switchweapon;
+
+//.float weapon; // current weapon
+.float switchweapon; // weapon requested to switch to
+.float switchingweapon; // weapon currently being switched to (is copied from switchweapon once switch is possible)
+.string weaponname; // name of .weapon
+
 .float autoswitch;
 float weapon_action(float wpn, float wrequest);
 float client_hasweapon(entity cl, float wpn, float andammo, float complain);
@@ -210,7 +226,6 @@ void w_clear();
 void w_ready();
 // VorteX: standalone think for weapons, so normal think on weaponentity can be reserved by weaponflashes (which needs update even player dies)
 .float weapon_nextthink;
-.float weapon_forbidchange;
 .void() weapon_think;
 
 //float        PLAYER_WEAPONSELECTION_DELAY = );
@@ -231,7 +246,6 @@ void weapon_defaultspawnfunc(float wpn);
 
 string w_deathtypestring;
 
-void(entity client, string s) centerprint_builtin = #73;
 .vector dest1, dest2;
 
 float gameover;
@@ -242,12 +256,14 @@ float alreadychangedlevel;
 
 .float runes;
 
+// Keys player is holding
+.float itemkeys;
+// message delay for func_door locked by keys and key locks
+// this field is used on player entities
+.float key_door_messagetime;
 
-.float welcomemessage_time;
-.float version;
 
-// minstagib vars
-.float jump_interval;    // laser refire
+.float version;
 
 //swamp
 .float in_swamp;              // bool
@@ -256,11 +272,6 @@ float alreadychangedlevel;
 // footstep interval
 .float nextstep;
 
-.float ready;
-#define RESTART_COUNTDOWN 10
-float restart_mapalreadyrestarted; //bool, indicates whether reset_map() was already executed
-entity restartTimer;
-void restartTimer_Think();
 float blockSpectators; //if set, new or existing spectators or observers will be removed unless they become a player within g_maxplayers_spectator_blocktime seconds
 .float spectatortime; //point in time since the client is spectating or observing
 void checkSpectatorBlock();
@@ -272,22 +283,6 @@ void checkSpectatorBlock();
 float nJoinAllowed(float includeMe);
 #define PREVENT_JOIN_TEXT "^1You may not join the game at this time.\n\nThe player limit reached maximum capacity."
 
-//sv_timeout: pauses the game by setting the gamespeed to a really low value (see TIMEOUT_SLOWMO_VALUE)
-#define TIMEOUT_SLOWMO_VALUE 0.0001
-float sys_frametime; // gets initialised in worlspawn, saves the value from autocvar_sys_ticrate
-float remainingTimeoutTime; // contains the time in seconds that the active timeout has left
-float remainingLeadTime; // contains the number of seconds left of the leadtime (before the timeout starts)
-float timeoutStatus; // (values: 0, 1, 2) contains whether a timeout is not active (0), was called but still at leadtime (1) or is active (2)
-.float allowedTimeouts; // contains the number of allowed timeouts for each player
-entity timeoutInitiator; // contains the entity of the player who started the last timeout
-float orig_slowmo; // contains the value of autocvar_slowmo so that, after timeout finished, it isn't set to slowmo 1 necessarily
-.vector lastV_angle; //used when pausing the game in order to force the player to keep his old view angle fixed
-entity timeoutHandler; //responsible for centerprinting the timeout countdowns and playing sounds
-void timeoutHandler_Think();
-void evaluateTimeout();
-void evaluateTimein();
-string getTimeoutText(float addOneSecond);
-
 .float spawnshieldtime;
 
 .float lms_nextcheck;
@@ -311,8 +306,11 @@ float default_weapon_alpha;
 
 .float() customizeentityforclient;
 .float cvar_cl_handicap;
-.float cvar_cl_playerdetailreduction;
-.float cvar_scr_centertime;
+.float cvar_cl_clippedspectating;
+.float cvar_cl_autoscreenshot;
+.float cvar_cl_movement_track_canjump;
+.float cvar_cl_newusekeysupported;
+
 .string cvar_g_xonoticversion;
 .string cvar_cl_weaponpriority;
 .string cvar_cl_weaponpriorities[10];
@@ -321,8 +319,6 @@ float default_weapon_alpha;
 .float cvar_cl_forceplayermodelsfromxonotic;
 float sv_clforceplayermodels;
 #endif
-float sv_loddistance1;
-float sv_loddistance2;
 .float cvar_cl_gunalign;
 .float cvar_cl_noantilag;
 
@@ -337,12 +333,6 @@ void AnnounceTo(entity e, string snd);
 
 .float version_nagtime;
 
-.float modelindex_lod0;
-.float modelindex_lod0_from_xonotic;
-.float skinindex;
-.float modelindex_lod1;
-.float modelindex_lod2;
-
 #define NUM_JUMPPADSUSED 3
 .float jumppadcount;
 .entity jumppadsused[NUM_JUMPPADSUSED];
@@ -368,10 +358,6 @@ void FixClientCvars(entity e);
 
 float weaponsInMap;
 
-void centerprint_atprio(entity e, float prio, string s);
-void centerprint_expire(entity e, float prio);
-void centerprint(entity e, string s);
-
 .float respawn_countdown; // next number to count
 
 float bot_waypoints_for_items;
@@ -391,9 +377,6 @@ float assault_attacker_team;
 // speedrun: when 1, player auto teleports back when capture timeout happens
 .float speedrunning;
 
-// Q3 support
-float q3acompat_machineshotgunswap;
-
 // database
 float ServerProgsDB;
 float TemporaryDB;
@@ -416,7 +399,6 @@ float lockteams;
 float sv_maxidle;
 float sv_maxidle_spectatorsareidle;
 
-float sv_pogostick;
 float tracebox_hits_trigger_hurt(vector start, vector mi, vector ma, vector end);
 
 float next_pingtime;
@@ -502,6 +484,7 @@ float GetPlayerSoundSampleField_notFound;
 .float version_mismatch;
 
 float independent_players;
+#define INDEPENDENT_PLAYERS (autocvar__independent_players ? (autocvar__independent_players > 0) : independent_players)
 #define IS_INDEPENDENT_PLAYER(e) ((e).solid == SOLID_TRIGGER)
 #define MAKE_INDEPENDENT_PLAYER(e) (((e).solid = SOLID_TRIGGER) + ((e).frags = FRAGS_PLAYER_NONSOLID))
 // we're using + here instead of , because fteqcc sucks
@@ -612,6 +595,8 @@ float client_cefc_accumulatortime;
 .float clip_size;
 .float minelayer_mines;
 
+.float grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab
+
 #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE
 // when doing this, hagar can go through clones
 // #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_BBOX
@@ -664,3 +649,8 @@ float serverflags;
 .float misc_bulletcounter;     // replaces uzi & hlac bullet counter.
 
 void PlayerUseKey();
+
+typedef vector(entity player, entity spot, vector current) spawn_evalfunc_t;
+.spawn_evalfunc_t spawn_evalfunc;
+
+.entity conveyor;