Skip to content

Fix network message crash - #85

Closed
Staaar0 wants to merge 1 commit into
Source2ZE:mainfrom
Staaar0:main
Closed

Staaar0 wants to merge 1 commit into
Source2ZE:mainfrom
Staaar0:main

Conversation

@Staaar0

@Staaar0 Staaar0 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Issue

After CS2 Nov 11, 2026 Update, MultiAddonManager crashes the server on the first message it sends to a client. The new signatures don't fix this, because the signatures aren't the cause.

When it happens

  • A client connects. The CServerSideClientBase hook sees every message sent to a client.
  • A plugin calls AddClientAddon with a refresh through IMultiAddonManager, which crashes in GetAddonSignonStateMessage.

Cause

The update changed the network message system but kept the name NetworkMessagesVersion001:

  1. A message type is now a plain record (the name, then a create function), no longer an object with virtual functions. The hook's GetNetMessage()->GetNetMessageInfo() makes a virtual call on that record and crashes.
  2. FindNetworkMessagePartial moved from index 14 to 10, and AllocateMessage was removed. GetAddonSignonStateMessage uses both.

Fix

All in src/multiaddonmanager.cpp:

  • The hook reads the ID with pData->GetMessageId(). Its index is unchanged and it returns a constant.
  • A new AllocateNetMessage helper looks up the type through index 10, checks the name, and calls the record's create function. It returns nullptr on a mismatch.
  • The code no longer depends on the SDK's INetworkMessageInternal or NetMessageInfo_t.

@Staaar0 Staaar0 closed this Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant