Server Help

ASSS Questions - Empty arena sound message and sgcompat

Mr Ekted - Sun Mar 12, 2006 1:54 pm
Post subject: Empty arena sound message and sgcompat
We are using sgcompat which translates *arena to ?aa. In powerbot, there's a call to PlaySound() which sends a message packet with the sound byte set and an emtpy "*arena". This works fine under subgame, but somehow ASSS is filtering it out when there's no text. Many other commands work fine with no arguments. I cannot seem to find the place in the source where this is tested. Any thoughts?
Cyan~Fire - Sun Mar 12, 2006 4:30 pm
Post subject:
Skimming the code, it looks like asss drops sounds attached to commands. Sounds like a bug to me.
Dr Brain - Sun Mar 12, 2006 9:28 pm
Post subject:
There's never been a good way to pass the sounds along with messages to commands. I would assume that grel just didn't want to code a hack for something that would most likely be handled by modules.

If you're looking for a temporary fix, code up a simple module that takes a bong number as an argument and recompile your bot core to use that. Should take less than 15 mins to accomplish.

If you're looking for a more permanent solution, then the command module would need to updated to pass a sound argument along to the callback.
Mr Ekted - Sun Mar 12, 2006 10:28 pm
Post subject:
Maybe I'm just not getting something. The only way to send sound is to send it along with text. If I do "*arena %1", then what would a module do differently than to just pass the sound back to the clients as text again?
Cyan~Fire - Sun Mar 12, 2006 11:18 pm
Post subject:
It could call chat->SendArenaSoundMessage().
Mr Ekted - Sun Mar 12, 2006 11:27 pm
Post subject:
It works if I type "*arena %1" or "?aa %1" manually, but not if the bot sends the same thing. So what's the difference?
Dr Brain - Mon Mar 13, 2006 12:45 am
Post subject:
Mr Ekted wrote:
It works if I type "*arena %1" or "?aa %1" manually, but not if the bot sends the same thing. So what's the difference?


Are you sure it works manually? I'm pretty sure it doesn't. I was suggesting something like "?sound 5" sending everyone a %5.
Mr Ekted - Mon Mar 13, 2006 1:21 am
Post subject:
Dr Brain wrote:
Are you sure it works manually?


Yes.
Mine GO BOOM - Mon Mar 13, 2006 1:39 am
Post subject:
With your manual test, does it play the sound twice? Did anyone else confirm it?

If you are detected as being a mod in a zone, Continuum will play the mod sounds locally, unlike VIE. Thus, you can do *unduneu %5 and it will play locally.
Mr Ekted - Mon Mar 13, 2006 2:13 am
Post subject:
Good point. I'll make that test.
Smong - Mon Mar 13, 2006 6:42 am
Post subject:
I think %# always plays locally. It's up to the server to strip the sound from the message before forwarding it (you never get sent your own messages).

This touches on a potential bug if/when asss supports sounds in commands. The player sending the command may hear the sound twice unless asss cunningly sends a slightly different arena message to the originator.
Grelminar - Tue Mar 14, 2006 2:55 am
Post subject:
"?aa %1" definitely should not work. I explained this to Ek in-game, but for the forum: sounds aren't passed through commands at all. The options to fix this are either: don't support it and add a new command, change the command callback signature to add a sound parameter (very painful), or do a messy hack to pass the sound value in the command text somehow (either convert it back to %x, or put it at some offset from the start or end of the string). Since so few commands need this, I'm leaning toward the messy hack, if anything.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group