#include <common/mutators/mutator/powerups/_mod.qh>
#include <common/mutators/mutator/status_effects/_mod.qh>
#include <common/notifications/all.qh>
+#include <common/resources/sv_resources.qh>
#include <common/stats.qh>
#include <common/weapons/_all.qh>
#include <common/weapons/_all.qh>
#include <server/client.qh>
#include <server/items/items.qh>
#include <server/items/spawning.qh>
-#include <server/resources.qh>
#include <server/world.qh>
/***********************
***********************
* Map entities NOT handled in this file:
- holdable_invulnerability Q3TA buffs mutator
- holdable_kamikaze Q3TA buffs mutator
- holdable_teleporter Q3A buffs mutator
- item_ammoregen Q3TA buffs mutator
- item_doubler Q3TA buffs mutator
- item_guard Q3TA buffs mutator
- item_scout Q3TA buffs mutator
- item_armor_jacket CPMA quake2.qc
- item_flight Q3A buffs mutator
- item_haste Q3A buffs mutator
- item_health Q3A quake.qc
- item_health_large Q3A items.qc
- item_health_small Q3A health.qh
- item_health_mega Q3A health.qh
- item_invis Q3A buffs mutator
- item_quad Q3A items.qc
- item_regen Q3A buffs mutator
- weapon_machinegun Q3A machinegun.qh
- weapon_grenadelauncher Q3A mortar.qh
- weapon_rocketlauncher Q3A devastator.qh
- CTF spawnfuncs handled in sv_ctf.qc
+ holdable_invulnerability Q3TA buffs/all.inc
+ holdable_kamikaze Q3TA buffs/all.inc
+ holdable_teleporter Q3A buffs/all.inc
+ item_ammoregen Q3TA buffs/all.inc
+ item_doubler Q3TA buffs/all.inc
+ item_guard Q3TA buffs/all.inc
+ item_scout Q3TA buffs/all.inc
+ item_armor_jacket CPMA quake2.qc
+ item_flight Q3A buffs/all.inc
+ item_health Q3A quake.qc
+ item_health_large Q3A items/spawning.qc
+ item_health_small Q3A health.qh
+ item_health_mega Q3A health.qh
+ item_regen Q3A buffs/all.inc
+ weapon_machinegun Q3A machinegun.qh
+ weapon_grenadelauncher Q3A mortar.qh
+ weapon_rocketlauncher Q3A devastator.qh
+ * CTF spawnfuncs in sv_ctf.qc
NOTE: for best experience, you need to swap MGs with SGs in the map or it won't have a MG
*/
SPAWNFUNC_ITEM(item_armor_shard, ITEM_ArmorSmall)
SPAWNFUNC_ITEM(item_armor_green, ITEM_ArmorMedium) // CCTF
-// Battle Suit
+// Powerups
+SPAWNFUNC_ITEM(item_quad, ITEM_Strength)
SPAWNFUNC_ITEM(item_enviro, ITEM_Shield)
+SPAWNFUNC_ITEM(item_haste, ITEM_Speed)
+SPAWNFUNC_ITEM(item_invis, ITEM_Invisibility)
// medkit -> armor (we have no holdables)
SPAWNFUNC_ITEM(holdable_medkit, ITEM_ArmorBig)
{
if (it.classname == "item_buff")
{
- entity buff = it.buffdef;
- this.netname = cons(this.netname, buff.netname);
- this.buffs_finished += it.count;
+ this.netname = cons(this.netname, it.buffdef.netname);
+ this.buffs_finished += it.buffs_finished;
}
else
{
- if (it.ammo_rockets)
- this.ammo_rockets += it.ammo_rockets;
- else if (it.ammo_cells)
- this.ammo_cells += it.ammo_cells;
- else if (it.ammo_shells)
- this.ammo_shells += it.ammo_shells;
- else if (it.ammo_nails)
- this.ammo_nails += it.ammo_nails;
- else if (it.invincible_finished)
- this.invincible_finished += it.invincible_finished;
- else if (it.strength_finished)
- this.strength_finished += it.strength_finished;
- else if (it.health)
- this.health += it.health;
- else if (it.armorvalue)
- this.armorvalue += it.armorvalue;
-
- this.netname = cons(this.netname, it.netname);
+ this.ammo_rockets += it.ammo_rockets;
+ this.ammo_cells += it.ammo_cells;
+ this.ammo_shells += it.ammo_shells;
+ this.ammo_nails += it.ammo_nails;
+ this.invincible_finished += it.invincible_finished;
+ this.strength_finished += it.strength_finished;
+ this.speed_finished += it.speed_finished;
+ this.invisibility_finished += it.invisibility_finished;
+ this.health += it.health;
+ this.armorvalue += it.armorvalue;
+
+ this.netname = cons(this.netname, (it.itemdef.m_weapon) ? it.itemdef.m_weapon.netname : it.itemdef.netname);
}
//remove(it); // removing ents in init functions causes havoc, workaround:
if(this.notta)
return true;
+ // FIXME: singleplayer does not use maxclients 1 as that would prevent bots
if(this.notsingle)
if(maxclients == 1)
return true;