]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make it compile now (ARGH I HATE OUR PROGS.SRC SET UP)
authorSamual Lenks <samual@xonotic.org>
Mon, 1 Jul 2013 23:20:39 +0000 (19:20 -0400)
committerSamual Lenks <samual@xonotic.org>
Mon, 1 Jul 2013 23:20:39 +0000 (19:20 -0400)
20 files changed:
qcsrc/client/progs.src
qcsrc/common/weapons/w_crylink.qc
qcsrc/common/weapons/w_fireball.qc
qcsrc/common/weapons/w_hagar.qc
qcsrc/common/weapons/w_hlac.qc
qcsrc/common/weapons/w_minelayer.qc
qcsrc/common/weapons/w_minstanex.qc
qcsrc/common/weapons/w_nex.qc
qcsrc/common/weapons/w_porto.qc
qcsrc/common/weapons/w_rifle.qc
qcsrc/common/weapons/w_seeker.qc
qcsrc/common/weapons/w_tuba.qc
qcsrc/server/cl_player.qc
qcsrc/server/defs.qh
qcsrc/server/miscfunctions.qc
qcsrc/server/progs.src
qcsrc/server/t_items.qc
qcsrc/server/t_items.qh [new file with mode: 0644]
qcsrc/server/weapons/accuracy.qc
qcsrc/server/weapons/accuracy.qh

index d9cd16ead64f5b020633a936f2e20215a65e5d90..d0c503b12388ffe00a16e46a2cdbf98b5d2281ec 100644 (file)
@@ -58,6 +58,7 @@ player_skeleton.qh
 
 sortlist.qc
 miscfunctions.qc
+../server/t_items.qh
 ../server/t_items.qc
 
 teamradar.qc
index b292931485a911ff7b2446986dfe4afdc0d3d79b..523e498fba789256558fdd56932e52de5e1b047e 100644 (file)
@@ -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)
 {
index fc8e88ab5c75f89527ee706f05ae3fc3760621d8..c547b8c634176e99805c3e91ab8ed5feb00433f3 100644 (file)
@@ -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)
 {
index 814efeb26e86e50bcd7d38ad827a2e51bf37e81c..1916b569761c2b7ac23e3797fc0ba7873ce7e8e1 100644 (file)
@@ -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!
 
index 1381e106846ffbd1e50ec55bbe3e996c70d7d72c..c860c8e5d7650fbbc3d1f6060d28555935474d53 100644 (file)
@@ -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)
 {
index 46f75bce0149240c0febf2873ef2a2c5ede7bb87..8ac784f0b7b1a7321f7b64225099f392fbd4c41e 100644 (file)
@@ -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)
 {
index 37d9b8efe7424b533d159819bf41f5e1b1772c84..b218dc294a2110316652955958a015536a7f9291 100644 (file)
@@ -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)
 {
index 684622d9dc7e221800bd772e53846e28fe00bc02..26c951064802282277725fd33314e622dd607648 100644 (file)
@@ -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;
index b1618595ab624f5414ec6f6a65ec6334a8022638..5625a40a1190f0610134bf848cb3a1061dfd74a6 100644 (file)
@@ -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)
 {
index 869aadac64790ae9f9c5f60674b47e30fdad26d1..b984c804c93decd386ea8b334fac8bbad6987ee3 100644 (file)
@@ -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)
 {
index a1627f97c834fb746988e6739213d1f6af016f80..52d9931cbbaf7bb17b19fd9882c9d9c5af1bca6f 100644 (file)
@@ -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)
 {
index 5143970161b29b9c35ac0db640c408cd10aba8e2..8d095787ba34d697aab1396c5e648bd0d879c7b5 100644 (file)
@@ -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)
 {
index 057cc92cb91057536b60558cf1575cea797e8e8e..f2cd6721e801d29e516cdd9308efd9541d7407c6 100644 (file)
@@ -1,6 +1,3 @@
-.entity accuracy;
-.float accuracy_frags[WEP_MAXCOUNT];
-
 float weaponstats_buffer;
 
 void WeaponStats_Init()
index f6ece6e92eb3759a8431af40b7e4bcbcaf4efcd5..cf99e9ac03471c5121bf3545664a5c4f72177d44 100644 (file)
@@ -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
 
index fd9520fe8c8564706d21b830aa340a2da9ea7aa0..10a7c9943b41add67f869fecb1cb1fb9f3fcb772 100644 (file)
@@ -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;
index ff1944c1b63040273ab3838d354eb7dcf3921a44..4d3f965dfbfc7bb081df436dad9a96352219d091 100644 (file)
@@ -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
index 5b87bc07f2e35895737aea4b9d66e82b0f940bd7..6c1b8f5e22d23117548b3ade7ebb046b4ccd025e 100644 (file)
@@ -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 (file)
index 0000000..89bbbc5
--- /dev/null
@@ -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
index 3c737f6e6cec277f4e8d225f6ccefcc0004a271d..0f077a5fb83e570fed8c41861ce141a544c78c10 100644 (file)
@@ -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));
index 90dbb663ded8fd2645213eb80a9022143f8571ea..4cd43ee8addd1aff66c3e4fc921ad323f0876fbc 100644 (file)
@@ -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);