From: Martin Taibr Date: Mon, 12 Nov 2018 17:51:17 +0000 (+0100) Subject: explain MR_ROTATE X-Git-Tag: xonotic-v0.8.5~1258^2~44^2 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=0a85e9a4a6c81d4776f1d9dbd93ace1442742bbd explain MR_ROTATE --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 0b62704c5b..06f66557a0 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -540,6 +540,9 @@ void CSQCModel_Effects_Apply(entity this) tref = EFFECT_TR_BLOOD.m_id; if(this.csqcmodel_modelflags & MF_ROTATE) { + // This will be hard to replace with MAKE_VECTORS because it's called as part of the predraw function + // as documented in csprogs.h in the engine. The globals can then be read in many places in the engine. + // However MR_ROTATE is currently only used in one place - might be possible to get rid of it entirely. this.renderflags |= RF_USEAXIS; makevectors(this.angles + '0 100 0' * fmod(time, 3.6)); } diff --git a/qcsrc/common/weapons/weapon/shockwave.qc b/qcsrc/common/weapons/weapon/shockwave.qc index 26e5587d4d..5a8b1f4474 100644 --- a/qcsrc/common/weapons/weapon/shockwave.qc +++ b/qcsrc/common/weapons/weapon/shockwave.qc @@ -663,9 +663,6 @@ void Draw_Shockwave(entity this) // WEAPONTODO: trace to find what we actually hit vector endpos = (this.sw_shotorg + (this.sw_shotdir * this.sw_distance)); - //vectorvectors(this.sw_shotdir); - //vector right = v_right; // save this for when we do makevectors later - //vector up = v_up; // save this for when we do makevectors later VECTOR_VECTORS_NEW(this.sw_shotdir, _forward, right, up); // WEAPONTODO: combine and simplify these calculations diff --git a/qcsrc/lib/deglobalization.qh b/qcsrc/lib/deglobalization.qh index 37fd7e101e..1097035bf7 100644 --- a/qcsrc/lib/deglobalization.qh +++ b/qcsrc/lib/deglobalization.qh @@ -26,6 +26,7 @@ STATIC_INIT(globals) { v_forward = VEC_NAN; v_right = VEC_NAN; v_up = VEC_NAN; + // FIXME check this is actually NaN } #endif