mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix compilation error
This commit is contained in:
parent
539c482cff
commit
9b48faba7e
@ -26,7 +26,7 @@ impl Rule for SimulateNpcs {
|
||||
let diff = target.xy() - npc.wpos.xy();
|
||||
let dist2 = diff.magnitude_squared();
|
||||
|
||||
if dist2 > 0.5.powi(2) {
|
||||
if dist2 > 0.5f32.powi(2) {
|
||||
npc.wpos += (diff
|
||||
* (body.max_speed_approx() * speed_factor * ctx.event.dt / dist2.sqrt())
|
||||
.min(1.0))
|
||||
|
Loading…
Reference in New Issue
Block a user