Call Of Duty 4 Modern Warfare Patch 1.6-1.7 Download

0 views
Skip to first unread message

Octavis Uberstine

unread,
Aug 5, 2024, 3:37:10 AM8/5/24
to spotenbesub
Meand my buddy were doing modded minecraft on version 1.7.10 and encountered a bug in which the screen would flash colors in a way that would be an epileptics worst nightmare. we debugged for hours thinking it was mod related or java related or something. Turns out the most updated driver for intel on board graphics at this time (Version date 09/02/2022) disables OpenGL Compression which would allow for the graphics in minecraft 1.7.10 and older to render properly. The fix is rolling back the driver to the one released in 2020. I hope this finds someone in need of this very specific help so that they do not need to go through the nightmare that was debugging this issue.

The problem is that all versions after beta 1.7.3 and before release 1.7 have an issue with OpenGL compliance. Back in the time of those versions, most video drivers excused this lack of compliance. More and more, newer video drivers are not excusing it, so you get the result you encountered.


The two workarounds are to, as you found out, roll back to older video drivers that do excuse it (I'd do this with care though, more so on nVidia given the security issues on anything not recent, but I'd be careful with it regardless) or to update to more recent versions that may not have the issue.


Mojang doesn't maintain support branches for every version of the game ever released, and it'd be unreasonable to expect them to, so if someone wants to play those old versions specifically, it would need fixed by the community. I've heard OptiFine can work around this (?) but I can't verify it as I've never encountered it to begin with. Beyond that, I don't know.


Or a much better workaround - fixing the actual bug in the game's code, which is literally a single line fix; in Beta 1.9 Mojang removed a seemingly unnecessary call to set the active texture (there already was another one), which for whatever reason worked; unfortunately, despite being so commonly reported for all affected versions and so simple to fix only a handful of people have gotten the motive to make a mod with the only known patched versions being 1.6.4 (as my own "jar" mod which will conflict with Optifine, Forge seems to work) and 1.7.10 (one of various Forge mods shown here, unfortunately, another mod decided to simply remove its similar fix, claiming that CoreTweaks was better):

The Intel rendering fix was implemented based on the research done by PheonixVX and TheMasterCaver.






* The issue appears to be that GL_CLIENT_ACTIVE_TEXTURE has an undefined value since it doesn't get set prior to the glTexCoordPointer call.

* So we set it to the default tex unit.

*/

// Note for testing this: the issue only happens if the -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump JVM flag is set.



@Inject(method = "draw", at = @At(value = "HEAD"))

private void setClientActiveTextureToDefault(CallbackInfoReturnable cir)



OpenGlHelper.setClientActiveTexture(OpenGlHelper.defaultTexUnit);






The last bit is also quite interesting; this was a flag that Mojang made up to make Intel drivers be able to see the game as a 3D application after the launcher for 1.6 came out, which no longer ran the game in the same process (as "Minecraft.exe") so drivers no longer recognized it as such, with major decreases in performance reported (the "fix version" is misleading, this impacted pre-1.6 versions as well). Unfortunately, the official launcher is hardcoded to always add it to the command line but some 3rd party launchers may not, so that is another workaround (I don't know which launchers may be affected), if at the cost of performance which may already be sub-optimal on iGPUs.


TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.

TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.

Why do I still play in 1.6.4?


I covered this afterwards. I stated that in place of either using older drivers or updated versions of the software in question, another possible solution may be one that manually fixes it for those older versions.



However, I'm aware that not everyone can do that. The majority of people aren't coders, so how easy or simple a particular behavior's cause or solution might be is irrelevant to those people who can't code (like me!). Your statement to "fix it" because it's "literally a single line" seems a tad presumptuous to me? Especially if, in all this time, there's apparently only been a fix for one version even by those who can do it? If anything, that would sound like a pretty good opportunity for mod that's simple to do while being well received by the community, no?



Not everyone can do everything. Not everyone can code. Not everyone can personally build their own shelter. Not everyone can directly provide their own food. Not everyone can... you get the idea. That's the beauty of society; we can lean on others who do provide things that we can't, and in turn provide others with things we can do.


The main issue appears to be setting up a mod development environment for older versions; this thread suggests it isn't even possible to set up one for Forge for 1.6.4 and older without tons and tons of work ("only getting close to a working solution after 6+ months of work").



Otherwise, it is pretty much just a matter of basic text editing; in fact, I've never used a proper IDE, just Windows Notepad to edit code, not even a more advanced editor like Notepad++. You don't need any coding knowledge at all to change this:

public static void setActiveTexture(int par0) if (useMultitextureARB) ARBMultitexture.glActiveTextureARB(par0); else GL13.glActiveTexture(par0);

to this, using the code I posted as a guide (you can probably even just copy over the source file I provided, the only reason why you can't just do the same with the compiled class file is because Mojang obfuscates the game and isn't consistent in how they do it, so everybody has to put up with mods breaking with even minor updates that made no changes to the code they modified (another great example, my "old caves" mods for 1.7+ had to be recompiled for each update despite no changes occurring, except in 1.8 (block states), otherwise still the same up to 1.12), much less crash reports that are meaningless gobbledygook) instead of sensible class and method names, and in the end it does nothing to prevent reverse engineering of the code, which is why you'd obfuscate it in the first place):

public static void setActiveTexture(int par0) if (useMultitextureARB) ARBMultitexture.glClientActiveTextureARB(par0); ARBMultitexture.glActiveTextureARB(par0); else GL13.glClientActiveTexture(par0); GL13.glActiveTexture(par0);

*proof that this class hadn't changed at all between 1.0.0 and 1.6.4; this is from 1.0.0 while the code above is from 1.6.4 (I'll note that MCP did change the names they gave to a couple fields but this method doesn't reference them):



-5/mcp50/blob/master/src/minecraft/net/minecraft/src/OpenGlHelper.java

public static void setActiveTexture(int i) if (useMultitextureARB) ARBMultitexture.glActiveTextureARB(i); else GL13.glActiveTexture(i);

In fact, even 1.12 has the exact same code despite extensive changes and additions to the rest of the class (the link says Optifine, aka a decompiled Optifine jar, but it matches other vanilla sources*. I also don't think any older version of Optifine fixes it, considering the issue only started appearing in late 2021 and they don't maintain older versions, or even list them on their official site, only in this forum thread (and even then you have to change the links for them to work), which makes me wonder why 1.8+ isn't affected by the issue, at least on Intel as it was affected by a similar issue on NVIDIA (this issue was far more severe no textures at all, instead of just various corruption, and only impacted versions back to 1.7, not earlier, so possibly another issue entirely, or due to some specific sequence of rendering calls they made. NVIDIA probably just fixed this by adding a workaround in their driver when it detects that an older version is running based on how it accesses the driver, which are massively bloated (and probably less performant than they could be) due to thousands of such fixes for various games and Intel/AMD may just not want to deal with that):



-1.12-SRC/blob/master/src/net/minecraft/client/renderer/OpenGlHelper.java

public static void setActiveTexture(int texture) if (arbMultitexture) ARBMultitexture.glActiveTextureARB(texture); else GL13.glActiveTexture(texture);

*Optifine does modify OpenGLHelper but only to add a couple fields, "lastBrightnessX, lastBrightnessY" and "Config.initDisplay()", hence why I said my fix is incompatible with it, proper Forge or Fabric-based solutions can be though (with a bit of extra work the fields and a dummy "Config" class could be added, with a note that it is to be omitted when used with Optifine with the patched OpenGLHelper class installed last).

3a8082e126
Reply all
Reply to author
Forward
0 new messages