mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 02:43:44 +00:00
remove flag
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "Game.h"
|
||||
#include "Logger.h"
|
||||
#include "dConfig.h"
|
||||
#include "dMath.h"
|
||||
|
||||
#include "BehaviorStates.h"
|
||||
@@ -323,10 +322,7 @@ bool ModelComponent::TryStartRotation(const int axis, const float direction) {
|
||||
if (m_RotationDirection[axis] != 0.0f) return false;
|
||||
|
||||
// Rebase only when nothing is rotating so simultaneous rotations stay relative to the same base
|
||||
if (m_RotationDirection == NiPoint3Constant::ZERO) {
|
||||
ResetRotationState(m_Parent->GetRotation());
|
||||
m_SendAngularVelocity = Game::config->GetValue("model_rotation_send_angular_velocity") != "0";
|
||||
}
|
||||
if (m_RotationDirection == NiPoint3Constant::ZERO) ResetRotationState(m_Parent->GetRotation());
|
||||
|
||||
m_RotationDegrees[axis] = std::fmod(m_RotationDegrees[axis], 360.0f);
|
||||
m_RotationActionStart[axis] = m_RotationDegrees[axis];
|
||||
@@ -362,7 +358,7 @@ void ModelComponent::SetSpeed(const float newSpeed) {
|
||||
void ModelComponent::SyncAngularVelocity() const {
|
||||
GameMessages::SetAngularVelocity setAngVel{};
|
||||
setAngVel.target = m_Parent->GetObjectID();
|
||||
setAngVel.angVelocity = m_SendAngularVelocity ? m_RotationDirection * Math::DegToRad(GetAngularSpeed()) : NiPoint3Constant::ZERO;
|
||||
setAngVel.angVelocity = m_RotationDirection * Math::DegToRad(GetAngularSpeed());
|
||||
setAngVel.Send();
|
||||
}
|
||||
|
||||
|
||||
@@ -248,7 +248,4 @@ private:
|
||||
|
||||
// Per axis -1, 0 or 1. Non-zero means a behavior currently owns rotation on that axis.
|
||||
NiPoint3 m_RotationDirection{};
|
||||
|
||||
// Whether the client is sent an angular velocity to extrapolate rotation between updates
|
||||
bool m_SendAngularVelocity{ true };
|
||||
};
|
||||
|
||||
@@ -105,6 +105,3 @@ hardcore_coin_keep=
|
||||
|
||||
# save pre-split lxfmls to disk for debugging
|
||||
save_lxfmls=0
|
||||
|
||||
# Send models' angular velocity to clients so they extrapolate rotation between updates (1) or only send rotation (0)
|
||||
model_rotation_send_angular_velocity=1
|
||||
|
||||
Reference in New Issue
Block a user