Half-Life Updated (custom SDK) Created 3 months ago2021-01-13 21:05:33 UTC by Solokiller Solokiller

Created 3 months ago2021-01-13 21:05:33 UTC by Solokiller Solokiller

Posted 3 months ago2021-01-13 21:05:33 UTC Post #345215
Half-Life Updated is an updated version of the Half-Life SDK that can be used with newer versions of Visual Studio and that includes both bug fixes added to the game but not the official SDK, and bug fixes not yet added to the game.

You can find the changelog here.

You can find the Updated source code here: https://github.com/Solokiller/halflife-updated
There is also a version that uses CMake, which additionally configures the project to deploy dlls to the mod directory and sets up debugging parameters: https://github.com/Solokiller/halflife-updated-cmake

The old thread about this lists other changes: https://twhl.info/thread/view/19592
Posted 3 months ago2021-01-14 00:55:22 UTC Post #345216
This is really interesting stuff! Does this fix the fast crowbar gib bug and the double shot bug from the glock's secondary fire?
Posted 3 months ago2021-01-14 09:55:15 UTC Post #345219
This is really interesting stuff! Does this fix the fast crowbar gib bug and the double shot bug from the glock's secondary fire?
No for both.
Posted 3 months ago2021-01-14 10:54:42 UTC Post #345220
This is really interesting stuff! Does this fix the fast crowbar gib bug and the double shot bug from the glock's secondary fire?
I can fix the crowbar bug, but what's the double shot bug exactly? Just so i know what to look for.
Posted 3 months ago2021-01-14 11:34:22 UTC Post #345221
Just as an aside, the crowbar fix is in SOHL - it's just 1 new line to add:

if ( !pEntity->IsAlive() )
      return TRUE;
      flVol = 0.1;
