SilentPatch for Grand Theft Auto goes open source!

October 25, 2024 (edited November 2, 2024)

42 min. to read

TL;DR: This article details the various fixes introduced in this update, making it a relatively long read. If you want to jump straight to SilentPatch or check the source code, go to the Download and source code section for the links.


NOVEMBER 2, 2024 UPDATE: Hotfix #1 has been released for GTA III, Vice City, and San Andreas! This hotfix addresses several known issues introduced by the latest update, and addresses compatibility issues with multiple modifications. Updating is strongly recommended.

Introduction

Tomorrow, on October 26th, 2024, GTA San Andreas turns 20 years old. I haven’t had the chance to play it upon its release in 2004 – I was a kid who, back then, played exclusively on PC and would play Vice City whenever my parents allowed me. My first experience with San Andreas was in mid-2005 when the game was released on PC; little did I know back then how influential GTA in general, but most specifically San Andreas, would later be for my life and my professional career – and that nearly two decades later, well into my adult life, I would still be fixing it to make it as enjoyable an experience as I possibly can.

Today, on October 25th, I’m honored to publish the biggest update of SilentPatch for the classic Grand Theft Auto trilogy to date, with the full source code now available on GitHub under the MIT license! While I originally planned for the open source release to go live in January, a combination of an increased update scope and several real-life issues happening in the background resulted in this much of a delay, for which I sincerely apologize.

However, this delay comes with a silver lining – what I initially planned to be a simple upload of the source code cleaned up for a public release turned into the biggest content update I’ve ever released. This release contains not only a wide selection of new fixes; I also went back to many older fixes and upgraded them to be safer, simpler, more compatible with other modifications, and free of side effects. Numerous minor regressions introduced by SilentPatch are now resolved, ensuring the patch goes open source in as perfect a state as possible.

In this blog post, I’ll break down the most significant fixes introduced in this update, a culmination of approximately 10 months of development (although not without breaks), and a lot of testing over nine Release Candidate builds. My explanations may get a bit more technical than usual, but I did my best to keep them digestible. No code names this time! The last time I tried that, my code name of choice aged poorly very quickly 😑.


Before we move on, a small unrelated announcement – regular visitors to the blog may have noticed that it has been updated a bit! Most of the changes are purely cosmetic, but there are also a few things that should be immediately noticeable:

  1. PNACH codes in Consoles can now be downloaded directly! There is no need to go through GitHub anymore.
  2. Fonts have been slightly updated.
  3. Buttons have been redesigned. They are now thicker, consistently placed, and don’t have useless padding around them.
  4. Embedded Tweets now respect the Dark Mode setting.
  5. My Portfolio has been updated with the latest work projects I’ve been involved in, including the one I’m currently on when I’m not patching games on the side.

New fixes

Shared fixes

Numerous fixes included in this update apply to multiple games from the trilogy. Those are:

I’m a good citizen, and I always keep my headlights on

Affects: All trilogy games.

To provide some variety in the game world, traffic vehicles act with a degree of randomness. One of the random decisions they make is when they turn the lights on at night, or when it gets foggy or rainy. For each vehicle in the world, a random “threshold” gets picked, deciding how dark, rainy, or foggy it has to be for the vehicle to turn the headlights on.

However, this tiny feature suffers from a difference in how randomness works on PC vs PS2 – the range of randomness is lower on PC (0-32767) than it is on PS2 (0-65535), but the code calculating the thresholds has not been updated. This keeps the variance in decisions, but unintentionally gets rid of an interesting outcome – on the PS2, during rainy or foggy conditions, some vehicles may decide to never turn their headlights on! On PC, because the range of randomness is smaller, they will all eventually turn on their headlights.

SilentPatch rescales the code calculating the thresholds to match the PS2 behavior, so starting with this update, you may encounter some unlawful drivers who don’t use their lights even when they really should:


Did that car explode twice!?

Affects: All trilogy games.

The entire trilogy had a weird bug where cars would sometimes explode more than once for no discernible reason. Together with Nick007J we dived into this issue and figured out that it’s caused by the following chain of events:

  1. The vehicle is set on fire.
  2. The driver bails out. Before they finish their bailing animation, the vehicle explodes and changes its status to “wrecked”.
  3. The driver finished their bailing animation. This changes the vehicle status to “abandoned”, overwriting the previous state.
  4. Changing the vehicle’s status doesn’t replenish its health, so it’s set on fire again, and explodes shortly after.

