LAGonauta / MetaAudio

GoldSrc engine plugin for 3D sound
GNU General Public License v2.0
98 stars 14 forks source link

Stops working with the recent Half-Life 25th Anniversary update #57

Open megakarlach opened 7 months ago

megakarlach commented 7 months ago

MetaAudio seems to stop working with this new major update, crashing the game in background as soon when the game started. Checking the View Reliability History on Windows and this happened: image

The dll file shown the image was related to VC++ error, something that most HL1 mods and even games like CS 1.6 also had the same issue.

Game will still work alongside with MetaAudio if the "steam_legacy" beta build was selected, which downgrades the game to the 2020 version.

EDIT: For those who want a workaround and install MetaHookSv + MetaAudio on HL25, see this paste: https://pastebin.com/L5BTxMVW

LAGonauta commented 7 months ago

I will take a look as soon as I am able to, the new update is really neat! Time to replay HL1... But if someone has time available to look at it, feel free to do so. I don't have much time nowadays :( I will review and merge any PR to fix this issue.

hzqst commented 7 months ago

Valve pushed mutiple breaking changes to engine interfaces and they switched to modern compiler (msvc-v142 or msvc-v143, I'am not sure) which might break the previous found signatures.

Known breaking changes:

class IFileSystem_HL25 : public IBaseInterface
{
public:
    virtual void Mount(void) = 0;
    virtual void Unmount(void) = 0;
    virtual void RemoveAllSearchPaths(void) = 0;
    virtual void AddSearchPath(const char *pPath, const char *pathID = 0) = 0;
    virtual bool RemoveSearchPath(const char *pPath) = 0;
    virtual void RemoveFile(const char *pRelativePath, const char *pathID = 0) = 0;
    virtual void CreateDirHierarchy(const char *path, const char *pathID = 0) = 0;
    virtual bool FileExists(const char *pFileName) = 0;
    virtual bool IsDirectory(const char *pFileName) = 0;
    virtual FileHandle_t Open(const char *pFileName, const char *pOptions, const char *pathID = 0) = 0;
    virtual void Close(FileHandle_t file) = 0;
    virtual void Seek(FileHandle_t file, int pos, FileSystemSeek_t seekType) = 0;
    virtual unsigned Tell(FileHandle_t file) = 0;
    virtual unsigned Size(FileHandle_t file) = 0;
    virtual unsigned Size(const char *pFileName) = 0;
    virtual long GetFileTime(const char *pFileName) = 0;
    virtual long GetFileChangeTime(const char *pFileName) = 0;//<---Added in the latest engine

I sugguest that replace the old metahook with MetaHookSv which has better support for different sorts of engines (blob, 3266, 6354, 8684, HL25)

LAGonauta commented 7 months ago

Thanks, I will replace it with MetaHookSv. I see that you already added support to the new engine 😁

remexcz commented 7 months ago

Wait, is it possible to use MetaAudio with the latest update to Half-Life? I redubbed the whole Blue Shift to my native language and used this mod to make it possible. Now it doesn't work and I don't want to use the old version...

LAGonauta commented 7 months ago

Yes, we are working on it. You can download a preliminary build here if you have a GitHub account.

remexcz commented 7 months ago

Thank you so much!

remexcz commented 7 months ago

"Compiled binaries not found ! You have to download compiled zip from github release page or compile the sources by yourself before installing !!!"

M00nBr1ght commented 7 months ago

"Compiled binaries not found ! You have to download compiled zip from github release page or compile the sources by yourself before installing !!!"

getting the same error

LAGonauta commented 7 months ago

Yeah, the folder structure is not correct yet. However, you can find sndfile.dll, metaaudio.dll, and metahook.exe in that archive and they are all you need.

remexcz commented 7 months ago

That worked, thanks

Stuphfers commented 7 months ago

I just want to double check, does the command al_doppler work with the new update? I'm not getting any changes when using it.

Lifeisstrange74 commented 7 months ago

image getting this error when trying to launch it using a shortcut with the preliminary build, why is this happening?

LAGonauta commented 7 months ago

@Lifeisstrange74 did you also upgrade the metahook.exe? It also needs updating if you didn't.

@Stuphfers it should not affect doppler, unless I need to change how the speed of each entity is calculated due to the engine changes.

M00nBr1ght commented 7 months ago

@Lifeisstrange74 did you also upgrade the metahook.exe? It also needs updating if you didn't.

I was having issues with the program not functioning separately from this issue. I attempted to fix this by installing metahooksv which ironically is causing me to have the same error message as lifeisstrange74... ha... I appreciate your help but I think for right now Im gonna wait for a more stable build. Thank you so much for your continued support of the project!

hzqst commented 7 months ago

image getting this error when trying to launch it using a shortcut with the preliminary build, why is this happening?

Valve added bunch of shit to the engine in the buildnum 9891 update which broken the signatures.

See: the spaghetti code after cl_righthand

image

I'm gonna fix this asap.

EDIT: Updated signatures has been committed in the latest build of MetaHookSv.

remexcz commented 7 months ago

Do you think you'll be able to release the stable build in November? I announced that my mod will be released this month, but releasing it isn't possible without MetaAudio. And i just want to say that I appreciate you updating it and by no means want to push you, I fully respect you have more important things to be doing.

LAGonauta commented 7 months ago

@remexcz I don't think so, just found more issues. Maybe you can use the old engine for now?

@hzqst It seems that cl_time, cl_oldtime, cl_waterlevel, cl_parsecount, and cl_servercount are all wrong with HL25.

cl_time and cl_oldtime are quite easy to fix (your Renderer also uses them), I copied how you search for it in MetaAudio and it worked but I still need to push. This fixes the velocity calculation for the doppler effect.

But I didn't understand the magic to find cl_parsecount and the others, would you mind fixing it when you get the time? I figure it is not trivial. Thank you. These are necessary for various functionalities, such as: freeing the cache on map change, muffling the sound when underwater, setting the audio source origin, and other things.

hzqst commented 7 months ago

@remexcz I don't think so, just found more issues. Maybe you can use the old engine for now?

@hzqst It seems that cl_time, cl_oldtime, cl_waterlevel, cl_parsecount, and cl_servercount are all wrong with HL25.

cl_time and cl_oldtime are quite easy to fix (your Renderer also uses them), I copied how you search for it in MetaAudio and it worked but I still need to push. This fixes the velocity calculation for the doppler effect.

But I didn't understand the magic to find cl_parsecount and the others, would you mind fixing it when you get the time? I figure it is not trivial. Thank you. These are necessary for various functionalities, such as: freeing the cache on map change, muffling the sound when underwater, setting the audio source origin, and other things.

I've pushed a pr that should address the problem with cl_time, cl_oldtime, cl_waterlevel, cl_parsecount, and cl_servercount.

Mutch0199 commented 7 months ago

I got the preliminary build up and running and it works great! thank you so much.

Dantrigger commented 7 months ago

Hi all,

I'm having crashes almost immediately with the latest build after starting the game and also when loading a save game. Do you know how can I fix this?

QcSamuel commented 6 months ago

while waiting for a official release what is the correct folder structure to install metaaudio ?