From 94415fe1cb3f5c7746a1c59de91574b2059d65ff Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Mon, 12 Jun 2023 06:25:14 +1000 Subject: [PATCH] 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. --- qcsrc/client/items/items.qc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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; -- 2.39.2