Garry's Mod

Garry's Mod

46 ratings
Fixed HL2 Jeep Viewpoint
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Vehicle
Addon Tags: Fun, Roleplay
File Size
Posted
2.195 MB
28 May, 2024 @ 9:54am
1 Change Note ( view )

Subscribe to download
Fixed HL2 Jeep Viewpoint

Description
A quick fix to the Half-Life 2 jeep where the driver eye position is lowered down 10 units in Garry's Mod.
Changes it up by 10 units, effectively restoring the driver eye position to what it should be.

Note that none of the other vehicles seem to have this issue as far as I can tell.
The airboat and the jalopy seem to be using their proper driver eye positions. It's just the jeep that's messed up.

This applies to EVERY HL2 jeep replacement when porting them to Garry's Mod. The viewpoint MUST be changed up by 10, otherwise it'll be too low in GMod.
This also applies to porting GMod vehicles to HL2. The viewpoint must be lowered by 10, otherwise it will be too high in HL2.

Source files aren't available due to the fact that I used the 2023 Valve repo gigaleak's files for this. I don't think I'm allowed to redistribute that. But the pictures above show how to fix the driver eye position on your model.

Alternate GameBanana download: https://gamebanana.com/mods/516512


Note to anyone that would prefer not to install this addon but still wants the jeep view position fixed:
Put the command "r_VehicleViewDampen 1" into the console. That will restore the view position to what it should be. For some reason it defaults to 0 in Garry's Mod when it should be 1 (what Half-Life 2 has it set as by default). Also note that this command is marked as a cheat, which means you need to turn on cheats to change it.
Special thanks to Knefissen for pointing this out.
63 Comments
TotalChaos  [author] 27 Dec, 2024 @ 11:31am 
You have no idea how easy it is to port weapons compared to other entities, like NPCs or vehicles. That code is such a mess that I can't even read it. I'm no expert at C++ or coding in general, but I certainly know nightmare spaghetti code when I see it.
And I'm not the only one, because there's a serious lack of documentation out there for how Half-Life 2's internal systems work, like the vehicles.

I can personally guarantee you I'll never attempt this. Porting weapons, excluding the weapon bases, is one thing. Porting everything else is something else entirely. I don't have the knowledge or the skill to pull this off, and I don't think I ever will.
Here's to hoping someone crazier than me will give this an attempt and succeed.
Home (KOD) 27 Dec, 2024 @ 11:17am 
I get where you’re coming from, and a full port of Half Life 2 or other games to GLua would be absurdly ambitious (and legally tricky), but honestly, the missing vehicle features like wheeldust feel like they should’ve been a priority for GMod from the start. It’s weird how the airboat kept its water effects, but wheeldust was left out, such a small detail, but it adds so much immersion. Fixing those kinds of issues would make GMod feel a lot more polished, especially for players who love using Half Life 2 assets. I get that GLua makes it harder to replicate the exact behavior from C++, but maybe breaking it down into smaller, achievable fixes could help? If someone like you, with your experience porting C++ weapons, focused on just one feature like this, it might inspire others to help fill in the gaps. It doesn’t need to be a full overhaul, just a step toward making vehicles feel as complete as they were in Half Life 2.
TotalChaos  [author] 27 Dec, 2024 @ 10:09am 
Weapons could be ported, and in fact, I've ported some weapons from C++ to GMod SWEPs myself before. With that knowledge alone it's theoretically possible that a full port of Half-Life 2 and the Episodes to GLua could exist in the future. Even the original Half-Life, Half-Life 2 Deathmatch, and even all the leaked games. It could be done.
Problem is, I highly doubt anyone in the Source modding community with enough C++ and GLua knowledge is insane enough to take on that herculean task. Plus, GLua is so different compared to C++ that a direct port would mean some entities don't behave the same (I figured this out the hard way). Also, there might be some legal and security issues doing this, and both Valve and Facepunch probably wouldn't like all of those games being ported to GLua directly from the source code.
Home (KOD) 27 Dec, 2024 @ 7:20am 
Yeah, porting the entire Half-Life 2 codebase to GLua does sound like an absurd undertaking. But honestly, it would be a wild challenge that could fix a lot of the issues. Facepunch could’ve at least done more to streamline the integration between GMod and Half Life 2. I get that it would be a massive task, probably too much for any one person but it’s still a shame that some of the basic things that should’ve worked out of the box are just left broken.
TotalChaos  [author] 26 Dec, 2024 @ 3:03pm 
Here's an idea, fix Garry's Mod for Facepunch by porting the entirety of the Half-Life 2 codebase to GLua and working from there. But nobody in the right mind would try something as absurd as that.
Home (KOD) 22 Dec, 2024 @ 11:10am 
It’s frustrating that so many things were left broken or unfinished, especially when they could’ve made the experience better. The wheeldust effect is a small touch, but it would’ve been nice to have it working. I completely understand why you’d be hesitant to mess with the particle system, it’s a nightmare with bad documentation and inconsistent results.

And yeah, the airboat speedometer not working and the pump shotgun lacking a full reload animation when ammo reaches 0 are just some of the examples of how GMod didn’t do Half Life 2 justice. It’s like Facepunch focused too much on the sandbox and overlooked fixing these small but important details. I get if you’re done with it for now, but if you ever feel like revisiting or releasing any unfinished work, I’d love to see it. I know I’m not alone in wishing these things were better.
TotalChaos  [author] 21 Dec, 2024 @ 11:06am 
The wheel dust thing, that was one of the things I wanted to do. I didn't know how to get it to work, though, so I never wrote any code for it.
I could probably hack together a bunch of broken code to force it to work, but it would be a real pain to use. Assuming it even works at all.
I don't like messing with the game's particle effects, because 90% of them don't work or have a myriad of issues that are out of my control as a GLua coder. The wiki page that lists them all have most of their inputs left completely blank, and that really doesn't help.
Home (KOD) 21 Dec, 2024 @ 9:53am 
I totally get it, sometimes projects just don’t work out the way we hope, but the things you managed to implement were cool, like the instant start and the wind sound. It's unfortunate that the whole thing didn't come together, but I can definitely see how it could’ve been difficult to maintain, especially in multiplayer. If you ever decide to release your code or revisit the project, I think there are a lot of people who would appreciate the effort.

By the way, I’ve been really wanting the removed wheeldust effect for prop_vehicle_jeep to come back. I came across this Source SDK 2013 link: https://github.com/ValveSoftware/source-sdk-2013/blob/master/sp/src/game/server/fourwheelvehiclephysics.cpp that has some code in fourwheelvehiclephysics which might help with the coding side. If you ever find the motivation to add it, I’d be stoked, but totally understand if not!

Thanks again for all your hard work.
TotalChaos  [author] 21 Dec, 2024 @ 9:20am 
No. I kinda gave up on that.
The project was flawed since the very beginning. I made bad decisions while writing code, my code barely functions without it completely breaking, and honestly, I don't think anyone would be interested in half the things I was doing with it.
I implemented the 2004 thing where it starts instantly when you get in instead of waiting for the animation, a high speed wind sound that works based on how fast you're going, a passenger seat system, and headlights. But I don't trust that they won't break after extended use, or even trying to use them on multiple players in multiplayer.

I may release my code one day for the community to come in and fix up, or I might redo the entire thing from scratch, but as of right now the project is cancelled. Sorry.
Home (KOD) 21 Dec, 2024 @ 9:11am 
G´day Chaos, any good news with the development of the addon that restores cut features for prop_vehicle_jeep? Its been a while.