Forum posts

Posted 4 months ago2023-11-30 11:31:11 UTC
in Coding help needed for PMPreCache plugin Post #348122
I'm not sure how hard it is to load VFileSystem009 from a plugin but IFileSystem in public/FileSystem.h has a FileExists method. I'm not sure how LoadFileForMe works but I imagine the buffer has a long life, and I believe it memory maps the file.

I think there are callbacks for when a player connects in the engine? Which one are you using to check? ClientConnect or something else in DLL_FUNCTIONS should hopefully let you hook the player joining a game.

I think strings allocated by ALLOC_STRING last as long as the engine is running but I don't believe it's smart enough to check for already allocated strings.
Maybe use a cvar that selects the game rules.
Posted 4 months ago2023-11-30 11:23:00 UTC
in Better bots than Zbot Post #348120
I've only used zbot myself but podbot is an option - there are probably others. Check out Bots United as it has a few options.
Posted 4 months ago2023-11-30 11:22:05 UTC
in LoadBlob.cpp NULL!=hmoduleT Post #348119
Yeah it was still happening with the latest update, but I figured it out.

I hadn't quite disabled all the external .dll files - I was still linking steam_api.lib which seems to run some code automatically, and apparently Half-Life updated the version of the Steamworks SDK it was using. Previously it was using 1.42 but as of the these recent changes, it's now using 1.53a (which is still somewhat old).
Okay I figured it out - the engine ran the game at the same resolution as my screen which obscured the border - so it was windowed, just huge.
I've tried adding -window -condebug to the command line parameters for one of my mods through the Steam UI but the mod still loads full screen. Is this not working at the moment?
Posted 4 months ago2023-11-26 09:00:40 UTC
in LoadBlob.cpp NULL!=hmoduleT Post #348092
I know this is due to the 25th anniversary update but my mod is still failing to launch with this error and I'm not really sure what the cause is. I thought the last patch fixed most mods not launching.

I've tried disabling the Steam API and all the external .dll files I'm loading but no luck. Source code is at https://github.com/tschumann/basis if that helps. The issue is somewhere in client.dll anyway - if I get rid of my client.dll the game reaches the main menu.
Posted 4 months ago2023-11-26 08:55:16 UTC
in 64-bit GoldSource engine? Post #348091
Yes looks like it - the cs_amd64.so looks like it was built with gcc 3.2.2 so very old.
Posted 4 months ago2023-11-26 08:54:29 UTC
in Terror-Strike template? Post #348090
I think the Counter-Strike update before last had some stuff enabled but the last patch fixed it.
Posted 5 months ago2023-11-12 09:41:53 UTC
in 64-bit GoldSource engine? Post #348021
I'm pretty sure that the GoldSource engine is and always has been 32-bit, but I've noticed that the Linux/dedicated server builds have a few _amd64.so files (and equivalent _i686.so files).