From these steps, the fix becomes apparent: SilentPatch now doesn’t allow the game to transition the vehicle state from “wrecked” back to “abandoned”, fixing this issue.

Unfortunately, this fix also corrects another well-known issue that for once I did not intend to fix:1 it is no longer possible to execute a famous trick allowing the player to drive exploded vehicles in GTA III and Vice City:

With this fix, the first vehicle explosion simply kills the player 😥


Ooh, shiny!

Affects: GTA III, GTA Vice City.

In III and Vice City, environment mapping wasn’t applied to vehicle extras. This resulted in all extras appearing matte (with no specularity), which is fine for parts like leather roofs on Stallion and Mesa Grande, but not necessarily on metallic extras, like Stinger’s roof, that now matches the way Yakuza Stinger looks:

StockSilentPatch

However, there is a catch: theoretically, non-reflective parts should just have their specularity set to zero, but this isn’t done with multiple stock models. For this reason, the INI file now includes an exception list ExtraCompSpecularityExceptions where models with non-reflective extras can be specified. By default, this is Stallion (for III and Vice City) and Mesa Grande (for Vice City). Additionally, I also made sure that these exceptions don’t apply to glass materials, which gives Mesa Grande a reflective rear windshield:

For custom models, the fix is simple: just make sure that your extras have specularity and the environment map coefficient set correctly. This value is simply ignored on extras without SilentPatch.


Credits roll! …ZZzzzZZZ….

Affects: All trilogy games.

Congratulations, you completed the final mission and beat the game! Now it’s time to watch the credits. “Ugh, why are they so small and slow?”, you think to yourself. Well played, you just spotted a bug! The credits don’t scale to resolution, so they appear smaller and slower the higher your selected resolution is, to the point where they are nearly unreadable at 4K.

Starting with this SilentPatch update, credits scale to the resolution correctly and thus now look just like on the PS2. Because they now move at a consistent speed regardless of resolution, their run time now also matches the original release. Additionally, in GTA III, credits would run for a bit longer than needed, so for the last camera cut, the game would show it and immediately fade out again, as the credits have already rolled to completion. To fix this, I made the credits scroll a few percent faster, so they end on the previous camera cut instead.

StockSilentPatch
What is this, credits for ants?

Mission passed! Now please let me play, I get it

Affects: All trilogy games.

This is one of the issues that make the lives of speedrunners harder: in all three trilogy games, the bigger your selected resolution is, the longer the mission title and mission completion/failure texts stay on the screen! At first, this sounds completely crazy and I wouldn’t blame anyone for thinking it’s a lie or placebo – alas, it’s true.

It all only comes together thanks to one of the pre-release clips from GTA III. Pay attention to the “Reward” text:

At some point, this text (called “odd job text” internally), mission titles, and the mission completion/failure text were intended to slide from left to right. Although this feature never made it to the final game, much of the code remained. When the games were ported to PC, a (perhaps automated) attempt was made to scale the sliding animation to arbitrary resolutions. However, this attempt was incomplete – while the scaling margins scale, the sliding speed does not. Texts stay on screen longer, because the game waits for the slide to complete, even though the results of those calculations are not used in the end.

In this update, SilentPatch fixes this logic, so now the “sliding speed” remains consistent regardless of the resolution. Additionally, since I had to modify this code either way, two new INI (and debug menu) options were added to all 3 games – SlidingMissionTitleText and SlidingOddJobText may be used to re-enable this cut feature. Even though the mission passed texts technically can slide too, they were always centered, so sliding does not look right, and therefore it makes no sense to enable it.


Minimal HUD

Affects: GTA Vice City, GTA San Andreas.

The games have an unused, yet mostly finished mode of displaying the HUD – when it’s enabled, only the clock displays continuously. Money, the weapon icon, wanted level stars, and the energy bars only display when their statuses change (e.g. you lose health, or pick up money), and after that, they fade out after several seconds. SilentPatch fixes multiple visual bugs this feature exhibited, and can optionally enable it via the INI file.

Even with my fixes, it’s still hard to call it “production ready” – health and armor don’t show up when replenishing health or losing oxygen (in San Andreas), and, unlike in GTA IV, it’s not possible to show the entire HUD on demand, so you are unable to peek at your health or money whenever you wish.

Very… minimal.

