Server Help

ASSS Questions - Using Watch Damage

Lynx - Sat Jul 31, 2010 9:29 am
Post subject: Using Watch Damage
I'm attempting to log the amount of times a player has been hit by a certain type of bullet, bomb or mine. The best way I can think of doing this is to use Watchdamage, however I was just wondering how much strain that would put on the server - for example, if 30 players were having their damage watched, and tracked? Would problems could I expect, if any, or are there any other solutions that better fit my requirements?

Thanks.
Cheese - Sat Jul 31, 2010 1:20 pm
Post subject:
almost zero strain on the server, but it doubles bandwidth


you can also just watch position energy for changes, but its far less reliable
Lynx - Sun Aug 01, 2010 6:46 am
Post subject:
Thanks for the reply.

I've also noticed that watchdamage.h has no python comments. Does this mean that I'll have to either edit the header to allow python manipulation/code the module in C, or is there some reason why watchdamage has no python comments?

Code: Show/Hide

#define I_WATCHDAMAGE "watchdamage-1"

typedef struct Iwatchdamage
{
   INTERFACE_HEAD_DECL
   
   int (*AddWatch)(Player *p, Player *target);
   /* adds a watch from player on target */
   
   void (*RemoveWatch)(Player *p, Player *target);
   /* removes a watch from player on target */

   void (*ClearWatch)(Player *p, int himtoo);
   /* removes watches on player, both to and from, including modules */

   void (*ModuleWatch)(Player *p, int on);
   /* toggles if a module wants to watch player */

   int (*WatchCount)(Player *p);
   /* tells how many are watching this player, including modules */
} Iwatchdamage;


Thanks
Dr Brain - Sun Aug 01, 2010 8:33 am
Post subject:
Yes, you'll have to edit the header. You can submit your modifications as a patch to the bitbucket bug tracker if you want to see it integrated with the core.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group