I'm guessing that the _amd64.so files are just unused but does anyone know why they're there or when they started shipping? I'm pretty sure they've been there since before Counter-Strike had a Linux port anyway.
Posted 5 months ago2023-11-12 09:38:44 UTC
in Half-Life Featureful SDK Post #348020
Nice work.
Posted 5 months ago2023-11-12 09:36:12 UTC
in Is GoldSource still cool Post #348019
Sure it. Like Doom, Duke Nukem 3D, Quake etc, it's still an engine that isn't too complicated to understand.
Posted 2 years ago2022-03-25 10:52:51 UTC
in Shiny missing texture? Post #346361
Is there an error in the console?
Nice - I'll have to put some time aside for this.
Posted 2 years ago2022-03-25 10:47:30 UTC
in Creating a basic bot Post #346359
I think the Half-Life SDK has the Counter-Strike bot code: https://github.com/ValveSoftware/halflife/tree/master/game_shared/bot
It is probably more advanced than botman's code but it won't work without a lot of modification.
Posted 2 years ago2022-03-06 06:06:08 UTC
in Problems when level changes [Coding] Post #346322
Agreed - the logic for HealthThink should be part of CBasePlayer.
Posted 2 years ago2022-03-06 06:04:40 UTC
in Model spawning at wrong coordinates Post #346321
Are these models you've made yourself? I think that happens if the origin of the model is wrong.
I think player models have their origin in the centre of the model but other human models have it in the middle of the feet.
Posted 2 years ago2022-03-06 06:02:26 UTC
in compile crash 512 textures Post #346320
It's crashing the compiler right? Or the model viewer?
Do you have the source so we can try and see why it crashes?
Posted 2 years ago2022-02-20 00:02:02 UTC
in Problem with water reflections in 3D Skybox Post #346290
Hm not sure - are there any retail maps in any Source game with water in the skybox?
Posted 2 years ago2022-02-02 20:25:08 UTC
in Half-Life Updated (custom SDK) Post #346245
I've also added a new debug-only feature to help diagnose incorrect usage of SetThink, SetUse, SetTouch and SetBlocked. If you try to set one of these to a function pointer that does not belong to the class hierarchy of the entity that you're setting the function on you'll get an error message in the console warning you about it. Setting a function incorrectly can cause strange bugs and crashes so this will help a lot.
Where is that change? I couldn't see anything obvious in the most recent commit messages.
Posted 2 years ago2022-01-30 09:41:57 UTC
in compileX Post #346240
Yes CST is open source.

My plate is full and I'm not too familiar with how rad or lighting works. I want to read Michael Abrash's book at some point though.
Posted 2 years ago2022-01-27 10:38:37 UTC
in Quake (alias) models in Half-Life Post #346238
Yep that looks like it - thank you!
I didn't have heaps of time to track it down but they're defined in sounds/sentences.tx (HEV_TRIPMINE for example) - not sure where they get played in the code but CBasePlayer::SetSuitUpdate looks related.
Posted 2 years ago2022-01-27 10:24:07 UTC
in compileX Post #346236
Ah - maybe there would be information in the original Source SDK but it was probably removed with the Episode One changes.
Posted 2 years ago2022-01-23 08:38:09 UTC
in compileX Post #346222
Oh, I didn't realise there were compile tools for the Xbox version of Half-Life 2.
What was there? Episode One studiomdl and early map compile tools (maybe Custom Source Tools a.k.a cst) should work out of the box I think - just no .xtf exporter.
Posted 2 years ago2022-01-23 02:27:00 UTC
in Quake (alias) models in Half-Life Post #346220
I remember on another forum seeing a modder using Quake models (called alias models by the engine) in Half-Life.
I tried this myself and the models load but are rendered full-black but his models were properly rendered (probably custom client.dll code).

