Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Say without echo in onHear event #3031

Merged
merged 2 commits into from
Feb 6, 2022
Merged

Say without echo in onHear event #3031

merged 2 commits into from
Feb 6, 2022

Conversation

MillhioreBT
Copy link
Contributor

With this modification you will be able to speak within the listening event without overflow problems when starting an infinite listening loop

This was mentioned in the following PR: #3001 and #3004
I decided to make my own version, it is quite simple and fix the problem perfectly, if this can be improved please tell me.

With this modification you will be able to speak within the listening event without overflow problems when starting an infinite listening loop
src/events.h Show resolved Hide resolved
@Zbizu
Copy link
Contributor

Zbizu commented May 9, 2020

To be honest I didn't want to add another parameter to creatureSay that is full of them already, but if it's necessary, then it would be nice to have it in creature:say(...) in lua as well.

@MillhioreBT
Copy link
Contributor Author

To be honest I didn't want to add another parameter to creatureSay that is full of them already, but if it's necessary, then it would be nice to have it in creature:say(...) in lua as well.

It is a hidden parameter, it is not handled from lua, the only thing that does this is detect if the Creature.say function is running inside the onHear event and thus avoid feedback.

@DSpeichert DSpeichert merged commit 22a901a into otland:master Feb 6, 2022
Znote pushed a commit to Znote/forgottenserver that referenced this pull request Feb 23, 2022
With this modification you will be able to speak within the listening event without overflow problems when starting an infinite listening loop
DSpeichert pushed a commit that referenced this pull request May 9, 2022
With this modification you will be able to speak within the listening event without overflow problems when starting an infinite listening loop
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.

4 participants