Authentic Handling of Mission-Related Barker Messages #266
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses two issues with the current implementation:
sP_CL2FE_REQ_BARKER
object are usually fixed within chunks. Meaning, the ID of the first available "mission barker" NPC is fixed, even if the player exits and reenters the chunk. This seems to be unlike the original game, and the client logic in this issue seems to have stayed constant through all the standard builds. Ergo, there is a need to decide the "mission barker" NPC on the server side (which appears to be chosen randomly within nearby NPCs in the original game's recordings).m_iBarkerType
, that controls which element of them_iHBarkerTextID
array (of the mission task that is selected by the client) gets to be the barker string that is sent back to the client. NPCs without am_iBarkerType
value between 1 and 4 (inclusive) cannot output mission-related barker text. In all recordings of the original game reviewed thus far, the game seems to respect which NPC can say which lines, which is unlike the current behavior where we randomize between the 4 barker type options. Therefore, the randomization is removed in favor of the authentic behavior observed.The revised behavior is as follows:
m_iHBarkerTextID
array.m_iHBarkerTextID
array; it is added to a list.