Minimal HUD in San Andreas isn’t introduced in this update – it existed in SilentPatch since late 2017 and was first made public in Build 29 released in May 2018. However, for some reason, I never documented this option, so it remained “hidden” and the users had to add it to the INI file by themselves. With this build, I finally officially documented it, so it appears in the configuration file, and consequently, also in the debug menu.

However, it is new for Vice City – as only recently I was made aware that this feature existed also there! Therefore, in this update, Minimal HUD can now also be enabled in VC. Be mindful that the same shortcomings as in San Andreas apply.


Other fixes


Grand Theft Auto III

Boat driving animations

Careful observers likely noticed a long time ago that in GTA III, Speeder is the only boat with a driver’s seat. This doesn’t stop Claude from standing inside that seat, though, as only in Vice City Rockstar had introduced a flag indicating that the boat driver should use the sitting animation. Fire_Head also noticed this issue years ago and made a fix for it. In this update of SilentPatch, Fire_Head’s work has been integrated:

In the stock game, Claude looked rather restless when driving a Speeder.
Now, he can finally sit down. He is still steering the boat with his mind powers, though.

Together with this change, Fire_Head also backported a small fix from Vice City: now, a small delay between entering the boat and the game considering Claude to be inside one has been removed; the game was waiting for the entering animation to finish, but boats don’t have one, so that made no sense. This fix has also been integrated into SilentPatch.

Good news for III Aircraft users – for this change, SilentPatch applies an identical fix to Skimmer.


Platform-specific diving for your life?

The PC version of GTA III has an interesting gameplay regression compared to the original PS2 release. Usually, pedestrians can react to incoming cars in three ways – they can:

On PC, raising hands and stepping away works fine. However, pedestrians dive… towards the car instead!

Does this not constitute an insurance fraud? Also hats off to the police arriving at the scene, I could never have achieved better comedic timing if I tried doing it on purpose.

It’s difficult to know exactly what happened in this instance, but I have my guess based on a particular quirk of this feature: when the “threatening” vehicle is honking, this makes the NPC more alert and they always try to dive out of the way. Coincidentally, in this scenario, the bug doesn’t manifest. I can only theorize based on the code differences between PS2 and PC, but the fact PC is missing some calculations makes me believe that this bug was introduced by a failed code optimization – someone may have misread the code, then thought the dive angle was calculated twice, and introduced a bug, since the two calculations happened under different circumstances.

In this update, SilentPatch restores the missing code from the PS2 release, making the dive behave just like it did originally:

Ouch! That must’ve hurt.

Platform-specific speeding for your life??

In GTA III, drivers may react in several ways to being shot at. When bullets hit their car, they randomly pick one of the three actions:

This list may have raised eyebrows – do you feel like you’ve never encountered some of these events? If you did, you’d be correct, as this feature is bugged on all platforms, in more ways than one.

All entities in the game world have a random seed value assigned to them, allowing different pedestrians and cars to behave differently, yet ensuring that each entity remains consistent in its actions. On the PS2, this random seed is an integer value in the range 0-65535, on PC (and likely Xbox too) it’s 0-32767. The issue with the drivers’ behavior lies in the function assigning those behaviors to the random seed:

Do you see the issue now? An incorrect assumption about the range of the random seed led to one (on PS2) or two (on PC/Xbox) cases being unreachable. In SilentPatch, the ranges have been rescaled for the real range of the random seed, so now drivers may either ignore the bullets or flee on foot, for the first time.


Stealth FBI cars

In all 3D-era games, FBI vehicles are pitch black. However, this does not apply to some FBI Kurumas in GTA III. Unlike the later games, in GTA III, the car’s carcols.dat entry specifies a dark grey body color with unpainted bumpers. Cars that spawn in roadblocks and cars imported via the Import/Export cranes adhere to this setting, while the chasing units are forcibly set to black via the game’s code. This leads to a discrepancy between the cars depending on where they come from and also causes the pitch-black Kurumas to permanently change their color when resprayed.

The default color makes the FBI Kuruma look comically dark.
With SilentPatch, details are visible and the color is natural, as it was intended all along.

I am not sure why the game forces FBI cars to black via code. Perhaps at some point in development FBI used regular civilian cars painted black, and this was never reverted when they were given their dedicated vehicle? Regardless, SilentPatch now removes this code, so all FBI cars use the colors specified in carcols.dat.


“Nasty game” with improvements

Exclusively in the PS2 and PC versions of GTA III, the player could shoot limbs off the other characters. However, the detached limbs never looked quite right, but not because the models weren’t detailed enough – a simple code mistake caused both the normal model and the LOD model to show at once, ignoring the game’s LOD system. This has now been fixed.

