X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fdefs.qh;h=a0902559f320f240aa63cf4dac5387eecc8630af;hb=3996a6bfe3076469afe4070449bb377ed4064fc4;hp=d7179fafebb703f9c8b2d38ebd426d25cb2a3014;hpb=a89a627ea0a1c8209ea7406910566d259bc8ffb0;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index d7179fafe..c68a161ee 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -2,16 +2,17 @@ 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 -#define BUTTON_ATCK2 button3 -#define BUTTON_ZOOM button4 -#define BUTTON_CROUCH button5 -#define BUTTON_HOOK button6 -#define BUTTON_INFO button7 -#define BUTTON_CHAT buttonchat -#define BUTTON_USE buttonuse -#define BUTTON_DRAG button8 +#define BUTTON_ATCK button0 +#define BUTTON_JUMP button2 +#define BUTTON_ATCK2 button3 +#define BUTTON_ZOOM button4 +#define BUTTON_CROUCH button5 +#define BUTTON_HOOK button6 +#define BUTTON_INFO button7 +#define BUTTON_CHAT buttonchat +#define BUTTON_USE buttonuse +#define BUTTON_DRAG button8 +#define BUTTON_ZOOMSCRIPT button9 // Globals @@ -147,6 +148,7 @@ float maxclients; .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 // weapon animation vectors: .vector anim_fire1; @@ -187,6 +189,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; @@ -200,7 +203,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); @@ -228,7 +236,6 @@ void weapon_defaultspawnfunc(float wpn); string w_deathtypestring; -void(entity client, string s) centerprint_builtin = #73; .vector dest1, dest2; float gameover; @@ -240,7 +247,6 @@ float alreadychangedlevel; .float runes; -.float welcomemessage_time; .float version; // minstagib vars @@ -283,7 +289,6 @@ entity timeoutHandler; //responsible for centerprinting the timeout countdowns a void timeoutHandler_Think(); void evaluateTimeout(); void evaluateTimein(); -string getTimeoutText(float addOneSecond); .float spawnshieldtime; @@ -309,8 +314,9 @@ float default_weapon_alpha; .float() customizeentityforclient; .float cvar_cl_handicap; .float cvar_cl_playerdetailreduction; -.float cvar_scr_centertime; -.float cvar_cl_shownames; +.float cvar_cl_clippedspectating; +.float cvar_cl_movement_track_canjump; + .string cvar_g_xonoticversion; .string cvar_cl_weaponpriority; .string cvar_cl_weaponpriorities[10]; @@ -346,7 +352,6 @@ void AnnounceTo(entity e, string snd); .entity jumppadsused[NUM_JUMPPADSUSED]; string gamemode_name; -float teams_matter; float startitem_failed; @@ -362,24 +367,11 @@ float W_AmmoItemCode(float wpn); float W_WeaponBit(float wpn); string W_Name(float weaponid); -void UpdateSelectedPlayer(); -void ClearSelectedPlayer(); -.entity selected_player; -.entity last_selected_player; -.float selected_player_time; // when this player has been selected -.float selected_player_count; // how long this player has been directly pointed to -.float selected_player_display_needs_update; // are regular updates necessary? (health) -.float selected_player_display_timeout; // when the selection will time out - void FixIntermissionClient(entity e); 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; @@ -399,9 +391,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; @@ -410,7 +399,7 @@ float TemporaryDB; float some_spawn_has_been_used; float have_team_spawns; // 0 = no team spawns requested, -1 = team spawns requested but none found, 1 = team spawns requested and found -float have_noteam_spawns; // 0 = no no-team spawns, 1 = no-team spawns exist +float have_team_spawns_forteam[17]; // 0 = this team has no spawns, 1 = this team has spawns; team 0 is the "no-team" // set when showing a kill countdown .entity killindicator; @@ -424,7 +413,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; @@ -437,18 +425,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) @@ -458,24 +454,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; @@ -508,6 +498,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 @@ -552,6 +543,7 @@ void target_voicescript_clear(entity pl); .string target2; .string target3; .string target4; +.float target_random; .float trigger_reverse; // Nexball @@ -569,10 +561,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; @@ -614,7 +602,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; @@ -658,6 +646,8 @@ string deathmessage; .float nex_charge_rottime; .float nex_chargepool_ammo; +.float hagar_load; + float allowed_to_spawn; // boolean variable used by the clan arena code to determine if a player can spawn (after the round has ended) float serverflags; @@ -669,3 +659,5 @@ float serverflags; .entity muzzle_flash; .float misc_bulletcounter; // replaces uzi & hlac bullet counter. + +void PlayerUseKey();