sortlist.qc
miscfunctions.qc
+../server/t_items.qh
../server/t_items.qc
teamradar.qc
#ifdef SVQC
CRYLINK_SETTINGS(crylink)
-void spawnfunc_weapon_crylink() { weapon_defaultspawnfunc(WEP_CRYLINK); }
.float gravity;
.float crylink_waitrelease;
.entity crylink_lastgroup;
#endif
#else
#ifdef SVQC
+void spawnfunc_weapon_crylink() { weapon_defaultspawnfunc(WEP_CRYLINK); }
void W_Crylink_CheckLinks(entity e)
{
#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)
{
#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!
#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)
{
#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;
#endif
#else
#ifdef SVQC
+void spawnfunc_weapon_minelayer() { weapon_defaultspawnfunc(WEP_MINE_LAYER); }
void W_Mine_Stick (entity to)
{
);
#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)
{
#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;
#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;
#endif
#else
#ifdef SVQC
+void spawnfunc_weapon_porto (void) { weapon_defaultspawnfunc(WEP_PORTO); }
void W_Porto_Success (void)
{
#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)
{
#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
// ============================
// Begin: Genereal weapon functions
// ============================
-void spawnfunc_weapon_seeker (void)
-{
- weapon_defaultspawnfunc(WEP_SEEKER);
-}
float w_seeker(float req)
{
#ifdef SVQC
TUBA_SETTINGS(tuba)
-void spawnfunc_weapon_tuba (void) { weapon_defaultspawnfunc(WEP_TUBA); }
-
.entity tuba_note;
.float tuba_smoketime;
.float tuba_instrument;
#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)
{
-.entity accuracy;
-.float accuracy_frags[WEP_MAXCOUNT];
-
float weaponstats_buffer;
void WeaponStats_Init()
.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
stuffcmd(self, strcat("cl_cmd sendcvar ", name, "\n"));
}
}
-float w_getbestweapon(entity e); // WEAPONTODO
string W_FixWeaponOrder_ForceComplete_AndBuildImpulseList(string wo)
{
string o;
../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
../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
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
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
t_plats.qc
antilag.qc
-weapons/accuracy.qc // TODO
-
//ctf.qc
//domination.qc
//mode_onslaught.qc
-#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)
#endif
#ifdef SVQC
-float autocvar_sv_simple_items;
float ItemSend(entity to, float sf)
{
if(self.gravity)
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)
#endif
}
-.float max_armorvalue;
-.float pickup_anyway;
/*
float Item_Customize()
{
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)
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;
// 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")
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;
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;
--- /dev/null
+#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
-.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));
.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);