feat: replaced sample_baked with sample
This commit is contained in:
parent
0ca27ed61e
commit
56c244ee57
1 changed files with 1 additions and 7 deletions
|
|
@ -163,13 +163,7 @@ float TerrainModifierDistance::evaluate_at(Vector2 world_coordinate, float befor
|
|||
float const weight_offset{
|
||||
std::clamp(distance, this->distance_weight_curve->get_min_domain(), this->distance_weight_curve->get_max_domain())
|
||||
};
|
||||
this->lock.unlock_shared();
|
||||
|
||||
this->lock.lock_exclusive();
|
||||
float const weight{ this->distance_weight_curve->sample_baked(weight_offset) };
|
||||
this->lock.unlock_exclusive();
|
||||
|
||||
this->lock.lock_shared();
|
||||
float const weight{ this->distance_weight_curve->sample(weight_offset) };
|
||||
float out{ weight <= 0.f ? before : Math::lerp(before, blend(before, get_thread_safe_global_position().y), weight) };
|
||||
this->lock.unlock_shared();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue