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

351
Users

26
Topics

326
Posts

  • @chuj that's to be expected

    read more
  • P

    Re: Nexus Annihilation weird problem everything works great then after a month or so same servers i join press F9 no nexus, i have tried deleteing nexus config and starting new, deleteing nexus locataion for et manin amd starting new, still wont work. tried deleting silent folders etc again nothing. Only solution that seems to work is delete et, reinstall and its good again. this has happened at least 5 times to me anyone else have this issue, admin is there a fix or something you know. Any help will appreciate. Thanks

    read more
  • L

    Few new servers being used for scrims. Protected by some sort of anti-cheat. Any fix for this?

    read more
  • G

    @jan patched sadly will try to find new method..

    read more