]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/defs.qh
Merge remote-tracking branch 'origin/master' into samual/updatecommands
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / defs.qh
index f3c754151e87ac719a10ff11bdc9758160b92e66..6c7eaa126ed90c636d05e17d2713e553ca536cf6 100644 (file)
@@ -202,7 +202,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 +215,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 +235,6 @@ void weapon_defaultspawnfunc(float wpn);
 
 string w_deathtypestring;
 
-void(entity client, string s) centerprint_builtin = #73;
 .vector dest1, dest2;
 
 float gameover;
@@ -243,7 +246,6 @@ float alreadychangedlevel;
 .float runes;
 
 
-.float welcomemessage_time;
 .float version;
 
 // minstagib vars
@@ -284,9 +286,6 @@ float orig_slowmo; // contains the value of autocvar_slowmo so that, after timeo
 .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;
 
@@ -312,7 +311,9 @@ 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_movement_track_canjump;
+
 .string cvar_g_xonoticversion;
 .string cvar_cl_weaponpriority;
 .string cvar_cl_weaponpriorities[10];
@@ -348,7 +349,6 @@ void AnnounceTo(entity e, string snd);
 .entity jumppadsused[NUM_JUMPPADSUSED];
 
 string gamemode_name;
-float teams_matter;
 
 float startitem_failed;
 
@@ -369,10 +369,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;
@@ -392,9 +388,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;
@@ -417,7 +410,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;
@@ -430,18 +422,26 @@ float next_pingtime;
 // TODO implemented fall and falling
 #define ALLPLAYERSOUNDS \
                _VOICEMSG(death) \
-               _VOICEMSG(fall) \
                _VOICEMSG(drown) \
+               _VOICEMSG(fall) \
+               _VOICEMSG(fall) \
+               _VOICEMSG(falling) \
                _VOICEMSG(gasp) \
                _VOICEMSG(jump) \
+               _VOICEMSG(pain100) \
                _VOICEMSG(pain25) \
                _VOICEMSG(pain50) \
-               _VOICEMSG(pain75) \
-               _VOICEMSG(pain100)
+               _VOICEMSG(pain75)
+
 #define ALLVOICEMSGS \
                _VOICEMSG(attack) \
                _VOICEMSG(attackinfive) \
+               _VOICEMSG(coverme) \
+               _VOICEMSG(defend) \
+               _VOICEMSG(freelance) \
+               _VOICEMSG(incoming) \
                _VOICEMSG(meet) \
+               _VOICEMSG(needhelp) \
                _VOICEMSG(seenflag) \
                _VOICEMSG(taunt) \
                _VOICEMSG(teamshoot)
@@ -451,24 +451,18 @@ ALLPLAYERSOUNDS
 ALLVOICEMSGS
 #undef _VOICEMSG
 
-// reserved sound names for the future (models lack sounds for them):
+// reserved sound names for the future (some models lack sounds for them):
+//             _VOICEMSG(flagcarriertakingdamage) \
+//             _VOICEMSG(getflag) \
+// reserved sound names for the future (ALL models lack sounds for them):
 //             _VOICEMSG(affirmative) \
 //             _VOICEMSG(attacking) \
 //             _VOICEMSG(defending) \
 //             _VOICEMSG(roaming) \
 //             _VOICEMSG(onmyway) \
 //             _VOICEMSG(droppedflag) \
-//             _VOICEMSG(flagcarriertakingdamage) \
 //             _VOICEMSG(negative) \
 //             _VOICEMSG(seenenemy) \
-//             _VOICEMSG(fall) \
-//             _VOICEMSG(getflag) \
-//             _VOICEMSG(incoming) \
-//             _VOICEMSG(coverme) \
-//             _VOICEMSG(needhelp) \
-//             _VOICEMSG(defend) \
-//             _VOICEMSG(freelance) \
-//             _VOICEMSG(falling) \
 
 string globalsound_fall;
 string globalsound_metalfall;
@@ -501,6 +495,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
@@ -545,6 +540,7 @@ void target_voicescript_clear(entity pl);
 .string target2;
 .string target3;
 .string target4;
+.float target_random;
 .float trigger_reverse;
 
 // Nexball 
@@ -562,10 +558,6 @@ void ClientData_Touch(entity e);
 
 vector debug_shotorg; // if non-zero, overrides the shot origin of all weapons
 
-// the QC VM sucks
-#define BITXOR(v,b)        ((v) + (b) - 2 * ((v) & (b)))
-#define BITXOR_ASSIGN(v,b) ((v) += ((b) - 2 * ((v) & (b))))
-
 .float wasplayer;
 
 float servertime, serverprevtime, serverframetime;
@@ -607,7 +599,7 @@ float client_cefc_accumulatortime;
 
 ..float current_ammo;
 
-.float weapon_load[WEP_MAXCOUNT]; FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(weapon_load);
+.float weapon_load[WEP_MAXCOUNT];
 .float ammo_none; // used by the reloading system, must always be 0
 .float clip_load;
 .float old_clip_load;
@@ -664,3 +656,5 @@ float serverflags;
 
 .entity muzzle_flash;
 .float misc_bulletcounter;     // replaces uzi & hlac bullet counter.
+
+void PlayerUseKey();