mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 10:02:28 +00:00
Implement speed modifiers (#1119)
Because linear addition does not retain proportional relationships! Mulipliers should take care of that, though, surely.
This commit is contained in:
@@ -142,8 +142,9 @@ var/list/gamemode_cache = list()
|
||||
|
||||
//Used for modifying movement speed for mobs.
|
||||
//Unversal modifiers
|
||||
var/run_speed = 0
|
||||
var/walk_speed = 0
|
||||
var/walk_delay_multiplier = 1
|
||||
var/run_delay_multiplier = 1
|
||||
|
||||
//Mob specific modifiers. NOTE: These will affect different mob types in different ways
|
||||
var/human_delay = 0
|
||||
@@ -782,11 +783,15 @@ var/list/gamemode_cache = list()
|
||||
if("limbs_can_break")
|
||||
config.limbs_can_break = value
|
||||
|
||||
if("run_speed")
|
||||
config.run_speed = value
|
||||
if("walk_speed")
|
||||
config.walk_speed = value
|
||||
|
||||
// These should never go to 0 or below. So, we clamp them.
|
||||
if("walk_delay_multiplier")
|
||||
config.walk_delay_multiplier = max(0.1, text2num(value))
|
||||
if("run_delay_multiplier")
|
||||
config.run_delay_multiplier = max(0.1, text2num(value))
|
||||
|
||||
if("human_delay")
|
||||
config.human_delay = value
|
||||
if("robot_delay")
|
||||
|
||||
Reference in New Issue
Block a user