]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
explain MR_ROTATE
authorMartin Taibr <taibr.martin@gmail.com>
Mon, 12 Nov 2018 17:51:17 +0000 (18:51 +0100)
committerMartin Taibr <taibr.martin@gmail.com>
Mon, 12 Nov 2018 17:51:17 +0000 (18:51 +0100)
qcsrc/client/csqcmodel_hooks.qc
qcsrc/common/weapons/weapon/shockwave.qc
qcsrc/lib/deglobalization.qh

index 0b62704c5baa6aabebdc2a932c7662cdf37daeb0..06f66557a069722a10cc2190f102735df0fb0ebd 100644 (file)
@@ -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));
        }
index 26e5587d4ddaa5fcfee7796f64acea51c0b2f772..5a8b1f44740dc910cbe51d8304d185ed9a85e0df 100644 (file)
@@ -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
index 37fd7e101e2c4d48fa3c2afcf95861fe11a6a185..1097035bf77bff236f39d5267ea4e4b2d4f650a8 100644 (file)
@@ -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