Blocky legs and two hands on each arm? In Liberty City, Halloween lasts all year long.
…until now, that is.

Why is this radar so ugly?

Ever since the very first release, SilentPatch fixed numerous UI elements not scaling to resolution correctly. This included the text shadows and a few specialized message types. Turns out, more things needed fixing, although they weren’t immediately obvious.

On PS2, the radar disc texture extends 4 pixels around the rendered map. On PC, that map, as well as the radar disc, scale to resolutions, but that 4px margin does not. Back in the day, this was likely barely noticeable on resolutions like 1024x768, but with modern resolutions like 4K, the issue becomes so pronounced that the radar disc no longer even covers the map underneath:

The only reason this shipped is because it looks less bad at smaller resolutions. In 4K, the stock radar looks unacceptable.
With SilentPatch, the radar looks tidy. I also feel like it looks more circular. Do you also see it?

You’ve likely noticed that the positioning has changed too – that’s because the horizontal position also didn’t scale to resolution (even though the vertical position does), so the radar was always a constant 40 pixels away from the screen edge. In this update, both issues are fixed, so the entire radar scales correctly.


Are car models broken on PC? No, the code is

In the GTA modding circles it’s relatively well known that a few pieces of code from an early version of Vice City made their way to the PC version of GTA III; helicopter physics, bike hierarchy (but no other bike leftovers!), etc. For example, III Aircraft was only possible thanks to those leftovers. This theory has also been confirmed by Obbe Vermeij himself:

Just a few days before this post goes live, we learned about yet another PS2 vs PC difference that is a consequence of this code mixup: cars in GTA III have separate taillights and brakelights dummies,2 while Vice City only kept the former! This had an adverse effect on the way these lights work. That’s how they were intended to function:

With the brake lights dummy gone, III on PC fell back to the Vice City behavior: that is, always putting all the lights on a taillight dummy. In this SilentPatch update, I re-introduced the missing code to the PC version, restoring feature parity. It’s quite a neat detail, so I’m glad to see it working again. On many cars, the differences are hard to spot, but on others it’s much more prominent:

Sentinel’s rear lamps now see more use. The reverse lights have a dummy placed in the white area of the lamp, but sadly the game does not use it, and the reverse lights go where the brake lights are.
Patriot’s brake lights are placed in quite an unusual spot.
Multiple large vehicles, like the Enforcer, are supposed to have their brake lights placed up top.

Other fixes


Grand Theft Auto: Vice City

Pickups and glows

Vice City had multiple issues with the pickup objects fixed:


Backface culling fixes

While it is a useful GPU performance improvement, backface culling wasn’t always a thing in the 3D-era GTAs:4

While Rockstar fixed many models in the PC version of Vice City to render correctly with backface culling, many more were missed. In this update, I implemented several exceptions to the backface culling, similar to what was done in the mobile versions of GTA III and Vice City:


Construction Site LOD

In the infamous “Demolition Man” mission, the player is tasked with destroying a construction site with the use of a remote-controlled helicopter. Due to a bug in the mission’s script, when the regular construction site model gets swapped for the damaged model, the building’s LOD model becomes “orphaned” (as in, it loses a link to its corresponding high-quality model) and starts showing at all times, resulting in the low-quality building rendering “inside” the damaged model. Starting from this update, the LOD gets re-linked to the newly swapped damaged model and thus retains the correct behavior.

StockSilentPatch
It’s one of those “How did it ship?” issues.

Fun fact – the behavior where LOD models without a corresponding high-quality model render at any distance is new to Vice City, and Rockstar most likely introduced it to fix cranes disappearing up close. If that sounds familiar, it’s because I introduced a similar fix to GTA III in the Corona Update!


Greetings from Vice City… but not for this long, please!

The outro splash in the PC version of Vice City kind of seems to take forever, doesn’t it?

For this release, I was asked if SilentPatch could shorten the duration of this splash, and upon looking into the code, I discovered that there is more to this request than just a subjective wish. The game determines the duration of this splash as follows:

There is a problem, though – when the game is capped to 30FPS, this function executes every 33.(3) milliseconds, so the counter increments only 30 times per second. This means that instead of taking 10ms * 150 = 1.5 seconds, it actually takes 33.(3)ms * 150 = ~5 seconds! With the Frame Limiter disabled, or in the main menu (where the game locks to VSync only), this time would be proportionally shorter.

