Moved map and character management to server_data.cpp
This commit is contained in:
+20
-1
@@ -31,4 +31,23 @@ bool operator==(IPaddress lhs, IPaddress rhs) {
|
||||
|
||||
bool operator!=(IPaddress lhs, IPaddress rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------
|
||||
//Packet pumps
|
||||
//-------------------------
|
||||
|
||||
void ServerApplication::PumpPacket(SerialPacket* const argPacket) {
|
||||
for (auto& it : *clientMgr.GetContainer()) {
|
||||
network.SendTo(it.second.GetAddress(), argPacket);
|
||||
}
|
||||
}
|
||||
|
||||
void ServerApplication::PumpPacketProximity(SerialPacket* const argPacket, int roomIndex, int x, int y, int radius) {
|
||||
//TODO: PumpPacketProximity
|
||||
//for position (roomIndex, x, y), find all characters within that distance
|
||||
//find that character's owner
|
||||
//find that account's client
|
||||
//send the packet to that client
|
||||
//NOTE: this is perhaps too complex; I write it if I need it
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user