Author |
Message |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sat Sep 10, 2005 6:01 pm Post maybe stupid Post subject: Bounty multiplier |
 |
|
|
|
I fully don't expect anybody to know this, but does SubSpace use a short or int for the bounty * Flag:FlaggerKillMultiplier on a player death? Just curious, because MERV's using a short right now, which could roll over. Just wondering if I should fix it. _________________ 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 |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Sat Sep 10, 2005 6:52 pm Post maybe stupid Post subject: |
 |
|
|
|
The setting uses a short, but since register size is typically 32bits I think it's going to get extended when used in math (in ss). |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sun Sep 11, 2005 12:40 am Post maybe stupid Post subject: |
 |
|
|
|
Well, it'll get extended, but is it still stored as a short? You wouldn't think so, but hey, these are the guys that stored score as a signed value. |
|
Back to top |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:41 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: Sun Sep 11, 2005 4:56 am Post maybe stupid Post subject: |
 |
|
|
|
Cyan~Fire wrote: | .. these are the guys that stored score as a signed value. |
Thats because you could originally get negative scores. Ever wonder why people with low bounties are neg killers? You used to start with negative bounty. So some people would have an average kill of -10, which were refered to as negative bounty hunters. Later on, after they realised that people would still kill small bountied players, they had them start at 0 again, to remove the goal of getting the smallest score. The neg killer term still stuck.
The way most C compilers work, if you do a short * short -> int, it will extend it as if it was int * int. Tested on GCC and MSVC 6.0
int main()
{
short a, b;
int c;
a = 30000;
b = 100;
c = a * b;
printf("%d * %d -> %d [%d]\n", a, b, c, a * b);
} |
30000 * 100 -> 3000000 [3000000] |
|
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
|
Back to top |
|
 |
Maverick

Age:40 Gender: Joined: Feb 26 2005 Posts: 1521 Location: The Netherlands Offline
|
Posted: Mon Sep 12, 2005 6:18 am Post maybe stupid Post subject: |
 |
|
|
|
Woo! You are "fixing" Mervbot, Cyan?  _________________
|
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Mon Sep 12, 2005 9:03 pm Post maybe stupid Post subject: |
 |
|
|
|
In a way. I'm doing it at just the wrong time though. First I though MERV was cool, then I realized it sucked (compared to how cool it could be), then I figured it's useless with asss, then I figured it might still be useful, then I decided that since I started I mightn't as well finish.
What I'm wondering about, though is plugin changes. I would have to make sure old plugins would work, but I'm thinking of adding a whole new callback type interface instead of this messaging thing. Basically what it would do is search for a specific function name (like "handlePlayerMove") in the plugin, and call it if it finds it. That way, it completely automatically calls only the functions you need. Kinda cool, right? |
|
Back to top |
|
 |
Maverick

Age:40 Gender: Joined: Feb 26 2005 Posts: 1521 Location: The Netherlands Offline
|
Posted: Tue Sep 13, 2005 2:48 am Post maybe stupid Post subject: |
 |
|
|
|
Sounds cool.
But make sure its backward-compatible as you already said or alot of coders are going to be mad at you (including me) .
What's so sucky about Mervbot btw? (specific points if you can name them)
Only thing I can mention is the lacking feature of registering commands (so you can't ever catch all the commands that the plugin isn't handling). (Aka.. like TWCore does) |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Tue Sep 13, 2005 9:21 pm Post maybe stupid Post subject: |
 |
|
|
|
Command registration is definitely an issue. Ekted's timer feature is also a bonus.
But a lot of the improvements are behind the scenes. Plugin interaction is exactly the same now, but the core code is completely whacked out.
Parital list of changes:
- Conversion from iostream classes to FILE io.
- Formed class SSConnection, which does a pretty good job of black-boxing the core protocol.
- A lot of items use static buffers instead of dynamically allocated.
- Packets are handled as structures and not as byte strings (much, much cleaner).
- Removed class UDPSocket, as it didn't provide enough Winsock features. (I mean, a wrapper for a library? Ugh.)
- The map now treated as a class and not a pure byte structure.
- Packet handlers use a pure array and not a template class.
- Formatted sendPrivate(), sendPublic(), etc. messaging, eliminates need to use String class for chatting.
- Using more library functions instead of catid ones: isprint() instead of isPrintable() among others, zlib's crc32() instead of getFileChecksum(), and an intrinsic strlen() instead of STRLEN().
- In the middle of getting rid of struct clientMessage, which dynamically allocates the size needed for the packet, and instead using a packet structure on the stack.
That's all the major ones I can think of right now. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Fri Sep 16, 2005 6:51 pm Post maybe stupid Post subject: |
 |
|
|
|
LOL. Yes, I am definitely going to implement command-registering with handler functions. |
|
Back to top |
|
 |
|