From: bones_was_here Date: Sun, 11 Jun 2023 20:25:14 +0000 (+1000) Subject: items: use a different CSQC physics code path for smoother motion X-Git-Tag: xonotic-v0.8.6~7^2~10 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=94415fe1cb3f5c7746a1c59de91574b2059d65ff;p=xonotic%2Fxonotic-data.pk3dir.git items: use a different CSQC physics code path for smoother motion Previously it ran physics in whole numbers of server frametimes, which would cause "jumps" when the updates for a thrown item arrived. --- diff --git a/qcsrc/client/items/items.qc b/qcsrc/client/items/items.qc index 740294b2c..b7c1b8de0 100644 --- a/qcsrc/client/items/items.qc +++ b/qcsrc/client/items/items.qc @@ -42,7 +42,7 @@ void ItemDraw(entity this) // which requires running this even if the item is just outside visible range (it could be moving into range) if(animate) bobheight = this.origin_z - this.oldorigin_z; - Movetype_Physics_MatchServer(this, false); + Movetype_Physics_NoMatchTicrate(this, frametime, true); this.oldorigin = this.origin; // update real (SVQC equivalent) origin if(animate) { @@ -256,14 +256,6 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew) //this.angles = '0 0 0'; set_movetype(this, MOVETYPE_TOSS); this.velocity = ReadVector(); - - if(!this.move_time) - { - this.move_time = time; - this.spawntime = time; - } - else - this.move_time = max(this.move_time, time); } this.entremove = ItemRemove;