halflife icon indicating copy to clipboard operation
halflife copied to clipboard

Fix a bug

Open elnurvl opened this issue 7 months ago • 2 comments

HUD message color variables are left uninitialized during the first few frames, causing a crash in the debug build of client.dll.

I replaced the duplicated initialization logic with a single line placed before the branching, since the variables are used regardless of the conditions anyway.

Fixes #1536

elnurvl avatar May 20 '25 10:05 elnurvl

We already proposed similar changes and they got merged with #1539, however they were reverted them with https://github.com/ValveSoftware/halflife/commit/0fc8913c542d6ba129ca8bede1505e7d2e8b4b4b:

  • https://github.com/ValveSoftware/halflife/commit/0fc8913c542d6ba129ca8bede1505e7d2e8b4b4b#diff-9203423ac932f9aa4e788c44e510c924891af4ba2f6453abdf028a24add6d412L71-L74
  • https://github.com/ValveSoftware/halflife/commit/0fc8913c542d6ba129ca8bede1505e7d2e8b4b4b#diff-44162cb21d9bc2023c9771f9b6631ad7b9a112e4bc98633d7b5fb442ee59dc46L150

dtugend avatar May 21 '25 07:05 dtugend

@shawns-valve , it seems the anniversary update reintroduced this bug. I guess the revert was unintentional, since it might be tricky to synchronize a big PR like that. If it was intentional, feel free to close the PR, though we’d be curious to know the reason.

elnurvl avatar May 21 '25 08:05 elnurvl