Author |
Message |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: 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? _________________ 4,691 irradiated haggis! |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: 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. _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him. |
|
Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: 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. _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: 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? |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sun Mar 12, 2006 11:18 pm Post subject: |
 |
|
|
|
It could call chat->SendArenaSoundMessage(). |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: 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? |
|
Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: 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. |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Mon Mar 13, 2006 1:21 am Post subject: |
 |
|
|
|
Dr Brain wrote: | Are you sure it works manually? |
Yes. |
|
Back to top |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:41 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: 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. |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Mon Mar 13, 2006 2:13 am Post subject: |
 |
|
|
|
Good point. I'll make that test. |
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: 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. |
|
Back to top |
|
 |
Grelminar Creator of Asss
Joined: Feb 26 2003 Posts: 378 Offline
|
Posted: 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. |
|
Back to top |
|
 |
|