Merge pull request #1025 from EmosewaMC/more-cdclient-cleanup

Implement animation table
This commit is contained in:
Gie "Max" Vanommeslaeghe
2023-05-14 15:08:18 +02:00
committed by GitHub
57 changed files with 438 additions and 285 deletions

View File

@@ -1,5 +1,8 @@
#include "AgMonumentBirds.h"
#include "GameMessages.h"
#include "Entity.h"
#include "RenderComponent.h"
#include "EntityManager.h"
//--------------------------------------------------------------
//Makes the ag birds fly away when you get close and smashes them.
@@ -16,7 +19,7 @@ void AgMonumentBirds::OnProximityUpdate(Entity* self, Entity* entering, std::str
if (name == "MonumentBirds" && status == "ENTER") {
self->AddTimer("killBird", 1.0f);
GameMessages::SendPlayAnimation(self, sOnProximityAnim);
RenderComponent::PlayAnimation(self, sOnProximityAnim);
self->SetVar<bool>(u"IsFlying", true);
self->SetVar<LWOOBJID>(u"PlayerID", entering->GetObjectID());
}