View Single Post
Old 07-20-2004, 08:45 PM   #1 (permalink)
XxSP1DERxX
 
Join Date: Oct 2002
Age: 23
Posts: 4,689
Default Murder Count Bug [RC0]

As everyone probably knows.. there is a feature missing (or an exploit standing, depending on how you look at it). Where a player can rack up counts on another, causing the other player to go red and get guard whacked. This is a problem because on OSI, you can only give one count to a person every 5 minutes.

Two questions about this.. first off is there a fix planned to be released with the next version? And next, if I wanted to fix this now, which approach should I take.

If i use timers, then there could be a timer going for every two-person combination on the shard (theoretically). And you can see the potential problem in a CTF or shard-wide event where players are subjected to killing each other numerous times. If timers are not used, the next optionj would be a murder count pool just as the first option would have, except using a struct. The struct has the datetime of count given, and the person who gave the count. Everytime someone is killed, the countpool is checked and if the datetime is less than 5 minutes from current time, then another count cannot be given. If it is more, than a count can be given, and the datetime is updated. Which comes back to the point that the first has intensive CPU (potentially), while the second has potential memory. To alleviate the memory on the second option, upon save, all instances of the struct in each person's pool which is older than 5 minutes would be deleted.

Anybody have any ideas on this? Or a better approach to fixing this.


EDIT:

To give an idea of what I mean -
Using timers with a 150 person CTF, there could be up to 22,500 timers (realistically around 7500-10,000) all in arraylists. These would last 5 minutes each...
Using structs with a 150 person CTF, plus whatever happens after that until the next worldsave, would be over 30,000 instances of the struct (realistically around 10,000-12,500) all in arraylists. These would last until the next worldsave.

Which is worse on resources?
XxSP1DERxX is offline   Reply With Quote