+ if (ITEM_IS_LOOT(this))
+ {
+ if (time < this.wait - IT_DESPAWNFX_TIME)
+ this.nextthink = min(time + IT_UPDATE_INTERVAL, this.wait - IT_DESPAWNFX_TIME); // ensuring full time for effects
+ else
+ {
+ // despawning soon, start effects
+ this.ItemStatus |= ITS_EXPIRING;
+ this.SendFlags |= ISF_STATUS;
+ if (time < this.wait - IT_UPDATE_INTERVAL)
+ this.nextthink = time + IT_UPDATE_INTERVAL;
+ else
+ {
+ setthink(this, RemoveItem);
+ this.nextthink = this.wait;
+ }
+ }
+
+ if (this.itemdef.instanceOfPowerup)
+ powerups_DropItem_Think(this);
+
+ // caution: kludge FIXME (with sv_legacy_bbox_expand)
+ // this works around prediction errors caused by bbox discrepancy between SVQC and CSQC
+ if (this.velocity == '0 0 0' && IS_ONGROUND(this))
+ this.gravity = 0; // don't send ISF_DROP anymore
+
+ // send slow updates even if the item didn't move
+ // recovers prediction desyncs where server thinks item stopped, client thinks it didn't