Author |
Message |
Guest
Offline
|
Posted: Tue May 23, 2006 7:56 am Post subject: python and balls |
 |
|
|
|
is it true that at the moment python modules cant tell at which direction and speed a ball was fired? why arent they just in the callback? i hope thats false and someone will explain how to get the info :/ |
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Tue May 23, 2006 1:48 pm Post subject: |
 |
|
|
|
add the callback you want |
|
Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Tue May 23, 2006 3:32 pm Post subject: |
 |
|
|
|
And make sure you submit the patch to Grel, or you'll be up a creek if anything changes in future versions. _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me |
|
Back to top |
|
 |
Guest
Offline
|
Posted: Wed May 24, 2006 12:02 pm Post subject: |
 |
|
|
|
so.. in other words there is no way to access that data (BallData) with python?
and what comes to me editing the callback, im afraid being barely able to read C is not sufficient for that.. unless the only change needed is
DO_CBS(CB_BALLFIRE, arena, BallFireFunc, (arena, p, bid)); | -> DO_CBS(CB_BALLFIRE, arena, BallFireFunc, (arena, p, bid, bd->x, bd->y, bd->xspeed, bd->yspeed)); | in balls.c and even so i really have no idea how to build the server on my own |
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Wed May 24, 2006 12:09 pm Post subject: |
 |
|
|
|
you'll probably want to make it a new callback, so it doesn't interfere with other modules that use that callback already (or be prepared to recompile everything). You only need to compile the balls.c file for a change like that. You also need to change the CB_BALLFIRE or whatever #defined constant you use in balls.h as well as the BallFireFunc definition |
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Thu May 25, 2006 9:49 am Post subject: |
 |
|
|
|
You'll also need to recompile pymod.c as well as balls.c. When creating the new callback don't forget to write matching markup for the pymod scripts to find (something like pycb:). |
|
Back to top |
|
 |
|