… | |
… | |
2137 | OUTPUT: RETVAL |
2137 | OUTPUT: RETVAL |
2138 | |
2138 | |
2139 | bool |
2139 | bool |
2140 | cell_visible (player *pl, int dx, int dy) |
2140 | cell_visible (player *pl, int dx, int dy) |
2141 | CODE: |
2141 | CODE: |
2142 | RETVAL = FABS (dx) <= pl->socket->mapx / 2 && FABS (dy) <= pl->socket->mapy / 2 |
2142 | RETVAL = FABS (dx) <= pl->ns->mapx / 2 && FABS (dy) <= pl->ns->mapy / 2 |
2143 | && !pl->blocked_los [dx + pl->socket->mapx / 2][dy + pl->socket->mapy / 2]; |
2143 | && !pl->blocked_los [dx + pl->ns->mapx / 2][dy + pl->ns->mapy / 2]; |
2144 | OUTPUT: |
2144 | OUTPUT: |
2145 | RETVAL |
2145 | RETVAL |
2146 | |
2146 | |
2147 | void |
2147 | void |
2148 | send (player *pl, SV *packet) |
2148 | send (player *pl, SV *packet) |
2149 | CODE: |
2149 | CODE: |
2150 | { |
2150 | { |
2151 | STRLEN len; |
2151 | STRLEN len; |
2152 | char *buf = SvPVbyte (packet, len); |
2152 | char *buf = SvPVbyte (packet, len); |
2153 | |
2153 | |
2154 | pl->socket->send_packet (buf, len); |
2154 | pl->ns->send_packet (buf, len); |
2155 | } |
2155 | } |
2156 | |
2156 | |
2157 | int |
2157 | int |
2158 | listening (player *pl, int new_value = -1) |
2158 | listening (player *pl, int new_value = -1) |
2159 | CODE: |
2159 | CODE: |