mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
chore: Small movementAiComponent cleanup (#1145)
* rename and cleanup file * more * fix broken function * Further naming fixes t Revert "Further naming fixes" This reverts commit 057189982ba56788d48f9265d815e6c562ba6328. * next step * undo all testing changes * minor tweaks
This commit is contained in:
@ -136,7 +136,7 @@ void AmShieldGenerator::EnemyEnteredShield(Entity* self, Entity* intruder) {
|
||||
|
||||
// TODO: Figure out how todo knockback, I'll stun them for now
|
||||
|
||||
if (NiPoint3::DistanceSquared(self->GetPosition(), movementAIComponent->GetCurrentPosition()) < 20 * 20) {
|
||||
if (NiPoint3::DistanceSquared(self->GetPosition(), intruder->GetPosition()) < 20 * 20) {
|
||||
baseCombatAIComponent->Stun(2.0f);
|
||||
movementAIComponent->SetDestination(baseCombatAIComponent->GetStartPosition());
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ void AmShieldGeneratorQuickbuild::EnemyEnteredShield(Entity* self, Entity* intru
|
||||
|
||||
// TODO: Figure out how todo knockback, I'll stun them for now
|
||||
|
||||
if (NiPoint3::DistanceSquared(self->GetPosition(), movementAIComponent->GetCurrentPosition()) < 20 * 20) {
|
||||
if (NiPoint3::DistanceSquared(self->GetPosition(), intruder->GetPosition()) < 20 * 20) {
|
||||
baseCombatAIComponent->Stun(2.0f);
|
||||
movementAIComponent->SetDestination(baseCombatAIComponent->GetStartPosition());
|
||||
}
|
||||
|
@ -52,12 +52,6 @@ void EnemySpiderSpawner::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (newEntity) {
|
||||
Game::entityManager->ConstructEntity(newEntity);
|
||||
newEntity->GetGroups().push_back("BabySpider");
|
||||
|
||||
/*
|
||||
auto* movementAi = newEntity->GetComponent<MovementAIComponent>();
|
||||
|
||||
movementAi->SetDestination(newEntity->GetPosition());
|
||||
*/
|
||||
}
|
||||
|
||||
self->ScheduleKillAfterUpdate();
|
||||
|
Reference in New Issue
Block a user