Skip to content

Support reading legacy sendprop arrays#1550

Merged
asherkin merged 1 commit intomasterfrom
legacy-gamerules
Aug 23, 2021
Merged

Support reading legacy sendprop arrays#1550
asherkin merged 1 commit intomasterfrom
legacy-gamerules

Conversation

@asherkin
Copy link
Member

This rounds out the work started in #1548 to complete support for
reading the older SendPropArray type array netprops, along with bringing
SDKTools' GameRule netprop code in sync with core to add string array
support.

There aren't many SendPropArray type props around but this opens up a
few interesting opportunities for plugin developers, particularly in
L4D2 with manipulation of the EMS HUD.

Tested reading the m_vCPPositions array in TF2, and reading/writing
the m_szScriptedHUDStringSet EMS HUD netprop in L4D2. Closes #1386.

@asherkin asherkin requested a review from psychonic July 20, 2021 23:51
@asherkin asherkin force-pushed the legacy-gamerules branch 2 times, most recently from fa11c54 to ce751d6 Compare July 20, 2021 23:58
Base automatically changed from array-prop-info to master August 1, 2021 18:44
This rounds out the work started in #1548 to complete support for
reading the older SendPropArray type array netprops, along with bringing
SDKTools' GameRule netprop code in sync with core to add string array
support.

There aren't many SendPropArray type props around but this opens up a
few interesting opportunities for plugin developers, particularly in
L4D2 with manipulation of the EMS HUD.

Tested reading the `m_vCPPositions` array in TF2, and reading/writing
the `m_szScriptedHUDStringSet` EMS HUD netprop in L4D2. Closes #1386.
@asherkin asherkin mentioned this pull request Aug 23, 2021
6 tasks
@asherkin asherkin linked an issue Aug 23, 2021 that may be closed by this pull request
6 tasks
{
return pContext->ThrowNativeError("Setting string_t gamerules prop %s not supported yet.", prop);

// *(string_t *)((intptr_t)pGameRules + offset) = g_HL2.AllocPooledString(src);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the extension API needs some work to expose AllocPooledString from core.

@asherkin asherkin merged commit 5ea096e into master Aug 23, 2021
@asherkin asherkin deleted the legacy-gamerules branch August 23, 2021 20:21
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.

SendProp type is not integer Implement array element parameter on GameRules_SetPropString

2 participants