I could swear it wasn't there before...

Neil Toronto ntoronto at cs.byu.edu
Mon Dec 4 01:21:46 EST 2006


While translating cg_view.c to Python (yes, it's going very well now, 
I've got it rendering the map and I'm receiving snapshots), I discovered 
a funny block of code that I could swear wasn't there before Quake 3 was 
GPLed:

    if (cg_timescale.value != cg_timescaleFadeEnd.value) {
        if (cg_timescale.value < cg_timescaleFadeEnd.value) {
            cg_timescale.value += cg_timescaleFadeSpeed.value * 
((float)cg.frametime) / 1000;
            if (cg_timescale.value > cg_timescaleFadeEnd.value)
                cg_timescale.value = cg_timescaleFadeEnd.value;
        }
        else {
            cg_timescale.value -= cg_timescaleFadeSpeed.value * 
((float)cg.frametime) / 1000;
            if (cg_timescale.value < cg_timescaleFadeEnd.value)
                cg_timescale.value = cg_timescaleFadeEnd.value;
        }
        if (cg_timescaleFadeSpeed.value) {
            trap_Cvar_Set("timescale", va("%f", cg_timescale.value));
        }
    }

This apparently adjusts timescale toward 1 if cg_timescaleFadeSpeed is 
nonzero. Aside from the fact that the logic is wacked (why do *any* of 
it when cg_timescaleFadeSpeed is 0?), it doesn't work very well. From 
what I can see from cvs.icculus.org, it's been there since the source 
was released.

I don't want it in mine - it's just ugly cruft and nonsense. Who uses 
this? Is it for machinima or something?

Neil




More information about the quake3 mailing list