Author |
Message |
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Sat Mar 14, 2009 2:24 pm Post subject: |
|
|
|
|
sure enough, it works nicely now :P
however, now i have two questions.
since multipub is now enabled, will the main pub overflow into 2 now?
and if i have the 2nd zone set to enter into 'arena' why do you get placed into 'arena1',
and is there a way to go arena, arena2, arena3, etc and NOT arena1, arena2, arena3, etc _________________ SSC Distension Owner
SSCU Trench Wars Developer |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sat Mar 14, 2009 5:14 pm Post subject: |
|
|
|
|
Cheese wrote: | since multipub is now enabled, will the main pub overflow into 2 now? |
I don't recall.
Cheese wrote: | and if i have the 2nd zone set to enter into 'arena' why do you get placed into 'arena1',
and is there a way to go arena, arena2, arena3, etc and NOT arena1, arena2, arena3, etc |
Rewrite the module. It's about as simple a module as you could ask for. _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Sat Mar 14, 2009 7:29 pm Post subject: |
|
|
|
|
ap_multipub.c is part of the core, would making a module overwrite its actions? |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sat Mar 14, 2009 7:59 pm Post subject: |
|
|
|
|
Cheese wrote: | ap_multipub.c is part of the core, would making a module overwrite its actions? |
Write a module that provides the interface that ap_multipub provides, then load your module and not ap_multipub. The core functions only care about finding an interface of the correct type. They don't care where it's located. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Sun Mar 15, 2009 6:56 pm Post subject: |
|
|
|
|
also, looking through the src, i cant seem to find how asss handles setting doors...
aka, it doesnt use cfg DoorMode, theres no game->door(250);, etc
or did i miss something...?
also, why does adding dmg watch crash my module?
just one line,
wd->ModuleWatch(p,1);
can crash it...
no compilation issues. |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sun Mar 15, 2009 8:28 pm Post subject: |
|
|
|
|
Cheese wrote: | also, looking through the src, i cant seem to find how asss handles setting doors...
aka, it doesnt use cfg DoorMode, theres no game->door(250);, etc
or did i miss something...? |
ASSS doesn't handle doors. The clients handle them.
Cheese wrote: | also, why does adding dmg watch crash my module?
just one line,
wd->ModuleWatch(p,1);
can crash it...
no compilation issues. |
Run it in a debugger. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Fri Mar 20, 2009 1:39 am Post subject: |
|
|
|
|
where can i find the code that deals with *timer and ?time?
also, will
cfg->SetInt(GLOBAL,"door","doormode",0,"open sesame!",1);
then
cfg->FlushDirtyValues();
make all the doors open for players? |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Fri Mar 20, 2009 5:34 pm Post subject: |
|
|
|
|
how would i ensure they get one?
when are they sent?
also, windows has a grep, i use it a LOT |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Fri Mar 20, 2009 8:18 pm Post subject: |
|
|
|
|
Cheese wrote: | how would i ensure they get one?
when are they sent? |
Read through the clientset module. See what conditions it takes to send out a clientset. It might even do it automatically when you update settings.
Cheese wrote: | also, windows has a grep, i use it a LOT |
More likely you've got Cygwin installed somewhere on your path. |
|
Back to top |
|
|
Hakaku Server Help Squatter
Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
Posted: Sat Mar 21, 2009 1:35 pm Post subject: |
|
|
|
|
Why exactly would you use cfg->SetInt, then use clientset to force the client to update its settings? I fail to see how this is more advantageous than using the first with cfg->FlushDirtyValues(); . Why not just only use clienset's AreanaOverride and SendClientSettings in the first place? |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sat Mar 21, 2009 2:34 pm Post subject: |
|
|
|
|
Well, FlushDirtyValues only writes changes back into the configuration files, and since you'd want to be using temporary setting for this, it'd effectively be doing nothing.
Using the clientset's arena override would be fine, but you need to be aware that random doors will cause you trouble if players have different clientset packets (since I believe the timing is based off of that). |
|
Back to top |
|
|
D1st0rt Miss Directed Wannabe
Age:36 Gender: Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
|
Posted: Tue Mar 24, 2009 4:31 pm Post subject: |
|
|
|
|
I believe the timers are reset with a synchronization request, so there might still be differences among clients but not due to the settings packets (unless you're talking about a transition from set to random I suppose) _________________
|
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Tue Mar 24, 2009 6:43 pm Post subject: |
|
|
|
|
I thought maybe its prng was seeded from a hash of the clientset. I haven't looked at it too much, though, since we don't use doors in Hyperspace very often. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Tue Mar 24, 2009 6:56 pm Post subject: |
|
|
|
|
how has the asss core gotten this far without an easy way to change door state?
its used a lot, and accordingly there should be a
game->Door(255)
or SOMETHING, ffs |
|
Back to top |
|
|
Initrd.gz Seasoned Helper
Joined: Sep 18 2008 Posts: 134 Location: Over there ---> Offline
|
Posted: Tue Mar 24, 2009 8:51 pm Post subject: |
|
|
|
|
Make your own function. |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Tue Mar 24, 2009 9:16 pm Post subject: |
|
|
|
|
Cheese wrote: | how has the asss core gotten this far without an easy way to change door state?
its used a lot, and accordingly there should be a
game->Door(255)
or SOMETHING, ffs |
Doing that would give people the false impression that it's a good idea. Did you not read what I said about sending lots of clientset packets? It's bad. |
|
Back to top |
|
|
Hakaku Server Help Squatter
Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
Posted: Tue Mar 24, 2009 9:31 pm Post subject: |
|
|
|
|
Dr Brain wrote: | Doing that would give people the false impression that it's a good idea. Did you not read what I said about sending lots of clientset packets? It's bad. |
Then would it ultimately be better to just use the cfg->SetInt, and if really needed, cfg->FlushDirtyValues afterwards?
Actually, since you mentioned that the problem would lie moreso with random doors, would using the ArenaOverride to set the doormode to 0 or 255, and then Unoverride to return the door state back to random also be just as problematic? |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Wed Mar 25, 2009 6:23 am Post subject: |
|
|
|
|
Any way you change the door mode will have to involve sending every player in the arena a fairly large packet. And you have to do this every time you change the doors. If you change the doors once per event, then it's not a big deal. Changing it once per minute, however, would probably double your zone's bandwidth. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Tue Sep 22, 2009 11:26 am Post subject: |
|
|
|
|
new question:
i know it is possible to rewrite chat messages, like in an obscene module like cerium's hyperspace one.
i can create a new message with the rewritten text, but how do i prevent the original message from being sent?
is it possible to simply change the old message without sending a new one?
and if i change their message, will the sender recieve the change? (i dont want them to)
because in hyperspace i notice they dont. |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Tue Sep 22, 2009 2:33 pm Post subject: |
|
|
|
|
You have to replace the core's chat module with your own. Typically this means commenting out chat in modules.conf, and adding my_modules:my_chat.
In the future things like modifying chat messages will be possible without a core replacement, but not at present. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
|
Back to top |
|
|
Animate Guest
Offline
|
Posted: Tue Oct 06, 2009 1:14 pm Post subject: |
|
|
|
|
This is kind of a guess. But that's a callback, so... it looks like this is called when a command is sent through the chat, before it's passed to whatever actually calls the actual function that the command represents.
Does sgcompat use this? Is this how it turns *arena into ?a ? It looks like you could use it to intercept a command, then physically change the *arena string to ?a. I have no idea where sgcompat even is in the code, so I can't check from where I am, unless bitbucket has a Find In Files option. I didn't see the callback in cmdman.c so it must be something that happens before the module sees it. |
|
Back to top |
|
|
Hakaku Server Help Squatter
Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
Posted: Tue Oct 06, 2009 1:49 pm Post subject: |
|
|
|
|
You're correct, sgcompat does use it to rewrite commands such as *arena into ?a. However, looking briefly at the source, the term 'rewrite' seems a misnomer to me. Unless I'm missing something, the callback enables a module to listen on all commands being sent, so that when a user types "*arena", the module can detect the command and appropriately handle it (?a). It does not, however, overwrite existing commands. So if you tried to rewrite ?lag to something else, both ?lag and your new function will be called. Probably the only difference between the command rewrite and adding a new command, is that in the first, you're able to read the original string being sent, which would allow you to distinguish *cmd from ?cmd.
(the callback's in chat.h like Cheese mentioned) |
|
Back to top |
|
|
Animate Dreams Gotta buy them all! (Consumer whore)
Age:36 Gender: Joined: May 01 2004 Posts: 821 Location: Middle Tennessee Offline
|
Posted: Tue Oct 06, 2009 5:23 pm Post subject: |
|
|
|
|
Yeah, I guess it's rewriting the string? It could be named better. |
|
Back to top |
|
|
|