makevectors(player.angles);
Reset_ArcBeam(player, v_forward);
UpdateCSQCProjectileAfterTeleport(player);
+ UpdateItemAfterTeleport(player);
#elif defined(CSQC)
from = player.move_origin;
player.move_origin = to;
makevectors(pl.angles);
Reset_ArcBeam(pl, v_forward);
UpdateCSQCProjectileAfterTeleport(pl);
+ UpdateItemAfterTeleport(pl);
{
WITH(entity, self, pl, anticheat_fixangle());
}
return true;
}
-void ItemUpdate(entity item)
+void ItemUpdate(entity this)
{
- item.SendFlags |= ISF_LOCATION;
+ this.oldorigin = this.origin;
+ this.SendFlags |= ISF_LOCATION;
+}
+
+void UpdateItemAfterTeleport(entity this)
+{
+ if(this.SendEntity3 == ItemSend)
+ ItemUpdate(this);
}
bool have_pickup_item(entity this)
{SELFPARAM();
self.nextthink = time;
if(self.origin != self.oldorigin)
- {
- self.oldorigin = self.origin;
ItemUpdate(self);
- }
}
bool Item_ItemsTime_SpectatorOnly(GameItem it);
{SELFPARAM();
self.nextthink = time;
if(self.origin != self.oldorigin)
- {
- self.oldorigin = self.origin;
ItemUpdate(self);
- }
if(time >= self.wait)
Item_Respawn();
// TODO: perhaps nice special effect?
bool ItemSend(entity this, entity to, int sf);
-void ItemUpdate(entity item);
+void ItemUpdate(entity this);
+
+void UpdateItemAfterTeleport(entity this);
// pickup evaluation functions
// these functions decide how desirable an item is to the bots