Skip to content

Conversation

@A1mDev
Copy link
Contributor

@A1mDev A1mDev commented Aug 17, 2025

The problem is that gpGlobals->curtime doesn't change in pause, it's used by dataprop m_fLastPlayerTalkTime, so chat doesn't work during pause, previously the code in the plugin compensated for this, which changed the default game behavior, and all the code in the game function Host_Say was ignored, and some things, such as plugins intercepting the player_say event, did not work correctly.

In fact, in this function Host_Say, there is a lot of code, much more than in plugin pause, for example:

  1. Adding a prefix to the message,
  2. Formatting the text in the correct form,
  3. Checking the validity of the message,
  4. Creating event player_say,
  5. Checking whether each player can hear you

Some bugs for example:

  1. HlstastsX (used to collect stats and chat) did not collect chat stats.
  2. Plugins allowing to ignore another player could not work.

The problem is that `gpGlobals->curtime` doesn't change in pause, it's used by dataprop `m_fLastPlayerTalkTime`,
so chat doesn't work during pause, previously the code in the plugin compensated for this,
which changed the default game behavior, and all the code in the game function `Host_Say` was ignored, and some things,
such as plugins intercepting the `player_say` event, did not work correctly.

In fact, in this function `Host_Say`, there is a lot of code, much more than in plugin `pause`,
for example adding a prefix to the message,
formatting the text in the correct form,
checking the validity of the message, creating event `player_say`,
checking whether each player can hear you, etc.

Some bugs for example:
`HlstastsX` (used to collect stats and chat) did not collect chat stats.
Plugins allowing to ignore another player could not work.
@SirPlease
Copy link
Owner

Good catch 👍

@SirPlease SirPlease merged commit a31e639 into SirPlease:master Aug 18, 2025
2 checks passed
@A1mDev A1mDev deleted the pause_fix branch September 22, 2025 00:40
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.

2 participants