1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-07-12 21:00:20 +02:00

fix bad physics(conflicts, many mods rewrites physics in step)

fix witchcraft and sprint physics
remove blankspaces
This commit is contained in:
2017-04-04 22:47:29 +02:00
parent b000b6f2b4
commit 78b3ae7cde
5 changed files with 263 additions and 117 deletions

View File

@ -1 +1,2 @@
hudbars?
player_physics

View File

@ -208,9 +208,13 @@ function setSprinting(playerName, sprinting) --Sets the state of a player (0=sto
if sprint.players[playerName] then
sprint.players[playerName]["sprinting"] = sprinting
if sprinting == true then
player:set_physics_override({speed=SPRINT_SPEED + bonus_speed,jump=SPRINT_JUMP + bonus_jump})
-- player:set_physics_override({speed=SPRINT_SPEED + bonus_speed,jump=SPRINT_JUMP + bonus_jump})
player_physics.add(player, "speed", "sprint_speed", 0.35+ bonus_speed)
player_physics.add(player, "jump", "sprint_jump", 0.1+ bonus_jump)
elseif sprinting == false then
player:set_physics_override({speed=1.0 + bonus_speed,jump=1.0 + bonus_jump})
-- player:set_physics_override({speed=1.0 + bonus_speed,jump=1.0 + bonus_jump})
player_physics.add(player, "speed", "sprint_speed", bonus_speed)
player_physics.add(player, "jump", "sprint_jump", bonus_jump)
end
return true
end