The fix in SilentPatch is to re-time the fade – if we increase the counter every 33ms, and count up to 45, the splash takes around 1.5 seconds regardless of the frame rate. I implemented this fix but then realized that while the original 5s was way too long, 1.5s is also kind of short. Therefore, SilentPatch now settles on a time of 2.5 seconds (33ms * 75).


Giving a finger in style

In both GTA III and Vice City, the protagonists shake their fists5 at incoming traffic vehicles. Usually, this is supposed to happen when the player is unarmed or holds a melee weapon, pistol, or an SMG. However, in Vice City, this feature had several distinct bugs, now all fixed in SilentPatch:

Here, I used the PS2 animations. In a completely stock PC version, this gesture looks… a bit different.

Why is this radar so ugly? Part 2

Radar again? Yep, but this time, it’s even worse.

The issue I mentioned earlier in the context of GTA III is still present, and on top of that, new issues have appeared: in Vice City, the radar disc has been rescaled and re-styled – the outer disc now extends 6 pixels around the map, and a fancy shadow effect has been added 2 pixels below the disc. This worked fine on PS2, but is broken in multiple ways on other platforms:

SilentPatch rolls out multiple fixes to make the radar look consistent and tidy:

By default, the radar is too close to the edge of the screen, the shadow effect is almost non-existent, and the destination blip has a 1px outline.
With SilentPatch, the radar’s placement and all elements scale to resolution correctly. Its overall appearance is now much more tidy.

Additionally, the onscreen counter bar’s shadow and the loading bar outline now also scale to resolution:

The text looks fine, but the health bar, not so much.
Another tiny consistency win.

Other fixes


Grand Theft Auto: San Andreas

While all three games received countless new fixes, this time, San Andreas took center stage. After all, its 20th anniversary is just around the corner:

Improving vehicles, one animation at a time

For this release, Wesser has contributed several fixes related to CJ’s animations in vehicles:


Can’t recruit anyone? That’s what you get for playing without a disc!

This is a fun bug, and likely the main reason why speedrunning San Andreas on a 1.01 patch is preferable! On the surface, it’s just a simple error – once the player activates a replay, recruiting gang members by aiming them and pressing a button is no longer possible. Although it was never mentioned in the official changelog, no one ever observed this issue in the 1.01 version of the game, only in 1.0, so it was assumed that it was just fixed there.

However, Wesser found out there’s more to that. This is not a game bug – instead, it was a mistake made when HOODLUM initially defeated SecuROM in the 1.0 executable back in 2005! A chunk of code obfuscated by DRM was decrypted incorrectly, resulting in this breakage, which has later been carried over by listener to his famous Compact EXE. Wesser figured out this issue in detail and reimplemented the missing chunk of code that’s now also included in SilentPatch.

If only listener was still around to update the Compact EXE… 😔


Fire! Fire! Oh, wait…

Has this ever happened to you? You’re minding your business somewhere in San Andreas, then out of nowhere, a 🔥 fire 🔥 breaks out! You don’t have a fire extinguisher with you, but there’s a solution: you recall that there are fire extinguishers spawned in all food joints, and there’s The Well Stacked Pizza Co. just around the corner! You mash the sprint button as fast as you can, hoping to save the day, you enter the place and…

The pickup is not there!? 🧯❌😭

Fortunately (or unfortunately?) for you, that’s not randomness, but a bug. While San Andreas is generally OK at resetting the game state on restarting a new game within the same session, and SilentPatch further improves the situation by resetting a few more variables that were missed, map IPL files also exhibited a similar bug. While binary IPLs re-initialized fine due to their streamed nature, text IPLs initialized several in-game spawns only once on game start, and never again – so starting a new game after loading an existing save resulted in those spawns simply not being present. Those are:

In this release, SilentPatch keeps track of those IPL definitions and re-initializes them when starting a New Game. Sadly, the existing saves affected by this issue cannot be automatically fixed, but at least any future playthroughs will have the missing items spawn reliably.


Carl Johnson is an innocent man!

Back in 2005 or 2006, when I was casually messing around in San Andreas as a kid, I often found myself in a familiar situation: I’d get a wanted level, biker cops would come after me, then I’d enter the legendary AEZAKMI cheat code to get rid of the pursuit, and yet… the biker cops would keep shooting at CJ. Annoying, right?

Rude.

