Removed initial world query

The world is queried once the client has the player's character.
This commit is contained in:
Kayne Ruse
2015-03-13 19:12:34 +11:00
parent ca6afb72ad
commit d2bb3575fc
6 changed files with 6 additions and 12 deletions
+2 -2
View File
@@ -88,10 +88,10 @@ void World::hCharacterCreate(CharacterPacket* const argPacket) {
characterIndex = argPacket->characterIndex;
roomIndex = argPacket->roomIndex;
//query the world state
//query the world state (room)
CharacterPacket newPacket;
memset(&newPacket, 0, MAX_PACKET_SIZE);
newPacket.type = SerialPacketType::QUERY_CHARACTER_EXISTS; //TODO: (1) the EXISTS and LOCATION queries are backwards?
newPacket.type = SerialPacketType::QUERY_CHARACTER_EXISTS;
newPacket.roomIndex = roomIndex;
network.SendTo(Channels::SERVER, &newPacket);
newPacket.type = SerialPacketType::QUERY_MONSTER_EXISTS;
-8
View File
@@ -71,14 +71,6 @@ World::World(int* const argClientIndex, int* const argAccountIndex):
newPacket.accountIndex = accountIndex;
network.SendTo(Channels::SERVER, &newPacket);
//TODO: (1) replace this duplication with a request for just this player's character
//query the world state
memset(&newPacket, 0, MAX_PACKET_SIZE);
newPacket.type = SerialPacketType::QUERY_CHARACTER_EXISTS;
network.SendTo(Channels::SERVER, &newPacket);
newPacket.type = SerialPacketType::QUERY_MONSTER_EXISTS;
network.SendTo(Channels::SERVER, &newPacket);
//set the camera's values
camera.width = GetScreen()->w;
camera.height = GetScreen()->h;
+1
View File
@@ -21,6 +21,7 @@ mapMaker.edges.south = 16
mapMaker.edges.east = 1
mapMaker.edges.west = -1
--TODO: (1) path system
--use these macros (mapped to "overworld.bmp" for now) to smooth the region's edges
function mapMaker.SmoothEdgesSimple(r)
--make and pad an array to use
+1 -1
View File
@@ -59,7 +59,7 @@ createTrigger("door 1", overworld, 128, -128, function(entity)
end
local x, y = characterAPI.GetOrigin(entity)
characterAPI.SetRoomIndex(entity, uidTwo) --TODO: (1) take exit coordinates as a parameter
characterAPI.SetRoomIndex(entity, uidTwo) --TODO: (0) take exit coordinates as a parameter
characterAPI.SetOrigin(entity, 0, 0)
networkAPI.PumpCharacterUpdate(entity)
end)
+1 -1
View File
@@ -29,7 +29,7 @@
#include <stdexcept>
static int setRoomIndex(lua_State* L) { //TODO: (1) take the room userdata as a parameter
static int setRoomIndex(lua_State* L) { //TODO: (1) take the room userdata as a parameter?
//NOTE: type-dependant calls to various API functions, see bug #43
//reverse engineer the character index
+1
View File
@@ -29,6 +29,7 @@
#include <string>
//TODO: (0) state-system for preventing double triggering
class TriggerData {
public:
TriggerData() = default;