Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarPlayer.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-28 00:50:47 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-28 00:50:47 +1000
commitefa38723961fb8003577c6589fc2b7032195235c (patch)
treead7f8318872b91f23a47fe3e34124a5a0525ab7c /source/game/StarPlayer.cpp
parent152af876550ec63bac9d7aa27b1994268c80f878 (diff)
Don't do spatial logging on the server
Diffstat (limited to 'source/game/StarPlayer.cpp')
-rw-r--r--source/game/StarPlayer.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/game/StarPlayer.cpp b/source/game/StarPlayer.cpp
index be30cd4..1363af5 100644
--- a/source/game/StarPlayer.cpp
+++ b/source/game/StarPlayer.cpp
@@ -959,7 +959,9 @@ void Player::update(uint64_t) {
else
m_humanoid->setDance({});
- m_armor->setupHumanoidClothingDrawables(*m_humanoid, forceNude());
+ bool isClient = world()->isClient();
+ if (isClient)
+ m_armor->setupHumanoidClothingDrawables(*m_humanoid, forceNude());
m_tools->suppressItems(!canUseTool());
m_tools->tick(m_shifting, m_pendingMoves);
@@ -971,7 +973,9 @@ void Player::update(uint64_t) {
if (m_movementController->facingDirection() == Direction::Left)
m_effectsAnimator->scaleTransformationGroup("flip", Vec2F(-1, 1));
- if (world()->isClient()) {
+
+
+ if (isClient) {
m_effectsAnimator->update(WorldTimestep, &m_effectsAnimatorDynamicTarget);
m_effectsAnimatorDynamicTarget.updatePosition(position() + m_techController->parentOffset());
} else {
@@ -1009,7 +1013,8 @@ void Player::update(uint64_t) {
m_pendingMoves.clear();
- SpatialLogger::logPoly("world", m_movementController->collisionBody(), isMaster() ? Color::Orange.toRgba() : Color::Yellow.toRgba());
+ if (isClient)
+ SpatialLogger::logPoly("world", m_movementController->collisionBody(), isMaster() ? Color::Orange.toRgba() : Color::Yellow.toRgba());
}
float Player::timeSinceLastGaveDamage() const {