From: MirceaKitsune Date: Thu, 15 Mar 2012 13:19:20 +0000 (+0200) Subject: Fix a weird bug in a recent commit which was breaking item velocities X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=12c3482059eecb00aaafdbe51e13fb101f05cc36;p=voretournament%2Fvoretournament.git Fix a weird bug in a recent commit which was breaking item velocities --- diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index 89c5a2f2..5517fa30 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -390,14 +390,15 @@ void Item_DroppedConsumable_Spawn(entity e) if(cvar("g_nodepthtestitems")) item.effects |= EF_NODEPTHTEST; - float scalediff; - scalediff = cvar("g_healthsize") ? e.scale / e.predator.scale : e.scale; // the tighter the gut, the greater the velocity + float scalediff, sz; + sz = e.scale; // the line below does not work if I define this directly (fteqcc bug?) + scalediff = cvar("g_healthsize") ? sz / e.predator.scale : sz; // the tighter the gut, the greater the velocity + setorigin(item, e.predator.origin); item.angles_y = e.predator.angles_y; makevectors(e.predator.v_angle); item.velocity = v_forward * cvar("g_balance_vore_regurgitate_force") * scalediff; e.predator.velocity += -v_forward * cvar("g_balance_vore_regurgitate_predatorforce") * scalediff; - item.touch = Item_DroppedConsumable_Touch; item.cnt = time + 1; // 1 second delay SUB_SetFade(item, time + 20, 1); diff --git a/docs/TODO.txt b/docs/TODO.txt index 93720e46..143eb6e0 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -154,6 +154,4 @@ - 0.7 | 0.8 BUG: Bots still throw up health items when they need them -- +0.8: Create a recommended bot number for maps in mapinfo - -- 0.7: Throwing up items doesn't apply velocities (might be the healthsize thing) \ No newline at end of file +- +0.8: Create a recommended bot number for maps in mapinfo \ No newline at end of file