Zappy Server
C++ game server: world, rules, scheduler, network
Loading...
Searching...
No Matches
broadcastDirection.hpp File Reference
+ Include dependency graph for broadcastDirection.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int broadcastDirection (int srcX, int srcY, int dstX, int dstY, int mapW, int mapH, Orientation dstFacing)
 

Function Documentation

◆ broadcastDirection()

int broadcastDirection ( int  srcX,
int  srcY,
int  dstX,
int  dstY,
int  mapW,
int  mapH,
Orientation  dstFacing 
)
inline

Returns the direction (1-8) a receiver hears a broadcast from, relative to their orientation. Returns 0 if emitter and receiver are on the same tile. Uses shortest toroidal path.

Definition at line 8 of file broadcastDirection.hpp.

Referenced by CommandDispatcher::_handleBroadcast(), and CommandDispatcher::_handleEject().

+ Here is the caller graph for this function: