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
 

0
Online

310
Users

24
Topics

295
Posts

  • P

    @playerx99 never mind again corrupt .pk3 file all good

    read more
  • P

    Got a new modeum now my F9 key wont bring up menu, not sure why is it something with program thinks someone else using and locked out? Can you check, I downloaded again installed new put in username and password wont work. Tried several servers that I know works on. Let me know

    Thanks

    read more
  • @userasdf It's alright, it's life.

    read more
  • U

    @Acnologia

    it has nothing to do with the guide
    the F | A servers introduced a private anti cheat because I raged 24/7
    the anti cheat will check the cgame.dll md5 checksum if it does not match the server that the slot will block you to join the team
    nexus annihil, however, needs his manipulated cgame.dll to make the hooks work
    annihil has to find a completely new method to bypass that

    read more