if ( !pEntity->IsAlive() ) { m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.25; //LRC: corrected half-life bug return TRUE; } else flVol = 0.1;
Penguinboy PenguinboyHaha, I died again!
Posted 3 months ago2021-01-14 12:20:12 UTC Post #345222
I can fix the crowbar bug, but what's the double shot bug exactly? Just so i know what to look for.
Probably the fact that client prediction can call events twice, I opened this related issue back in 2015.

Mods can compile the SDK without the CLIENT_WEAPONS pre-processor define enabled. This will however require the programmer to move the client sided stuff back to the server for weapons. In other words: revert what Valve did when they introduced the client prediction system. An alternative is to set the cl_lw CVAR (Console VARiable) to 0 (false).

However, I strongly advise to not do that since they are more "workarounds" rather than "proper fixes", especially if the mod supports multiplayer.
Posted 3 months ago2021-01-14 12:48:38 UTC Post #345223
I've fixed the crowbar issue using the fix i suggested on Github a while back, it'll be pushed soon.

I'm looking into the double shot issue. So far i've determined that the issue is caused by the client prediction code firing off a shot locally when the server isn't, which results in a simulated shot that never happens on the server side.

See this console output. There are 3 log calls, 2 of them are the client and server versions of the mp5's attack code, right below the event playback call, the other is in the event callback:
cl:  client fired mp5 1 times
server fired mp5 1 times
client event fired mp5 1 times

cl:  client fired mp5 2 times
server fired mp5 2 times
client event fired mp5 2 times

cl:  client fired mp5 3 times
client event fired mp5 3 times

cl:  client fired mp5 4 times
server fired mp5 3 times
client event fired mp5 4 times
The third shot only happens on the client due to prediction code running it, but never on the server side. I ended up with 4 shots too many after a full 50 rounds fired.

I think this is just a timing issue in the prediction code, so i'll see if i can isolate the cause, and perhaps find a way to make it run on the same timing logic as the server.
Posted 3 months ago2021-01-14 15:31:07 UTC Post #345224
I think i found the cause of it, i've provided an explanation and the fix here: https://github.com/ValveSoftware/halflife/issues/1621#issuecomment-760270846
Posted 3 months ago2021-01-14 17:50:48 UTC Post #345226
I've added the crowbar and the weapon timing fixes.
Posted 3 months ago2021-01-14 22:45:41 UTC Post #345228
I know i'm late but i've made a video showing the issue:
I'm currently working on a Half-Life project and i would like to ask if its ok if i get the fixed code for that issue and compile it with my SDK. I also want to congrats you guys for this fantastic work, it's nice to see that after all these years people is still giving this game the love it deserves.
Just as an aside, the crowbar fix is in SOHL - it's just 1 new line to add: https://github.com/LogicAndTrick/halflife-updated/blob/spirit/spirit-1.0/dlls/crowbar.cpp#L268
Nice! Thank you! I should try it out.
Posted 3 months ago2021-01-14 23:16:03 UTC Post #345231
It looks like that's the same bug. The fix i posted earlier doesn't seem to work for the glock so i'll have to look into that.

You have permission to use my work for your project.

EDIT: i've fixed the prediction sync issues entirely. It's consistent now, at least as far as ballistic weapons go.
Posted 3 months ago2021-01-15 00:12:28 UTC Post #345232
Wow, good work! I was just checking your explanation of the issue and when i updated the page the fix was already there. Compiled my SDK with the fixes made for the crowbar and the prediction sync issue of the weapons and it worked just fine.
Posted 3 months ago2021-01-18 04:05:59 UTC Post #345239

I reverted your crowbar change in my code though. :cool:
Posted 3 months ago2021-01-18 13:41:24 UTC Post #345242
@Cabo Fiambre
You're welcome, good to hear it's working.

Guess you prefer chainsaws over crowbars eh :P

I've added two new fixes: the raw mouse input fix from Half-Nuked and the shotgun pump sound fix. Thanks jay! for letting me know about these.
Posted 2 months ago2021-01-31 17:20:16 UTC Post #345308
I've fixed a bunch more issues.
Posted 2 months ago2021-02-06 19:53:53 UTC Post #345319
I've implemented a couple more fixes. This should now make halflife-updated up-to-date with all fixes that were added to the game but not the SDK.
Posted 2 months ago2021-02-06 20:11:05 UTC Post #345320
For those that want to play Half-Life with these fixes, i've provided a beta version: https://github.com/Solokiller/halflife-updated/releases/tag/V1.0.0-beta001
Posted 2 months ago2021-02-07 20:16:36 UTC Post #345323
Are there any other bugs or features missing from WON that anybody wants dealt with? I've re-implemented view roll as well so once all other stuff is taken care of i can release a second beta.
Posted 2 months ago2021-02-08 12:52:50 UTC Post #345324
Half-Life Updated Beta 2 is out: https://github.com/Solokiller/halflife-updated/releases/tag/V1.0.0-beta002
  • Re-implemented view roll
  • Re-implemented view model tilt
  • Fixed Egon gun beam colors being too bright
See the full changelog for more info
Posted 2 months ago2021-02-08 23:16:36 UTC Post #345325
Wow! Amazing work as always! I believe thats all of the WON features restablished.

This video here has some interesting things if you want to check it out:
While watching the video i shared i realized that the beam from the retail egon isn't properly aligned with the gun's barrel. I've took some screenshots from the video so you can understand what i mean (i know "alligned" is mispelled, sorry about that i'm dumb...).
User posted image
Posted 2 months ago2021-02-09 11:49:59 UTC Post #345327
I've already gone through everything in that video. Everything that can be fixed has been fixed. The 357 and MP5 seem to be fine already, corpse sounds can't be fixed because the data needed doesn't exist in the client side.

I tried to fix the egon gun beam issue but it's a real pain in the ass. The attachment offset isn't calculated properly for view models and the workaround is pretty ugly. I'm not sure if it will even work.
Posted 2 months ago2021-02-13 10:25:50 UTC Post #345341
can i compile this source code in visual studio 2017 and 2019 without any errors?
Posted 2 months ago2021-02-13 11:05:06 UTC Post #345342
Yeah that's kinda the purpose of this thing.
Posted 2 months ago2021-02-13 12:07:22 UTC Post #345343
I do some programming in c++ but I have never done anything in half-life source code. Would it be difficult to write such an entity, when after pressing E (Use) a text label with some text will open for me? I would like there to be some logs, notes that can be read in my mod.
Posted 2 months ago2021-02-13 13:40:19 UTC Post #345344
I don't think you need to make a new entity for that. A func_button combined with game_text can do that. Unless you need a lot of text.
Posted 2 months ago2021-02-14 15:58:55 UTC Post #345346
Is the "half-life-updated" repository the main one on which I can create mods? Because I saw on your GitHub another project "HLEnhanced" and I don't know where to start.

