Skip to content

Commit

Permalink
feat: implement getServerInfo in entrypoint client
Browse files Browse the repository at this point in the history
  • Loading branch information
Bootoyka committed Nov 13, 2022
1 parent 75fc3ab commit 5ae9122
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/client/entrypoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ int main()
ecs::Engine engine;
network::Message msg;

network::Client::setHost("localhost");
network::Client::setPort("8000");
asset::AssetLoader::LoadIniFile(asset::AssetLoader::smartPath("assets", "config.ini"));
network::Client::setHost(asset::AssetLoader::GetServerInfo("host"));
network::Client::setPort(asset::AssetLoader::GetServerInfo("port"));
msg.fill(0);
network::Client::connect();
network::Client::getOutgoingMessages().push(msg);
asset::AssetLoader::LoadIniFile(asset::AssetLoader::smartPath("assets", "config.ini"));
audio::AudioManager::playSFX("splash_screen");
ecs::WorldManager::setWaitingWorld(getMenuWorld);
audio::AudioManager::setBGMVolume(50);
Expand Down
2 changes: 1 addition & 1 deletion src/ecs/components/client/Connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace ecs::component {
struct Connection {

Connection() : _port(asset::AssetLoader::GetServerInfo("port")), _host(asset::AssetLoader::GetServerInfo("host")), _isSet(false) {}
Connection() : _port("8001"), _host(asset::AssetLoader::GetServerInfo("host")), _isSet(false) {}

void setPort(int port) {
_port = std::to_string(port);
Expand Down

0 comments on commit 5ae9122

Please sign in to comment.