In 2024, I finally dived into this issue, and after some heavy debugging, I realized it happens because of an oddity in how the specific Drive-By task used by the biker cops is coded: unlike all the other pursuit activities, the drive-by task is actually the same as the one used by the gang members, and thus it’s not coded to automatically finish when the player loses pursuit!

In SilentPatch, I updated the code to check if a cop aborting pursuit has a TASK_SIMPLE_GANG_DRIVEBY task active, and if they do, cancel it. It works great and fixes one of the game’s quirks that used to annoy an 11-year-old Silent 😅.


BOOM! Where did that wheel go?

In GTA III and Vice City, exploding vehicles would always lose their front left wheel. In an attempt to improve this feature in San Andreas, the developers made it detach a random wheel on explosion instead. However, Rockstar half-baked this improvement – the wheel may have detached visually just fine, but as far as the physics was concerned, the old behavior of always losing the front left wheel persisted. This results in a new visual glitch, where the wrong wheel sinks:

That… isn’t how physics works.

In this update, I fixed multiple bugs related to this feature:

Much better.

This fix also comes with an unintentional but cool side effect – exploding the vehicle multiple times using cheat codes can make it lose multiple wheels, eventually leaving a wreck with all four wheels detached!


That’s not a bazooka, Zero

“Air Raid”, the first mission given to the player by Zero, is an interesting case of Rockstar trying to fix script errors… and failing. This mission places CJ in a turret mode operating a minigun that is given to him only for the duration of the mission. In the original PS2 version, and PC 1.0, this mission “steals” the player’s heavy weapon entirely, and there is no way to avoid it. In 2.0, Rockstar attempted to fix it by saving information about the existing weapon on this slot, and it was given back to the player afterward. However, the script fails to load the weapon model, so the player… is given back an invisible weapon instead. Don’t try to use it – your game will crash!

Don’t touch that dial gun.

Thankfully, this mistake wasn’t severe, and simply saving the game, and then reloading that save, fixes it. Nonetheless, in this update SilentPatch injects a proper fix to this mission, ensuring that the weapon is preserved, and the model is loaded correctly.


Where are you going, homie? We got work to do!

Amidst the chaos of the Los Santos riots in the final parts of San Andreas’ story, the game presents a rather frustrating quirk. At random points, gang members in CJ’s group can abandon him and flee, seemingly for no reason. While this might add some interesting dynamics during free roam, it can be a deal breaker during missions. Therefore, Nick007J dived into the code to thoroughly understand these events.

  1. At regular intervals, the police chopper flying above the city targets a random gang member. This can be someone from CJ’s group or any other random person.
  2. The targeted person starts fleeing, trying to escape the chopper.

SilentPatch refines this feature slightly to prevent it from being a hindrance – during missions, CJ’s group can no longer be targeted by the chopper.


UFO, shooting star, or both?

One of the mysteries “haunting” San Andreas since the dawn of time is the presence of unusual black dots rapidly moving in the sky. People theorized it may be a strange raindrop, a shooting star, or… UFO. This was something I was aware of for a while, but only after Bob El Aventurero made a detailed video trying the unravel this mystery I looked into this phenomenon in more detail:

The video touches on the technical side of this effect a bit, stating that it is supposed to be rendered as a single-pixel-wide white line, but doesn’t answer the question as to why it comes out black instead. Turns out it renders as such only because… it attempts to draw using the cloud texture. Since the line is just a single pixel wide and it has no UV data, it most likely sampled the top left corner of the cloud texture, ignoring alpha. The fix, as usual, is trivial – draw the star with no texture. At last, the mystery is put to rest:


Ninja jacking begone!

Twitter user Radiant Eclipse asked Obbe Vermeij an interesting question regarding a well-known, yet mysterious bug/feature:

I asked Nick007J if he looked into this before, and he did, but without a definite answer – so we decided to look into this again. It turns out that in the event of the player holding the throttle and/or brake buttons while jacking the car from the passenger side, the game does the following checks:

This sounds… backwards, especially since a different code path in the same function had those checks switched around. We theorized that this was likely just a mistake and the conditions were meant to be swapped, but only once ultragirl468 ran tests themselves, we had definite proof. They managed to jack the car from an already dead driver, and…

The driver leaves the car, then promptly dies (again).

This was the proof we needed – simply inverting the check fixes this issue. Now alive drivers stay alive, and dead drivers stay dead. This issue was also fixed in the Definitive Edition (but not the “classic” mobile/PS3/X360 releases), where it behaves the same way as the classic San Andreas with my fix applied.

