1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-12-25 02:45:19 +01:00

add new mod player_physics and update sprint and 3d_armor to use player_physics

This commit is contained in:
2017-04-07 23:18:55 +02:00
parent cfd80c090c
commit 84e858fccf
9 changed files with 840 additions and 30 deletions

View File

@@ -140,11 +140,11 @@ function setState(playerName, state) --Sets the state of a player (0=stopped, 1=
if players[playerName] then
players[playerName]["state"] = state
if state == 0 then--Stopped
player:set_physics_override({speed=1.0,jump=1.0})
player_physics.set_stats(player, "sprint", {speed=0, jump=0})
elseif state == 2 then --Primed
players[playerName]["timeOut"] = gameTime
elseif state == 3 then --Sprinting
player:set_physics_override({speed=SPRINT_SPEED,jump=SPRINT_JUMP})
player_physics.set_stats(player, "sprint", {speed=SPRINT_SPEED, jump=SPRINT_JUMP})
end
return true
end