X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fdefs.qh;h=abef67463fc27ef2703f1e95c50e3899e6feb38f;hb=8f4d064a1d62a040e788fc0634baf93e888ba2f6;hp=cb88d354e4087a13d40ddf5473b50bb9ecef754a;hpb=e6b7077f440bdf0d2a1047f3b716a7009090fca6;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index cb88d354e..41e368a0e 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -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 @@ -128,7 +128,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 @@ -149,6 +149,14 @@ float maxclients; .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; @@ -189,6 +197,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 +211,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 +224,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 +244,6 @@ void weapon_defaultspawnfunc(float wpn); string w_deathtypestring; -void(entity client, string s) centerprint_builtin = #73; .vector dest1, dest2; float gameover; @@ -242,8 +254,13 @@ 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 @@ -286,7 +303,6 @@ entity timeoutHandler; //responsible for centerprinting the timeout countdowns a void timeoutHandler_Think(); void evaluateTimeout(); void evaluateTimein(); -string getTimeoutText(float addOneSecond); .float spawnshieldtime; @@ -311,8 +327,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 +340,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 +354,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]; @@ -352,7 +363,6 @@ string gamemode_name; float startitem_failed; void DropFlag(entity flag, entity penalty_receiver, entity attacker); -void DropBall(entity ball, vector org, vector vel); void DropAllRunes(entity pl); @@ -368,10 +378,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 +397,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 +419,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; @@ -429,18 +431,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) @@ -450,24 +460,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; @@ -500,6 +504,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 @@ -603,13 +608,15 @@ 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; .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 @@ -662,3 +669,6 @@ 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;