duncan
Mom and Dad were wrong!
|
#include <player.h>
Public Types | |
typedef std::pair< net::Packet *, net::Packet * > | pppair_t |
Packet pointer pair. | |
Public Member Functions | |
Player (net::index_t) | |
net::Packet * | next_packet () |
pppair_t | demand_packet () |
void | pop_packet (net::Packet *) |
net::index_t | enet_index () |
virtual bool | can_find_path () |
Public Attributes | |
bool | connected |
size_t | windex |
std::string | changeworld |
double | last_pos_send |
Represent a player.
see LICENSE
Player::Player | ( | net::index_t | ind | ) |
Create a Player with a given enet index.
ind | enet index |
bool Player::can_find_path | ( | ) | [virtual] |
Players can be used for pathfinding.
Reimplemented from server::Character.
Player::pppair_t Player::demand_packet | ( | ) |
Gets a pointer to a usable Packet. If none is available, allow an already-used Packet to be overwritten; tries to find a non-reliable packet first, but if that fails, then the most recently used packet is reused.
net::index_t Player::enet_index | ( | ) |
Get player's enet index.
net::Packet * Player::next_packet | ( | ) |
Gets a pointer to a Packet to be filled with data to be sent to this Player.
void Player::pop_packet | ( | net::Packet * | p | ) |
Marks the specified packet as once again available to be used to send data.