Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Piglit committed Aug 30, 2024
1 parent c88b9ef commit d787489
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/screens/missionControlScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ MissionControlScreen::MissionControlScreen(RenderLayer* render_layer, glm::vec2
// Spawn a ship of the selected template near 0,0 and give it a random
// heading.
ship_create_button = new GuiButton(ship_content, "CREATE_SHIP_BUTTON", tr("Create ship"), [this]() {
string callsign = PreferencesManager::get("shipname", "");
if (game_server) {
if ((!gameGlobalInfo->allow_new_player_ships) || (my_spaceship))
return;
string callsign = PreferencesManager::get("shipname", "");
P<PlayerSpaceship> ship = new PlayerSpaceship();
string templ = ship_template_selector->getSelectionValue();
if (ship)
Expand Down Expand Up @@ -215,6 +215,7 @@ void MissionControlScreen::update(float delta)
{

if (game_server)
{
unsigned int seconds = gameGlobalInfo->elapsed_time;
unsigned int minutes = (seconds / 60) % 60;
unsigned int hours = (seconds / 60 / 60) % 24;
Expand All @@ -226,9 +227,8 @@ void MissionControlScreen::update(float delta)
clock->setValue(string(buf));

// Update pause button

pause_button->setValue(engine->getGameSpeed() == 0.0f);

}
// States of dynamic panel:
/* no ship -> show ship_content
-> hide ship_infos
Expand Down

0 comments on commit d787489

Please sign in to comment.