Move flag-bearer slowdown to a separate speed modifier (#601)
Improves separation; less prone to error
This commit is contained in:
parent
bc46f56852
commit
c44827f2f9
2 changed files with 11 additions and 6 deletions
|
@ -111,13 +111,8 @@ function ctf_classes.update(player)
|
|||
set_max_hp(player, class.properties.max_hp)
|
||||
ctf_classes.set_skin(player, color, class)
|
||||
|
||||
local speed = class.properties.speed
|
||||
if ctf_flag.has_flag(name) and speed > 0.9 then
|
||||
speed = 0.9
|
||||
end
|
||||
|
||||
physics.set(player:get_player_name(), "ctf_classes:speed", {
|
||||
speed = speed,
|
||||
speed = class.properties.speed,
|
||||
})
|
||||
|
||||
crafting.lock_all(player:get_player_name())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue