From: Samual Lenks Date: Mon, 1 Jul 2013 23:20:39 +0000 (-0400) Subject: Make it compile now (ARGH I HATE OUR PROGS.SRC SET UP) X-Git-Tag: xonotic-v0.8.0~152^2~337 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7107d0729f68145f8d73a8d1f85ff9430d9f8829;p=xonotic%2Fxonotic-data.pk3dir.git Make it compile now (ARGH I HATE OUR PROGS.SRC SET UP) --- diff --git a/qcsrc/client/progs.src b/qcsrc/client/progs.src index d9cd16ead..d0c503b12 100644 --- a/qcsrc/client/progs.src +++ b/qcsrc/client/progs.src @@ -58,6 +58,7 @@ player_skeleton.qh sortlist.qc miscfunctions.qc +../server/t_items.qh ../server/t_items.qc teamradar.qc diff --git a/qcsrc/common/weapons/w_crylink.qc b/qcsrc/common/weapons/w_crylink.qc index b29293148..523e498fb 100644 --- a/qcsrc/common/weapons/w_crylink.qc +++ b/qcsrc/common/weapons/w_crylink.qc @@ -45,7 +45,6 @@ REGISTER_WEAPON( #ifdef SVQC CRYLINK_SETTINGS(crylink) -void spawnfunc_weapon_crylink() { weapon_defaultspawnfunc(WEP_CRYLINK); } .float gravity; .float crylink_waitrelease; .entity crylink_lastgroup; @@ -55,6 +54,7 @@ void spawnfunc_weapon_crylink() { weapon_defaultspawnfunc(WEP_CRYLINK); } #endif #else #ifdef SVQC +void spawnfunc_weapon_crylink() { weapon_defaultspawnfunc(WEP_CRYLINK); } void W_Crylink_CheckLinks(entity e) { diff --git a/qcsrc/common/weapons/w_fireball.qc b/qcsrc/common/weapons/w_fireball.qc index fc8e88ab5..c547b8c63 100644 --- a/qcsrc/common/weapons/w_fireball.qc +++ b/qcsrc/common/weapons/w_fireball.qc @@ -38,14 +38,13 @@ REGISTER_WEAPON( #ifdef SVQC FIREBALL_SETTINGS(fireball) -void spawnfunc_weapon_fireball() { weapon_defaultspawnfunc(WEP_FIREBALL); } - .float bot_primary_fireballmooth; // whatever a mooth is .vector fireball_impactvec; .float fireball_primarytime; #endif #else #ifdef SVQC +void spawnfunc_weapon_fireball() { weapon_defaultspawnfunc(WEP_FIREBALL); } void W_Fireball_Explode (void) { diff --git a/qcsrc/common/weapons/w_hagar.qc b/qcsrc/common/weapons/w_hagar.qc index 814efeb26..1916b5697 100644 --- a/qcsrc/common/weapons/w_hagar.qc +++ b/qcsrc/common/weapons/w_hagar.qc @@ -43,10 +43,10 @@ REGISTER_WEAPON( #ifdef SVQC HAGAR_SETTINGS(hagar) -void spawnfunc_weapon_hagar() { weapon_defaultspawnfunc(WEP_HAGAR); } #endif #else #ifdef SVQC +void spawnfunc_weapon_hagar() { weapon_defaultspawnfunc(WEP_HAGAR); } // NO bounce protection, as bounces are limited! diff --git a/qcsrc/common/weapons/w_hlac.qc b/qcsrc/common/weapons/w_hlac.qc index 1381e1068..c860c8e5d 100644 --- a/qcsrc/common/weapons/w_hlac.qc +++ b/qcsrc/common/weapons/w_hlac.qc @@ -35,10 +35,10 @@ REGISTER_WEAPON( #ifdef SVQC HLAC_SETTINGS(hlac) -void spawnfunc_weapon_hlac() { weapon_defaultspawnfunc(WEP_HLAC); } #endif #else #ifdef SVQC +void spawnfunc_weapon_hlac() { weapon_defaultspawnfunc(WEP_HLAC); } void W_HLAC_Touch (void) { diff --git a/qcsrc/common/weapons/w_minelayer.qc b/qcsrc/common/weapons/w_minelayer.qc index 46f75bce0..8ac784f0b 100644 --- a/qcsrc/common/weapons/w_minelayer.qc +++ b/qcsrc/common/weapons/w_minelayer.qc @@ -40,8 +40,6 @@ REGISTER_WEAPON( #ifdef SVQC MINELAYER_SETTINGS(minelayer) -void spawnfunc_weapon_minelayer() { weapon_defaultspawnfunc(WEP_MINE_LAYER); } - void W_Mine_Think (void); .float minelayer_detonate, mine_explodeanyway; .float mine_time; @@ -49,6 +47,7 @@ void W_Mine_Think (void); #endif #else #ifdef SVQC +void spawnfunc_weapon_minelayer() { weapon_defaultspawnfunc(WEP_MINE_LAYER); } void W_Mine_Stick (entity to) { diff --git a/qcsrc/common/weapons/w_minstanex.qc b/qcsrc/common/weapons/w_minstanex.qc index 37d9b8efe..b218dc294 100644 --- a/qcsrc/common/weapons/w_minstanex.qc +++ b/qcsrc/common/weapons/w_minstanex.qc @@ -12,15 +12,12 @@ REGISTER_WEAPON( ); #ifdef SVQC -void spawnfunc_weapon_minstanex (void) -{ - weapon_defaultspawnfunc(WEP_MINSTANEX); -} +.float minstanex_lasthit; +.float jump_interval; #endif #else #ifdef SVQC -.float minstanex_lasthit; -.float jump_interval; +void spawnfunc_weapon_minstanex (void) { weapon_defaultspawnfunc(WEP_MINSTANEX); } void W_MinstaNex_Attack (void) { diff --git a/qcsrc/common/weapons/w_nex.qc b/qcsrc/common/weapons/w_nex.qc index 684622d9d..26c951064 100644 --- a/qcsrc/common/weapons/w_nex.qc +++ b/qcsrc/common/weapons/w_nex.qc @@ -44,10 +44,10 @@ REGISTER_WEAPON( #ifdef SVQC NEX_SETTINGS(nex) -void spawnfunc_weapon_nex (void) { weapon_defaultspawnfunc(WEP_NEX); } #endif #else #ifdef SVQC +void spawnfunc_weapon_nex (void) { weapon_defaultspawnfunc(WEP_NEX); } void SendCSQCNexBeamParticle(float charge) { vector v; diff --git a/qcsrc/common/weapons/w_porto.qc b/qcsrc/common/weapons/w_porto.qc index b1618595a..5625a40a1 100644 --- a/qcsrc/common/weapons/w_porto.qc +++ b/qcsrc/common/weapons/w_porto.qc @@ -24,8 +24,6 @@ REGISTER_WEAPON( #ifdef SVQC PORTO_SETTINGS(porto) -void spawnfunc_weapon_porto (void) { weapon_defaultspawnfunc(WEP_PORTO); } - .entity porto_current; .vector porto_v_angle; // holds "held" view angles .float porto_v_angle_held; @@ -33,6 +31,7 @@ void spawnfunc_weapon_porto (void) { weapon_defaultspawnfunc(WEP_PORTO); } #endif #else #ifdef SVQC +void spawnfunc_weapon_porto (void) { weapon_defaultspawnfunc(WEP_PORTO); } void W_Porto_Success (void) { diff --git a/qcsrc/common/weapons/w_rifle.qc b/qcsrc/common/weapons/w_rifle.qc index 869aadac6..b984c804c 100644 --- a/qcsrc/common/weapons/w_rifle.qc +++ b/qcsrc/common/weapons/w_rifle.qc @@ -35,16 +35,13 @@ REGISTER_WEAPON( #ifdef SVQC RIFLE_SETTINGS(rifle) -void spawnfunc_weapon_rifle (void) { weapon_defaultspawnfunc(WEP_RIFLE); } - -// compatibility aliases -void spawnfunc_weapon_campingrifle (void) { spawnfunc_weapon_rifle(); } -void spawnfunc_weapon_sniperrifle (void) { spawnfunc_weapon_rifle(); } - .float rifle_accumulator; #endif #else #ifdef SVQC +void spawnfunc_weapon_rifle (void) { weapon_defaultspawnfunc(WEP_RIFLE); } +void spawnfunc_weapon_campingrifle (void) { spawnfunc_weapon_rifle(); } +void spawnfunc_weapon_sniperrifle (void) { spawnfunc_weapon_rifle(); } void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSpeed, float pLifetime, float pAmmo, float deathtype, float pBulletConstant, float pTracer, float pShots, string pSound) { diff --git a/qcsrc/common/weapons/w_seeker.qc b/qcsrc/common/weapons/w_seeker.qc index a1627f97c..52d9931cb 100644 --- a/qcsrc/common/weapons/w_seeker.qc +++ b/qcsrc/common/weapons/w_seeker.qc @@ -60,13 +60,12 @@ REGISTER_WEAPON( #ifdef SVQC SEEKER_SETTINGS(seeker) -void spawnfunc_weapon_seeker (void) { weapon_defaultspawnfunc(WEP_SEEKER); } - .entity tag_target, wps_tag_tracker; .float tag_time; #endif #else #ifdef SVQC +void spawnfunc_weapon_seeker (void) { weapon_defaultspawnfunc(WEP_SEEKER); } // ============================ // Begin: Missile functions, these are general functions to be manipulated by other code @@ -578,10 +577,6 @@ void Seeker_Fire_Tag() // ============================ // Begin: Genereal weapon functions // ============================ -void spawnfunc_weapon_seeker (void) -{ - weapon_defaultspawnfunc(WEP_SEEKER); -} float w_seeker(float req) { diff --git a/qcsrc/common/weapons/w_tuba.qc b/qcsrc/common/weapons/w_tuba.qc index 514397016..8d095787b 100644 --- a/qcsrc/common/weapons/w_tuba.qc +++ b/qcsrc/common/weapons/w_tuba.qc @@ -26,8 +26,6 @@ REGISTER_WEAPON( #ifdef SVQC TUBA_SETTINGS(tuba) -void spawnfunc_weapon_tuba (void) { weapon_defaultspawnfunc(WEP_TUBA); } - .entity tuba_note; .float tuba_smoketime; .float tuba_instrument; @@ -39,6 +37,7 @@ void spawnfunc_weapon_tuba (void) { weapon_defaultspawnfunc(WEP_TUBA); } #endif #else #ifdef SVQC +void spawnfunc_weapon_tuba (void) { weapon_defaultspawnfunc(WEP_TUBA); } float W_Tuba_HasPlayed(entity pl, string melody, float instrument, float ignorepitch, float mintempo, float maxtempo) { diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 057cc92cb..f2cd6721e 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -1,6 +1,3 @@ -.entity accuracy; -.float accuracy_frags[WEP_MAXCOUNT]; - float weaponstats_buffer; void WeaponStats_Init() diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index f6ece6e92..cf99e9ac0 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -555,9 +555,6 @@ string deathmessage; .float just_joined; -.float cvar_cl_accuracy_data_share; -.float cvar_cl_accuracy_data_receive; - .float cvar_cl_weaponimpulsemode; .float selectweapon; // last selected weapon of the player diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index fd9520fe8..10a7c9943 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -458,7 +458,6 @@ void GetCvars_handleFloatOnce(string thisname, float f, .float field, string nam stuffcmd(self, strcat("cl_cmd sendcvar ", name, "\n")); } } -float w_getbestweapon(entity e); // WEAPONTODO string W_FixWeaponOrder_ForceComplete_AndBuildImpulseList(string wo) { string o; diff --git a/qcsrc/server/progs.src b/qcsrc/server/progs.src index ff1944c1b..4d3f965df 100644 --- a/qcsrc/server/progs.src +++ b/qcsrc/server/progs.src @@ -11,15 +11,11 @@ sys-post.qh ../warpzonelib/common.qh ../warpzonelib/util_server.qh ../warpzonelib/server.qh - ../common/constants.qh ../common/teams.qh ../common/util.qh ../common/test.qh ../common/counting.qh -weapons/cl_weapons.qh -../common/weapons/config.qh -../common/weapons/weapons.qh // WEAPONTODO ../common/urllib.qh ../common/command/markup.qh ../common/command/rpn.qh @@ -28,6 +24,20 @@ weapons/cl_weapons.qh ../common/net_notice.qh ../common/animdecide.qh +../common/weapons/config.qh +../common/weapons/weapons.qh // TODO +weapons/accuracy.qh +weapons/common.qh +weapons/csqcprojectile.qh // TODO +weapons/hitplot.qh +weapons/selection.qh +weapons/spawning.qh +weapons/throwing.qh +weapons/tracing.qh +weapons/weaponsystem.qh + +t_items.qh + autocvars.qh constants.qh defs.qh // Should rename this, it has fields and globals @@ -64,9 +74,7 @@ command/getreplies.qh command/cmd.qh command/sv_cmd.qh -weapons/hitplot.qh -weapons/accuracy.qh -weapons/csqcprojectile.qh // TODO + ../common/csqcmodel_settings.qh ../csqcmodellib/common.qh ../csqcmodellib/sv_model.qh @@ -139,15 +147,19 @@ g_models.qc item_key.qc secret.qc -weapons/hitplot.qc -weapons/main.qc +weapons/accuracy.qc weapons/common.qc weapons/csqcprojectile.qc // TODO +weapons/hitplot.qc +weapons/selection.qc +weapons/spawning.qc +weapons/throwing.qc +weapons/tracing.qc +weapons/weaponsystem.qc ../common/weapons/config.qc ../common/weapons/weapons.qc // TODO t_items.qc -weapons/cl_weapons.qc // TODO cl_impulse.qc ent_cs.qc @@ -157,8 +169,6 @@ cl_client.qc t_plats.qc antilag.qc -weapons/accuracy.qc // TODO - //ctf.qc //domination.qc //mode_onslaught.qc diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 5b87bc07f..6c1b8f5e2 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -1,32 +1,4 @@ -#define ISF_LOCATION 2 -#define ISF_MODEL 4 -#define ISF_STATUS 8 - #define ITS_STAYWEP 1 - #define ITS_ANIMATE1 2 - #define ITS_ANIMATE2 4 - #define ITS_AVAILABLE 8 - #define ITS_ALLOWFB 16 - #define ITS_ALLOWSI 32 - #define ITS_POWERUP 64 -#define ISF_COLORMAP 16 -#define ISF_DROP 32 -#define ISF_ANGLES 64 - -.float ItemStatus; - #ifdef CSQC - -var float autocvar_cl_animate_items = 1; -var float autocvar_cl_ghost_items = 0.45; -var vector autocvar_cl_ghost_items_color = '-1 -1 -1'; -var float autocvar_cl_fullbright_items = 0; -var vector autocvar_cl_weapon_stay_color = '2 0.5 0.5'; -var float autocvar_cl_weapon_stay_alpha = 0.75; -var float autocvar_cl_simple_items = 0; -var string autocvr_cl_simpleitems_postfix = "_simple"; -.float spawntime; -.float gravity; -.vector colormod; void ItemDraw() { if(self.gravity) @@ -216,7 +188,6 @@ void ItemRead(float _IsNew) #endif #ifdef SVQC -float autocvar_sv_simple_items; float ItemSend(entity to, float sf) { if(self.gravity) @@ -297,13 +268,6 @@ float have_pickup_item(void) return TRUE; } -#define ITEM_RESPAWN_TICKS 10 - -#define ITEM_RESPAWNTIME(i) ((i).respawntime + crandom() * (i).respawntimejitter) - // range: respawntime - respawntimejitter .. respawntime + respawntimejitter -#define ITEM_RESPAWNTIME_INITIAL(i) (ITEM_RESPAWN_TICKS + random() * ((i).respawntime + (i).respawntimejitter - ITEM_RESPAWN_TICKS)) - // range: 10 .. respawntime + respawntimejitter - floatfield Item_CounterField(float it) { switch(it) @@ -346,8 +310,6 @@ string Item_CounterFieldName(float it) #endif } -.float max_armorvalue; -.float pickup_anyway; /* float Item_Customize() { @@ -539,10 +501,6 @@ void Item_ScheduleInitialRespawn(entity e) Item_ScheduleRespawnIn(e, game_starttime - time + ITEM_RESPAWNTIME_INITIAL(e)); } -float ITEM_MODE_NONE = 0; -float ITEM_MODE_HEALTH = 1; -float ITEM_MODE_ARMOR = 2; -float ITEM_MODE_FUEL = 3; float Item_GiveAmmoTo(entity item, entity player, .float ammofield, float ammomax, float mode) { if (!item.ammofield) @@ -925,7 +883,6 @@ void Item_Damage(entity inflictor, entity attacker, float damage, float deathtyp RemoveItem(); } -.float is_item; void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, float defaultrespawntimejitter, string itemname, float itemid, float weaponid, float itemflags, float(entity player, entity item) pickupevalfunc, float pickupbasevalue) { startitem_failed = FALSE; @@ -1302,7 +1259,6 @@ void spawnfunc_item_invincible (void) { // compatibility: void spawnfunc_item_quad (void) {self.classname = "item_strength";spawnfunc_item_strength();} -float GiveItems(entity e, float beginarg, float endarg); void target_items_use (void) { if(activator.classname == "droppedweapon") @@ -1485,13 +1441,6 @@ void spawnfunc_item_jetpack(void) StartItem ("models/items/g_jetpack.md3", "misc/itempickup.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup, "Jet pack", IT_JETPACK, 0, FL_POWERUP, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW); } - -#define OP_SET 0 -#define OP_MIN 1 -#define OP_MAX 2 -#define OP_PLUS 3 -#define OP_MINUS 4 - float GiveWeapon(entity e, float wpn, float op, float val) { float v0, v1; @@ -1602,13 +1551,6 @@ void GiveRot(entity e, float v0, float v1, .float rotfield, float rottime, .floa e.regenfield = max(e.regenfield, time + regentime); } -#define PREGIVE_WEAPONS(e) WEPSET_DECLARE_A(save_weapons); WEPSET_COPY_AE(save_weapons, e) -#define PREGIVE(e,f) float save_##f; save_##f = (e).f -#define POSTGIVE_WEAPON(e,b,snd_incr,snd_decr) GiveSound((e), WEPSET_CONTAINS_AW(save_weapons, b), WEPSET_CONTAINS_EW(e, b), 0, snd_incr, snd_decr) -#define POSTGIVE_BIT(e,f,b,snd_incr,snd_decr) GiveSound((e), save_##f & (b), (e).f & (b), 0, snd_incr, snd_decr) -#define POSTGIVE_VALUE(e,f,t,snd_incr,snd_decr) GiveSound((e), save_##f, (e).f, t, snd_incr, snd_decr) -#define POSTGIVE_VALUE_ROT(e,f,t,rotfield,rottime,regenfield,regentime,snd_incr,snd_decr) GiveRot((e), save_##f, (e).f, rotfield, rottime, regenfield, regentime); GiveSound((e), save_##f, (e).f, t, snd_incr, snd_decr) - float GiveItems(entity e, float beginarg, float endarg) { float got, i, j, val, op; diff --git a/qcsrc/server/t_items.qh b/qcsrc/server/t_items.qh new file mode 100644 index 000000000..89bbbc5d1 --- /dev/null +++ b/qcsrc/server/t_items.qh @@ -0,0 +1,125 @@ +#define ISF_LOCATION 2 +#define ISF_MODEL 4 +#define ISF_STATUS 8 + #define ITS_STAYWEP 1 + #define ITS_ANIMATE1 2 + #define ITS_ANIMATE2 4 + #define ITS_AVAILABLE 8 + #define ITS_ALLOWFB 16 + #define ITS_ALLOWSI 32 + #define ITS_POWERUP 64 +#define ISF_COLORMAP 16 +#define ISF_DROP 32 +#define ISF_ANGLES 64 + +.float ItemStatus; + +#ifdef CSQC + +var float autocvar_cl_animate_items = 1; +var float autocvar_cl_ghost_items = 0.45; +var vector autocvar_cl_ghost_items_color = '-1 -1 -1'; +var float autocvar_cl_fullbright_items = 0; +var vector autocvar_cl_weapon_stay_color = '2 0.5 0.5'; +var float autocvar_cl_weapon_stay_alpha = 0.75; +var float autocvar_cl_simple_items = 0; +var string autocvr_cl_simpleitems_postfix = "_simple"; +.float spawntime; +.float gravity; +.vector colormod; +void ItemDraw(); + +void ItemDrawSimple(); + +void ItemRead(float _IsNew); + +#endif + +#ifdef SVQC +float autocvar_sv_simple_items; +float ItemSend(entity to, float sf); + + +float have_pickup_item(void); + +#define ITEM_RESPAWN_TICKS 10 + +#define ITEM_RESPAWNTIME(i) ((i).respawntime + crandom() * (i).respawntimejitter) + // range: respawntime - respawntimejitter .. respawntime + respawntimejitter +#define ITEM_RESPAWNTIME_INITIAL(i) (ITEM_RESPAWN_TICKS + random() * ((i).respawntime + (i).respawntimejitter - ITEM_RESPAWN_TICKS)) + // range: 10 .. respawntime + respawntimejitter + +string Item_CounterFieldName(float it); + +.float max_armorvalue; +.float pickup_anyway; + +void Item_Show (entity e, float mode); + +void Item_Respawn (void); + +void Item_RespawnCountdown (void); +void Item_ScheduleRespawnIn(entity e, float t); + +void Item_ScheduleRespawn(entity e); + +void Item_ScheduleInitialRespawn(entity e); +float ITEM_MODE_NONE = 0; +float ITEM_MODE_HEALTH = 1; +float ITEM_MODE_ARMOR = 2; +float ITEM_MODE_FUEL = 3; +float Item_GiveAmmoTo(entity item, entity player, .float ammofield, float ammomax, float mode); + +float Item_GiveTo(entity item, entity player); + +void Item_Touch (void); + +void Item_Reset(); + +void Item_FindTeam(); +// Savage: used for item garbage-collection +// TODO: perhaps nice special effect? +void RemoveItem(void); // WEAPONTODO + +// pickup evaluation functions +// these functions decide how desirable an item is to the bots + +float generic_pickupevalfunc(entity player, entity item);// {return item.bot_pickupbasevalue;} // WEAPONTODO + +float weapon_pickupevalfunc(entity player, entity item); + +float commodity_pickupevalfunc(entity player, entity item); + +void Item_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force); // WEAPONTODO + +.float is_item; +void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, float defaultrespawntimejitter, string itemname, float itemid, float weaponid, float itemflags, float(entity player, entity item) pickupevalfunc, float pickupbasevalue); + + +void target_items_use (void); + +#define OP_SET 0 +#define OP_MIN 1 +#define OP_MAX 2 +#define OP_PLUS 3 +#define OP_MINUS 4 + +float GiveWeapon(entity e, float wpn, float op, float val); + +float GiveBit(entity e, .float fld, float bit, float op, float val); + +float GiveValue(entity e, .float fld, float op, float val); + +void GiveSound(entity e, float v0, float v1, float t, string snd_incr, string snd_decr); + +void GiveRot(entity e, float v0, float v1, .float rotfield, float rottime, .float regenfield, float regentime); + +#define PREGIVE_WEAPONS(e) WEPSET_DECLARE_A(save_weapons); WEPSET_COPY_AE(save_weapons, e) +#define PREGIVE(e,f) float save_##f; save_##f = (e).f +#define POSTGIVE_WEAPON(e,b,snd_incr,snd_decr) GiveSound((e), WEPSET_CONTAINS_AW(save_weapons, b), WEPSET_CONTAINS_EW(e, b), 0, snd_incr, snd_decr) +#define POSTGIVE_BIT(e,f,b,snd_incr,snd_decr) GiveSound((e), save_##f & (b), (e).f & (b), 0, snd_incr, snd_decr) +#define POSTGIVE_VALUE(e,f,t,snd_incr,snd_decr) GiveSound((e), save_##f, (e).f, t, snd_incr, snd_decr) +#define POSTGIVE_VALUE_ROT(e,f,t,rotfield,rottime,regenfield,regentime,snd_incr,snd_decr) GiveRot((e), save_##f, (e).f, rotfield, rottime, regenfield, regentime); GiveSound((e), save_##f, (e).f, t, snd_incr, snd_decr) + +float GiveItems(entity e, float beginarg, float endarg); +#endif diff --git a/qcsrc/server/weapons/accuracy.qc b/qcsrc/server/weapons/accuracy.qc index 3c737f6e6..0f077a5fb 100644 --- a/qcsrc/server/weapons/accuracy.qc +++ b/qcsrc/server/weapons/accuracy.qc @@ -1,8 +1,3 @@ -.float accuracy_hit[WEP_MAXCOUNT]; -.float accuracy_fired[WEP_MAXCOUNT]; -.float accuracy_cnt_hit[WEP_MAXCOUNT]; -.float accuracy_cnt_fired[WEP_MAXCOUNT]; - float accuracy_byte(float n, float d) { //print(sprintf("accuracy: %d / %d\n", n, d)); diff --git a/qcsrc/server/weapons/accuracy.qh b/qcsrc/server/weapons/accuracy.qh index 90dbb663d..4cd43ee8a 100644 --- a/qcsrc/server/weapons/accuracy.qh +++ b/qcsrc/server/weapons/accuracy.qh @@ -1,4 +1,14 @@ .float cvar_cl_accuracy_data_share; +.float cvar_cl_accuracy_data_receive; + +.entity accuracy; +.float accuracy_frags[WEP_MAXCOUNT]; + +.float accuracy_hit[WEP_MAXCOUNT]; +.float accuracy_fired[WEP_MAXCOUNT]; +.float accuracy_cnt_hit[WEP_MAXCOUNT]; +.float accuracy_cnt_fired[WEP_MAXCOUNT]; + // init/free void accuracy_init(entity e);