Skip to content

Commit

Permalink
[CMakeLists.txt] -ffast-math removed. [GameState|ServerApplicaiton] N…
Browse files Browse the repository at this point in the history
…ow sending updates every 100ms instead of 1000ms.
  • Loading branch information
Unarelith committed Mar 2, 2020
1 parent a9a3343 commit a8542b8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ endif ()
# Compiler flags
#------------------------------------------------------------------------------
set(DEBUG_GCC_FLAGS -g -Og -Wall -Wextra -Wfatal-errors -Wno-variadic-macros)
set(RELEASE_GCC_FLAGS -O3 -ffast-math)
set(RELWITHDEB_GCC_FLAGS -g -O3 -ffast-math -Wall -Wextra -Wfatal-errors -Wno-variadic-macros)
set(RELEASE_GCC_FLAGS -O3)
set(RELWITHDEB_GCC_FLAGS -g -O3 -Wall -Wextra -Wfatal-errors -Wno-variadic-macros)

set(CMAKE_CXX_STANDARD 14)

Expand Down
2 changes: 1 addition & 1 deletion client/source/states/GameState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void GameState::update() {
}
}

if (gk::GameClock::getTicks() % 1000 < 10) {
if (gk::GameClock::getTicks() % 100 < 10) {
m_clientCommandHandler.sendPlayerPosUpdate();
}

Expand Down
2 changes: 1 addition & 1 deletion server/source/core/ServerApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void ServerApplication::init() {
void ServerApplication::update() {
m_world.update(m_players);

if (gk::GameClock::getTicks() % 1000 < 10) {
if (gk::GameClock::getTicks() % 100 < 10) {
for (auto &it : m_players) {
m_serverCommandHandler.sendPlayerPosUpdate(it.first);
}
Expand Down

0 comments on commit a8542b8

Please sign in to comment.