HurtboxBase now sends hit updates on a timer instead of on a new frame.
This commit is contained in:
@@ -52,7 +52,7 @@ void HurtboxBase::_ready()
|
|||||||
this->set_process(false);
|
this->set_process(false);
|
||||||
this->remaining_life = this->lifetime;
|
this->remaining_life = this->lifetime;
|
||||||
|
|
||||||
CALL_NEXT_FRAME(callable_mp(this, &HurtboxBase::_send_next_in_queue));
|
this->_send_next_in_queue();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HurtboxBase::_physics_process(double delta)
|
void HurtboxBase::_physics_process(double delta)
|
||||||
@@ -146,6 +146,6 @@ void HurtboxBase::_send_next_in_queue()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CALL_NEXT_FRAME(callable_mp(this, &HurtboxBase::_send_next_in_queue));
|
CALL_ON_TIMEOUT(1.0f / 8.0f, callable_mp(this, &HurtboxBase::_send_next_in_queue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user