Saving actually works this time

This commit is contained in:
David Markowitz 2024-05-18 02:12:23 -07:00
parent f2bf9a2a28
commit fd1c6ab2ea
2 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@ public:
std::string behaviorInfo; std::string behaviorInfo;
}; };
// This Add also takes care of updating if it exists.
virtual void AddBehavior(const Info& info) = 0; virtual void AddBehavior(const Info& info) = 0;
virtual void RemoveBehavior(const uint32_t behaviorId) = 0; virtual void RemoveBehavior(const uint32_t behaviorId) = 0;
}; };

View File

@ -47,8 +47,8 @@ void MySQLDatabase::UpdateModel(const LWOOBJID& propertyId, const NiPoint3& posi
ExecuteUpdate( ExecuteUpdate(
"UPDATE properties_contents SET x = ?, y = ?, z = ?, rx = ?, ry = ?, rz = ?, rw = ?, " "UPDATE properties_contents SET x = ?, y = ?, z = ?, rx = ?, ry = ?, rz = ?, rw = ?, "
"behavior_1 = ?, behavior_2 = ?, behavior_3 = ?, behavior_4 = ?, behavior_5 = ? WHERE id = ?;", "behavior_1 = ?, behavior_2 = ?, behavior_3 = ?, behavior_4 = ?, behavior_5 = ? WHERE id = ?;",
position.x, position.y, position.z, rotation.x, rotation.y, rotation.z, rotation.w, propertyId, position.x, position.y, position.z, rotation.x, rotation.y, rotation.z, rotation.w,
behaviors[0].first, behaviors[1].first, behaviors[2].first, behaviors[3].first, behaviors[4].first); behaviors[0].first, behaviors[1].first, behaviors[2].first, behaviors[3].first, behaviors[4].first, propertyId);
} }
void MySQLDatabase::RemoveModel(const LWOOBJID& modelId) { void MySQLDatabase::RemoveModel(const LWOOBJID& modelId) {