mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-19 05:48:09 +00:00
Add comments, remove dead code etc.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "SimplePhysicsComponent.h"
|
||||
|
||||
#include "Database.h"
|
||||
#include "DluAssert.h"
|
||||
|
||||
ModelComponent::ModelComponent(Entity* parent) : Component(parent) {
|
||||
m_OriginalPosition = m_Parent->GetDefaultPosition();
|
||||
@@ -36,9 +37,14 @@ bool ModelComponent::OnResetModelToDefaults(GameMessages::GameMsg& msg) {
|
||||
}
|
||||
|
||||
bool ModelComponent::OnRequestUse(GameMessages::GameMsg& msg) {
|
||||
auto& requestUse = static_cast<GameMessages::RequestUse&>(msg);
|
||||
for (auto& behavior : m_Behaviors) behavior.HandleMsg(requestUse);
|
||||
return true;
|
||||
bool toReturn = false;
|
||||
if (!m_IsPaused) {
|
||||
auto& requestUse = static_cast<GameMessages::RequestUse&>(msg);
|
||||
for (auto& behavior : m_Behaviors) behavior.HandleMsg(requestUse);
|
||||
toReturn = true;
|
||||
}
|
||||
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
void ModelComponent::Update(float deltaTime) {
|
||||
|
@@ -127,10 +127,13 @@ public:
|
||||
|
||||
void Resume();
|
||||
private:
|
||||
// Whether or not this component needs to have its extra data serialized.
|
||||
bool m_Dirty{};
|
||||
|
||||
// The number of strips listening for a RequestUse GM to come in.
|
||||
uint32_t m_NumListeningInteract{};
|
||||
|
||||
// Whether or not the model is paused and should reject all interactions regarding behaviors.
|
||||
bool m_IsPaused{};
|
||||
/**
|
||||
* The behaviors of the model
|
||||
|
@@ -221,8 +221,6 @@ bool PropertyManagementComponent::Claim(const LWOOBJID playerId) {
|
||||
}
|
||||
|
||||
void PropertyManagementComponent::OnStartBuilding() {
|
||||
m_IsBuilding = true;
|
||||
|
||||
auto* ownerEntity = GetOwner();
|
||||
|
||||
if (ownerEntity == nullptr) return;
|
||||
@@ -270,8 +268,6 @@ void PropertyManagementComponent::OnStartBuilding() {
|
||||
}
|
||||
|
||||
void PropertyManagementComponent::OnFinishBuilding() {
|
||||
m_IsBuilding = false;
|
||||
|
||||
auto* ownerEntity = GetOwner();
|
||||
|
||||
if (ownerEntity == nullptr) return;
|
||||
|
@@ -239,6 +239,4 @@ private:
|
||||
* The privacy setting before it was changed, saved to set back after a player finishes building
|
||||
*/
|
||||
PropertyPrivacyOption originalPrivacyOption = PropertyPrivacyOption::Private;
|
||||
|
||||
bool m_IsBuilding{};
|
||||
};
|
||||
|
Reference in New Issue
Block a user