mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 18:24:12 +00:00
fix stewblaster stopping for non-players (#1521)
fixes an issue when stew blaster would stop for non-players and would stand still permanently due to enemy hitboxes being removed. Tested that stewblaster only stops for players and starts moving when there are no players in the vicinity
This commit is contained in:
@@ -68,6 +68,7 @@ void MovementAIComponent::SetPath(const std::string pathName) {
|
||||
}
|
||||
|
||||
void MovementAIComponent::Pause() {
|
||||
if (m_Paused) return;
|
||||
m_Paused = true;
|
||||
SetPosition(ApproximateLocation());
|
||||
m_SavedVelocity = GetVelocity();
|
||||
@@ -76,6 +77,7 @@ void MovementAIComponent::Pause() {
|
||||
}
|
||||
|
||||
void MovementAIComponent::Resume() {
|
||||
if (!m_Paused) return;
|
||||
m_Paused = false;
|
||||
SetVelocity(m_SavedVelocity);
|
||||
m_SavedVelocity = NiPoint3Constant::ZERO;
|
||||
|
Reference in New Issue
Block a user