#include "../common/items/all.qc"
#if defined(SVQC)
- #include "_all.qh"
#include "bot/bot.qh"
#include "bot/waypoints.qh"
- #include "mutators/mutators_include.qh"
+ #include "mutators/all.qh"
#include "weapons/common.qh"
#include "weapons/selection.qh"
#include "weapons/weaponsystem.qh"
#include "../common/constants.qh"
- #include "../common/deathtypes.qh"
+ #include "../common/deathtypes/all.qh"
#include "../common/notifications.qh"
#include "../common/triggers/subs.qh"
#include "../common/util.qh"
#include "../common/weapons/all.qh"
- #include "../warpzonelib/util_server.qh"
+ #include "../lib/warpzone/util_server.qh"
#endif
#ifdef CSQC
-void ItemDraw()
-{SELFPARAM();
+void ItemDraw(entity self)
+{
if(self.gravity)
{
Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
}
}
-void ItemDrawSimple()
-{SELFPARAM();
+void ItemDrawSimple(entity this)
+{
if(self.gravity)
{
Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
#endif
#ifdef SVQC
-bool ItemSend(entity to, int sf)
-{SELFPARAM();
+bool ItemSend(entity this, entity to, int sf)
+{
if(self.gravity)
sf |= ISF_DROP;
else
{
entity wi = get_weaponinfo(self.weapon);
if (wi.m_id) {
- entity wp = WaypointSprite_Spawn(WP_Weapon, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, true, RADARICON_POWERUP);
+ entity wp = WaypointSprite_Spawn(WP_Weapon, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, true, RADARICON_Weapon);
wp.wp_extra = wi.m_id;
break;
}
{
entity ii = self.itemdef;
if (ii.m_id) {
- entity wp = WaypointSprite_Spawn(WP_Item, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, true, RADARICON_POWERUP);
+ entity wp = WaypointSprite_Spawn(WP_Item, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, true, RADARICON_Item);
wp.wp_extra = ii.m_id;
break;
}
WaypointSprite_Ping(self.waypointsprite_attached);
//WaypointSprite_UpdateHealth(self.waypointsprite_attached, self.count);
}
- else
- sound(self, CH_TRIGGER, SND_ITEMRESPAWNCOUNTDOWN, VOL_BASE, ATTEN_NORM); // play respawn sound
}
}
if (item.spawnshieldtime)
{
- if ((player.(ammotype) < ammomax) || item.pickup_anyway)
+ if ((player.(ammotype) < ammomax) || item.pickup_anyway > 0)
{
player.(ammotype) = bound(player.(ammotype), ammomax, player.(ammotype) + item.(ammotype));
goto YEAH;
it = item.weapons;
it &= ~player.weapons;
- if (it || (item.spawnshieldtime && item.pickup_anyway))
+ if (it || (item.spawnshieldtime && item.pickup_anyway > 0))
{
pickedup = true;
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
// it's a level item
if(self.spawnflags & 1)
self.noalign = 1;
- if (self.noalign)
+ if (self.noalign > 0)
self.movetype = MOVETYPE_NONE;
else
self.movetype = MOVETYPE_TOSS;
// do item filtering according to game mode and other things
- if (!self.noalign)
+ if (self.noalign <= 0)
{
// first nudge it off the floor a little bit to avoid math errors
setorigin(self, self.origin + '0 0 1');
setsize (self, '-16 -16 0', '16 16 32');
self.SendFlags |= ISF_SIZE;
// note droptofloor returns false if stuck/or would fall too far
- droptofloor();
+ if(!self.noalign)
+ droptofloor();
waypoint_spawnforitem(self);
}
self.SendFlags |= ISF_SIZE;
- if(itemflags & FL_POWERUP)
- self.ItemStatus |= ITS_ANIMATE1;
+ if(!(self.spawnflags & 1024))
+ {
+ if(itemflags & FL_POWERUP)
+ self.ItemStatus |= ITS_ANIMATE1;
- if(self.armorvalue || self.health)
- self.ItemStatus |= ITS_ANIMATE2;
+ if(self.armorvalue || self.health)
+ self.ItemStatus |= ITS_ANIMATE2;
+ }
if(itemflags & FL_WEAPON)
{
else
self.gravity = 1;
- self.ItemStatus |= ITS_ANIMATE1;
+ if(!(self.spawnflags & 1024))
+ self.ItemStatus |= ITS_ANIMATE1;
self.ItemStatus |= ISF_COLORMAP;
}