I gave a follow on your github,
ps. check out my github and also give follow [:
Posted 2 months ago2021-02-14 16:06:44 UTC Post #345347
Yeah half-life updated is the main one. HLEnhanced is deprecated.
Posted 2 months ago2021-02-15 08:33:41 UTC Post #345348
I think I found a fix for this (scientists not using the Scent lines near carcasses even though audio lines and sentences.txt are present) : https://github.com/ValveSoftware/halflife/issues/2982

// ISoundMask - returns a bit mask indicating which types
// of sounds this monster regards. In the base class implementation,
// monsters care about all sounds, but no scents.
int CScientist :: ISoundMask ( void )
return bits_SOUND_WORLD |
Scientists are missing the carcass/meat/garbage 'sounds' that barneys do listen to so just add those ->

`int CBarney :: ISoundMask ( void)
return bits_SOUND_WORLD |
Posted 2 months ago2021-02-15 15:28:25 UTC Post #345349
Thanks, i've added the information to the report and i've fixed it in Half-Life Updated.
Posted 2 months ago2021-02-16 22:26:28 UTC Post #345350
Nice work overall on the changelog, especially that chainsaw crowbar. Will try to use your projects issue tracker for other bugs.
Posted 1 month ago2021-02-23 20:16:08 UTC Post #345369
Half-Life Updated Beta 3 is out: https://github.com/Solokiller/halflife-updated/releases/tag/HLU-V1.0.0-beta003
Notable changes:
  • Made scientists aware of carcasses, meat and garbage so they can comment on it (Thanks NongBenz)
  • Fixed Human Grunt shotgun damage not using correct skill values
  • Fixed bugs causing incorrect field of view when loading save games/changing levels while zoomed in
  • Made cheat protected commands give, fov and impulse check the value of sv_cheats on demand instead of caching the value, enabling the use of these cheats without having to restart the map
  • Added new engine functions added in the latest engine updates
Posted 1 month ago2021-02-27 16:53:04 UTC Post #345381
Half-Life Updated Beta 4 is out: https://github.com/Solokiller/halflife-updated/releases/tag/HLU-V1.0.0-beta004
  • Added the option to change the default field of view to the Multiplayer Advanced dialog
  • Changed game directory name to halflife_updated
  • Updated delta.lst to use latest one from vanilla Half-Life (includes spectator variables)
  • Use correct number of bits for iuser2 to ensure spectating player with index 32 works correctly
  • Fixed sprite attachment bug causing sprites to appear in seemingly random locations
  • Fixed monsters being resurrected if triggered while dying
  • Made default_fov cvar archived
  • Fixed Tripmine & Python having wrong bodies sometimes when weapon prediction is enabled
  • Reset flashlight HUD status on save game load
  • Fixed ammo HUD drawing last weapon ammo if player has all weapons stripped
  • Fixed train HUD not restoring
Posted 1 month ago2021-03-16 10:54:58 UTC Post #345439
I've created a wiki page explaining what the 3 Updated repositories are about and what can and cannot be done with them: https://github.com/Solokiller/halflife-updated/wiki/About

I'm still working on each repository, there are a lot of fixes in already and more on the way.

I'm also currently working on Half-Life Asset Manager 1.1.0 to add in the features needed to fix some of the asset issues in Opposing Force (missing 357 reload sound, etc).
Posted 2 weeks ago2021-04-03 14:37:36 UTC Post #345497
Half-Life Updated, Opposing Force Updated and Blue Shift Updated betas have been updated:

Notable changes:
  • Fixed Gargantua stomp attack being framerate-dependent (halflife issue #2876)
  • Fixed trigger_camera rotation speed being framerate-dependent (halflife issue #2924)
  • Fixed flashlight icon not restoring properly on save game load (halflife issue #388)
  • Fixed gauss gun beams going in the wrong direction when player is viewing themselves through a camera (halflife issue #1744)
  • Fixed local player model using wrong pitch angles when seen through another entity (halflife issue #3075)
  • Fixed buttons not sparking in multiplayer (halflife issue #1681)
  • Fixed Half-Life HD and Opposing Force and Blue Shift LD and HD Revolver models not playing the reload sound (halflife issue 2351)
  • Whole bunch of code cleanup, removal of unused code, refactoring of duplicate code and constants, properly defining magic numbers
  • Fixed script in ba_yard4a that relied on a bug to break frozen Alien Slaves out of their frozen animation (halflife issue #3061)
Posted 4 days ago2021-04-18 05:24:06 UTC Post #345540
Would it be possible to make an API call while playing? You could then download some information to make the gameplay different and dynamic each time. I was thinking about firebase from google.
Posted 4 days ago2021-04-18 18:29:26 UTC Post #345541
Sure if you use a library that does HTTP queries or whatever. But that's way out of scope for this project.
You must be logged in to post a response.