… | |
… | |
1600 | |
1600 | |
1601 | for (object *op = object::first; op; op = op->next) |
1601 | for (object *op = object::first; op; op = op->next) |
1602 | reattach (op); |
1602 | reattach (op); |
1603 | } |
1603 | } |
1604 | |
1604 | |
|
|
1605 | bool |
|
|
1606 | add_client_socket (int fd, const char *peername) |
|
|
1607 | |
1605 | NV floor (NV x) |
1608 | NV floor (NV x) |
1606 | |
1609 | |
1607 | NV ceil (NV x) |
1610 | NV ceil (NV x) |
1608 | |
1611 | |
1609 | void server_tick () |
1612 | void server_tick () |
… | |
… | |
2036 | INCLUDE: $PERL genacc player ../include/newserver.h ../include/player.h | |
2039 | INCLUDE: $PERL genacc player ../include/newserver.h ../include/player.h | |
2037 | |
2040 | |
2038 | char * |
2041 | char * |
2039 | client (player *pl) |
2042 | client (player *pl) |
2040 | CODE: |
2043 | CODE: |
2041 | RETVAL = pl->socket.client; |
2044 | RETVAL = pl->socket->client; |
2042 | OUTPUT: |
2045 | OUTPUT: |
2043 | RETVAL |
2046 | RETVAL |
2044 | |
2047 | |
2045 | char * |
2048 | char * |
2046 | host (player *pl) |
2049 | host (player *pl) |
2047 | CODE: |
2050 | CODE: |
2048 | RETVAL = pl->socket.host; |
2051 | RETVAL = pl->socket->host; |
2049 | OUTPUT: |
2052 | OUTPUT: |
2050 | RETVAL |
2053 | RETVAL |
2051 | |
2054 | |
2052 | int invoke (player *pl, int event, ...) |
2055 | int invoke (player *pl, int event, ...) |
2053 | CODE: |
2056 | CODE: |
… | |
… | |
2081 | OUTPUT: RETVAL |
2084 | OUTPUT: RETVAL |
2082 | |
2085 | |
2083 | bool |
2086 | bool |
2084 | cell_visible (player *pl, int dx, int dy) |
2087 | cell_visible (player *pl, int dx, int dy) |
2085 | CODE: |
2088 | CODE: |
2086 | RETVAL = FABS (dx) <= pl->socket.mapx / 2 && FABS (dy) <= pl->socket.mapy / 2 |
2089 | RETVAL = FABS (dx) <= pl->socket->mapx / 2 && FABS (dy) <= pl->socket->mapy / 2 |
2087 | && !pl->blocked_los [dx + pl->socket.mapx / 2][dy + pl->socket.mapy / 2]; |
2090 | && !pl->blocked_los [dx + pl->socket->mapx / 2][dy + pl->socket->mapy / 2]; |
2088 | OUTPUT: |
2091 | OUTPUT: |
2089 | RETVAL |
2092 | RETVAL |
2090 | |
2093 | |
2091 | void |
2094 | void |
2092 | buggy_mapscroll (player *pl, int value = 1) |
2095 | buggy_mapscroll (player *pl, int value = 1) |
2093 | CODE: |
2096 | CODE: |
2094 | pl->socket.buggy_mapscroll = value; |
2097 | pl->socket->buggy_mapscroll = value; |
2095 | |
2098 | |
2096 | void |
2099 | void |
2097 | send (player *pl, SV *packet) |
2100 | send (player *pl, SV *packet) |
2098 | CODE: |
2101 | CODE: |
2099 | { |
2102 | { |
2100 | STRLEN len; |
2103 | STRLEN len; |
2101 | char *buf = SvPVbyte (packet, len); |
2104 | char *buf = SvPVbyte (packet, len); |
2102 | |
2105 | |
2103 | pl->socket.send_packet (buf, len); |
2106 | pl->socket->send_packet (buf, len); |
2104 | } |
2107 | } |
2105 | |
2108 | |
2106 | int |
2109 | int |
2107 | listening (player *pl, int new_value = -1) |
2110 | listening (player *pl, int new_value = -1) |
2108 | CODE: |
2111 | CODE: |