Enemy Territory Picmip hack


  • admin

    Wolfenstein uses cvar r_picmip to store the Texture Detail level that OpenGL will have to render.
    The possible value are

    • 0: High
    • 1: Medium
    • 2: Low
    • 3: Very Low

    But truth is, this value can be set to much lower, the lowest effective by OpenGL being 16.

    Now, the range of this cvar is verified by a function called AssertCvarRange

    static void AssertCvarRange(cvar_t *cv, float minVal, float maxVal, qboolean shouldBeIntegral) {
        if (cv->value < minVal) {
            ri.Printf(PRINT_WARNING, "WARNING: cvar '%s' out of range (%f < %f)\n", cv->name, cv->value, minVal);
            ri.Cvar_Set(cv->name, va("%f", minVal));
        } else if (cv->value > maxVal) {
            ri.Printf(PRINT_WARNING, "WARNING: cvar '%s' out of range (%f > %f)\n", cv->name, cv->value, maxVal);
            ri.Cvar_Set(cv->name, va("%f", maxVal));
        }
    }
    

    So if you set r_picmip to something higher than 3, ET will say

    WARNING: cvar 'r_picmip' out of range (16.000000 > 3.000000)
    

    AssertCvarRange is located @ 0x08110620 in ET 2.60b Linux.

    You can detour that function to remove the range checking, which will let you set picmip from 3 → 16.

    Another method is to modify r_picmip cvar value by accessing directly it by its offset.

    #include <windows.h>
    
    #define PICMIP 0x0046D8F7 // et 2.60b
    
    BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
        DWORD oldProt;
        switch (fdwReason) {
            case DLL_PROCESS_ATTACH:
                VirtualProtect((void *) PICMIP, 4, PAGE_EXECUTE_READWRITE, &oldProt);
                *(float *) PICMIP = 16.0f;
                VirtualProtect((void *) PICMIP, 4, oldProt, &oldProt);
                break;
        }
        return TRUE;
    }
    

    Screenshots




  • Donator

    So how can we change picmip ? In which folder do we have to enter these commands?


  • Donator

    @govap You'll need some coding skills to even understand what he is talking about. Although, you can change r_picmip with Adawolfa unlocker/dev client. Also Nexus Annihilator has got this feature, but I'm gonna test it out after I buy it.


Log in to reply
 

1
Online

383
Users

24
Topics

330
Posts

  • @zixxx welcome to the world 😢

    read more
  • Z

    oh okay for 5€ i would have tested it but for 35€ not. cant spend this much cash i am not that rich. so rich People can be much better than poor. not fair :(

    read more
  • Z

    How much Need be payed to get the full Version ?

    read more
  • Z

    Hey. Why my game get closed Always after a few seconds be on a Server ?

    read more