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.


 

0
Online

293
Users

22
Topics

272
Posts

  • D

    Dosen't work for me, I am playing on the new legacy version and no menu is showing up when pressing the key, but the game load perfectly. (Legacy 2.76)

    read more
  • P

    @playerx99 Never mind corrupt pak file re-installed et and all is working now

    read more
  • P

    Joining server I always was able to play, F9 key not bringing up aimbot settings even in spectate. Tried several servers that it worked before, downloaded latest zip file and copied over files cleared settings to just username and password still not working?

    read more
  • D

    @Annihil Well - I have pretty much experience in Linux and have more then 10 yrs exp in programing language. Recently I have tried to compile the ETH hack 64 bit which available here and found some compilation issues but didn't get time to resolve them.

    read more