The character is visible, fixed a database issue
This commit is contained in:
@@ -301,7 +301,6 @@ void InWorld::HandleCharacterNew(CharacterPacket* const argPacket) {
|
||||
localCharacter = &character;
|
||||
|
||||
//setup the camera
|
||||
//TODO: can't change the screen size?
|
||||
camera.width = GetScreen()->w;
|
||||
camera.height = GetScreen()->h;
|
||||
|
||||
|
||||
@@ -238,5 +238,11 @@ void LobbyMenu::HandleJoinResponse(ClientPacket* const argPacket) {
|
||||
network.Bind(&argPacket->srcAddress, Channels::SERVER);
|
||||
SetNextScene(SceneList::INWORLD);
|
||||
|
||||
//TODO: send this player's character info
|
||||
//send this player's character info
|
||||
CharacterPacket newPacket;
|
||||
newPacket.type = SerialPacketType::CHARACTER_NEW;
|
||||
strncpy(newPacket.handle, config["client.handle"].c_str(), PACKET_STRING_SIZE);
|
||||
strncpy(newPacket.avatar, config["client.avatar"].c_str(), PACKET_STRING_SIZE);
|
||||
newPacket.accountIndex = accountIndex;
|
||||
network.SendTo(Channels::SERVER, &newPacket);
|
||||
}
|
||||
@@ -21,6 +21,11 @@
|
||||
*/
|
||||
#include "main_menu.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
//-------------------------
|
||||
//Public access members
|
||||
//-------------------------
|
||||
@@ -53,6 +58,11 @@ MainMenu::MainMenu(ConfigUtility* const argConfig):
|
||||
startButton.SetText("Start");
|
||||
optionsButton.SetText("Options");
|
||||
quitButton.SetText("Quit");
|
||||
|
||||
//debug
|
||||
cout << config["client.username"] << endl;
|
||||
cout << config["client.handle"] << endl;
|
||||
cout << config["client.avatar"] << endl;
|
||||
}
|
||||
|
||||
MainMenu::~MainMenu() {
|
||||
|
||||
Reference in New Issue
Block a user