set_movetype(this, MOVETYPE_TOSS);
this.velocity = ReadVector();
}
+ else if (this.gravity) // caution: kludge FIXME (with sv_legacy_bbox_expand)
+ {
+ // workaround for prediction errors caused by bbox discrepancy between SVQC and CSQC
+ this.gravity = 0; // don't do this kludge again
+ this.pushable = false; // no fun allowed
+ set_movetype(this, MOVETYPE_NONE); // disable physics
+ this.velocity = '0 0 0'; // disable it more
+ SET_ONGROUND(this); // extra overkill
+ }
this.entremove = ItemRemove;
const float IT_DESPAWNFX_TIME = 1.5;
// 2hz probably enough to correct a desync caused by serious lag
-const float IT_UPDATE_INTERVAL = 0.5;
+// FIXME but updating faster applies the kludge in Item_Think() sooner so it's less noticeable
+const float IT_UPDATE_INTERVAL = 0.0625;
.float fade_start;
.float fade_end;
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
ItemUpdate(this);