Skip to content

Commit

Permalink
Fixed bug where the player's run speed would be preserved from the pr…
Browse files Browse the repository at this point in the history
…evious weapon, if switching weapons while running.
  • Loading branch information
standardcombo committed Mar 14, 2021
1 parent d090983 commit 18e4c4d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Strike Team/Data/Scripts/Player Movement.lua
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,9 @@ function OnEquipWeapon(owner, weapon)
playerStances[owner]["Sprinting"] = sprintingStance or "2hand_rifle_stance"
playerStances[owner]["Aiming"] = aimingStance or "2hand_rifle_aim_shoulder"

Task.Wait()
if not Object.IsValid(owner) then
Task.Wait(0.11)
if not Object.IsValid(owner) or not Object.IsValid(weapon)
or weapon ~= owner.serverUserData.EquippedWeapon then
return
end

Expand Down

0 comments on commit 18e4c4d

Please sign in to comment.