You could say that someone… told Obbe it happened again ;)

Multiple monitors, multiple problems

This section contains affiliate links, meaning I get a commission for every purchase made through them.

Recently, I was invited to a promo campaign and received a JSAUX FlipGo, a portable dual-screen monitor. Before I only had a single monitor, so only now I realized how strange the monitor selection dialog in GTA San Andreas is. Since I was now “affected” by it, I fixed several annoyances present in that dialog and enhanced it with some QoL improvements.

The stock dialog looks a bit sad and lists the GPU names, which can be confusing.
With SilentPatch, the dialog looks modern, uses user-friendly monitor names, and can be skipped.

I’m dizzy, hazy, and I see funny under the water

Thought we were done with the resolution scaling issues, after all the problems I already detailed earlier? Haha, no.

San Andreas post effects are not only the most elaborate out of all 3D-era games but also quite different between PS2 and the other platforms. That said, the heat haze effect appears to be identical between PS2 and PC… at least if you don’t keep changing the resolution in-game. If you do, weird things can happen – here’s how the effect looks if you run the game in 4K, and then change the resolution to 640x480:

This edible ain’t shi-

A simple game restart solves this, so it’s not a critical bug – nonetheless, it has been fixed in this update of SilentPatch, so now the effect rescales properly once settings are changed.


But, there is more! The ripple effect when the camera is underwater, as nice as it is, also looks slightly distinct at different resolutions. It’s not broken per se, as it mostly scales fine, but the frequency of the wave effect is noticeably higher at high resolutions. This has now been fixed, so the effect looks consistent:

From left to right – stock game at 640x480, stock game at 4K, SilentPatched game at 4K.

Other fixes


Internal changes

Aside from all the new fixes, for this release, the codebase of SilentPatch has also been heavily modernized, and multiple fixes have been… well, fixed. Some of those changes are well worth highlighting.

Some of those points might get a little technical, but they may be useful for modders who want to be mindful of keeping compatibility with SilentPatch or are looking for tips on how to make their projects apply code patches in a more resilient way.

Download and source code

The latest SilentPatch builds can be downloaded from the Mods & Patches section:

Download for GTA III Download for GTA Vice City Download for GTA San Andreas

Those new to SilentPatch are encouraged to check the Setup Instructions. However, the easiest way to install SP boils down to:

Wish to check out the source code instead? Check it out on GitHub. I have also included the compilation instructions and contribution guidelines:

See source on GitHub

TJGM has also published a showcase video focusing on San Andreas, covering many of the additions introduced in this update of SilentPatch:

Credits and acknowledgments

This update was only possible thanks to the contributions of many individuals. Multiple modders generously shared their findings and fixes, which were later integrated into SilentPatch. Others took their time to test the patch through its many iterations to ensure I could ship it in a near-perfect state:

Contributors:

Testing and socials:

Testing:

Last but not least, a special shout-out to Obbe Vermeij for all the GTA development trivia he’s shared with the world, and most importantly, for all the work he put into the games we still care about decades later 🙌.

Future of SilentPatch?

Will there ever be another SilentPatch for the GTA games? I don’t know. Half a decade passed between “The Corona Update” and this post, so if that’s any indicator, it’s likely there won’t be. However, I am acutely aware I’ve said “no more new fixes” at least twice throughout the lifespan of SilentPatch for San Andreas, so… you never know.

SilentPatch has since thrived as a “brand” outside of GTA, breathing new life into many other old (and newer) games. Whether or not GTA receives more updates in the future, I’m sure many more releases and blog posts are to come. May classic games continue to bring joy to both new players and those reliving their childhood memories!


  1. Another example of a bug I deliberately left intact would be the car crusher glitch – it’s amusing, harmless, and requires an elaborate setup, so there’s almost no chance of an unaware player stumbling upon it by accident. 

  2. reverselights and indicators dummies also exist on GTA III’s models, but they were never used, even on the PS2. 

  3. Yes, these glows are infamous coronas. 

  4. I explained backface culling a while ago in the context of cars in San Andreas. 

  5. In reality, the gesture looks different, but the game refers to it internally as shaking the fist. 

  6. Regular followers on my Twitter know how vocal I am about this particular issue, to the point of being annoying. I don’t intend to stop, as it’s for the benefit of all the players, including myself. 

Share