Does anyone remember this? I've tried to track it down but couldn't find it.
Posted 2 years ago2022-01-23 02:18:17 UTC
in compileX Post #346219
Which vanishing do you mean?
Posted 2 years ago2022-01-23 02:12:29 UTC
in [help] Rendering a model fullbright Post #346218
Yes I think you're right - I could have sworn that an extra one of those texture flags was secretly usable but I can't remember where I saw that.
Posted 2 years ago2021-12-24 04:50:04 UTC
in [help] Rendering a model fullbright Post #346158
I tried the STUDIO_NF_FULLBRIGHT flag but that didn't seem to work - I thought I'd discussed it with someone and it worked in Half-Life.
What do you mean you saw stairs? The image is a bit small to see what is going on.
Nice work @malortie.
Posted 2 years ago2021-12-24 04:42:32 UTC
in Swapping between players Post #346155
Hm, is it possible to swap the edict_t* of the players?
Posted 2 years ago2021-12-20 23:04:05 UTC
in [help] Rendering a model fullbright Post #346145
The studio.h that ships with the latest SDK has a STUDIO_NF_FULLBRIGHT flag. I haven't tried it to see if the engine supports it but if it does you could IEngineStudio.SetForceFaceFlags( STUDIO_NF_FULLBRIGHT ); in StudioModelRenderer
Posted 2 years ago2021-12-20 22:59:29 UTC
in Help Client.dll not found Post #346144
Did you manage to get client.dll to load before you made your changes?
Posted 2 years ago2021-12-20 22:59:03 UTC
in Specific PAK file loading Post #346143
Yeah this probably isn't really doable - you could load both sets of models with different names and do conditional rendering in client.dll based on the map name but that's probably about it.
Nice work - did you recode it all by hand?
Posted 2 years ago2021-12-20 22:52:58 UTC
in Swapping between players Post #346141
I thought about how to do this a while ago but never looked into it, and I don't know what the Decay mod did but I imagine you could decompile their .dll and see.
I'd try just swapping the pev of the two players and see how that goes.
Posted 2 years ago2021-12-20 22:51:15 UTC
in adding back the alpha 0.52 blood stream effect? Post #346140
Probably not easily - UTIL_BloodStream just sends an engine message that does predefined stuff.
You could spawn an entity that trails blood when something takes damage and make the entity move with a sinusoidal pattern. If you add the EF_GIBS flag to the model it will automatically trail blood.
Posted 2 years ago2021-12-20 22:42:30 UTC
in A bit of trouble making the hud purple Post #346139
Have you changed sprites.txt or something like that? Those code changes shouldn't change the sprites used.
How does it work? What is GL_StudioDrawShadow + 35 in the engine?
Posted 2 years ago2021-12-20 22:38:35 UTC
in Messing with Half-Life controls Post #346137
The first one may be tricky - I'm not sure off the top of my how the long jump works but I believe there's a buttons variable and the code would check that both the crouch and jump bits are set. Changing it to double-tap of the spacebar would be doable - on the first jump set a flag on the player and if the player presses jump again within one second or whatever, long jump, otherwise clear the flag.
If Half-Life supports mousewheel press I think that would just be an extra binding in config.cfg
Posted 2 years ago2021-12-20 22:32:20 UTC
in Changing a texture's palette Post #346136
Player models have special texture palette handling: http://www.the303.org/tutorials/gold_remap.htm
Does it load with fewer than 32 materials? Source's HLMV might be hard-coded to only load 32 or fewer.
I'm not sure but it would be somewhere in the resources/ directories in one of the .res files. I think some of them have x any y coordinates but I've never tried playing with them.
Posted 2 years ago2021-12-20 22:23:26 UTC
in Changing Props,NPCs materials in game Post #346133
All you need to do is find the texture a (a .vtf file somewhere in the materials/ directory) and overwrite it.
VTFEdit lets you create new .vtf files: https://nemstools.github.io/pages/VTFLib-Download.html
I think there may be a PhotoShop plugin somewhere too.
Posted 3 years ago2020-09-20 11:23:35 UTC
in Post your screenshots! WIP thread Post #344726
Spawning models in 007 NightfireSpawning models in 007 Nightfire
I've been doing some playing around in 007 Nightfire: https://www.moddb.com/mods/sandpit-nightfire
It doesn't have VGUI though which is a shame.
Posted 3 years ago2020-09-20 11:20:36 UTC
in [HELP] Extending the sentence limit Post #344725
Do .seq files work without the trigger_sequence entity from Condition Zero Deleted Scenes?
If you're making a mod you should be able to get it to work by disabling backface culling in client.dll I think.
Posted 3 years ago2020-05-30 05:38:33 UTC
in A Utopia At Stake Post #344326
Also, in model_t textures is a texture_t** - is this to deal with animated textures or something? I never noticed it before to give it any thought.
Posted 3 years ago2020-05-24 07:45:00 UTC
in A Utopia At Stake Post #344291
Hm, I might have to do some digging (though the offsets and paloffset have both gone missing?) - fb_texturenum was definitely Xash3D specific I thought anyway.
Too bad there is no proper vanilla updated com_model.h - the one that always gets shared around I think has an out of date decal_t at least.