mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-11 13:21:10 +01:00
Fix crash on NaN offset in path_follower 2d and 3d
This commit is contained in:
parent
6c004dcad2
commit
8e1244c196
@ -313,6 +313,7 @@ void PathFollow2D::_bind_methods() {
|
||||
}
|
||||
|
||||
void PathFollow2D::set_offset(float p_offset) {
|
||||
ERR_FAIL_COND(!isfinite(p_offset));
|
||||
offset = p_offset;
|
||||
if (path) {
|
||||
if (path->get_curve().is_valid()) {
|
||||
|
@ -321,6 +321,7 @@ void PathFollow::_bind_methods() {
|
||||
}
|
||||
|
||||
void PathFollow::set_offset(float p_offset) {
|
||||
ERR_FAIL_COND(!isfinite(p_offset));
|
||||
delta_offset = p_offset - offset;
|
||||
offset = p_offset;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user