fix: only the owner of a property changes it

The messages that set a property's privacy option and name, start and
finish building, place, move and remove models and change a model's
behaviors were handled for any player on the property, and outside of
a property they used a property that is not there. They are now only
handled for the owner of the property the player is on. Only an item
from a model inventory is placed as a model.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 13:07:29 -06:00
parent 081e26ded8
commit 0f1bce32fb
2 changed files with 13 additions and 4 deletions

View File

@@ -444,11 +444,11 @@ namespace GameMessages {
}
void PropertyContentsFromClient::Handle(Entity& entity, const SystemAddress& sysAddr) {
User* user = UserManager::Instance()->GetUser(sysAddr);
const auto* const player = PlayerManager::GetPlayer(sysAddr);
const auto* const propertyManagementComponent = PropertyManagementComponent::Instance();
if (!player || !propertyManagementComponent) return;
Entity* player = Game::entityManager->GetEntity(user->GetLoggedInChar());
const auto& models = PropertyManagementComponent::Instance()->GetModels();
const auto& models = propertyManagementComponent->GetModels();
GetModelsOnProperty modelsOnProperty;
modelsOnProperty.target = player->GetObjectID();
modelsOnProperty.models = { models.begin(), models.end() };