mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-23 05:53:34 +00:00
Added clean-up param
This commit is contained in:
parent
06063c8c8a
commit
a086fe730a
@ -217,6 +217,10 @@ void Recorder::ActingDispatch(Entity* actor, const std::vector<Record*>& records
|
||||
if (concludeRecord) {
|
||||
if (variables != nullptr) {
|
||||
variables->Conclude();
|
||||
|
||||
if (concludeRecord->cleanUp) {
|
||||
variables->CleanUp();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1044,11 +1048,17 @@ void Cinema::Recording::ConcludeRecord::Serialize(tinyxml2::XMLDocument& documen
|
||||
|
||||
element->SetAttribute("t", m_Delay);
|
||||
|
||||
element->SetAttribute("cleanUp", true);
|
||||
|
||||
parent->InsertEndChild(element);
|
||||
}
|
||||
|
||||
void Cinema::Recording::ConcludeRecord::Deserialize(tinyxml2::XMLElement* element) {
|
||||
m_Delay = element->DoubleAttribute("t");
|
||||
|
||||
if (element->Attribute("cleanUp")) {
|
||||
cleanUp = element->BoolAttribute("clean-up");
|
||||
}
|
||||
}
|
||||
|
||||
Cinema::Recording::VisibilityRecord::VisibilityRecord(bool visible) {
|
||||
|
@ -287,6 +287,8 @@ public:
|
||||
class ConcludeRecord : public Record
|
||||
{
|
||||
public:
|
||||
bool cleanUp = false;
|
||||
|
||||
ConcludeRecord() = default;
|
||||
|
||||
void Act(Entity* actor) override;
|
||||
|
@ -272,6 +272,7 @@ void Cinema::Scene::CheckTicket(Entity* player) {
|
||||
}
|
||||
}
|
||||
|
||||
if (m_ShowingDistance != 0.0f) {
|
||||
if (!IsPlayerInShowingDistance(player)) {
|
||||
m_HasBeenOutside.emplace(player->GetObjectID());
|
||||
|
||||
@ -281,6 +282,7 @@ void Cinema::Scene::CheckTicket(Entity* player) {
|
||||
if (m_HasBeenOutside.find(player->GetObjectID()) == m_HasBeenOutside.end()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
m_Audience.emplace(player->GetObjectID());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user