Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

remotecontroller: only set back move type if need #182

Merged
merged 1 commit into from

2 participants

natrim Nebual
natrim

than means when it was active, this prevents the move type reset when just browsing weapons

Nebual Nebual merged commit 7728e09 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 12, 2012
  1. natrim

    remotecontroller: only set back move type if need

    natrim authored
    than means when it was active
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 5 deletions.
  1. +7 −5 lua/weapons/remotecontroller.lua
12 lua/weapons/remotecontroller.lua
View
@@ -61,12 +61,14 @@ function SWEP:On()
end
end
function SWEP:Off()
- self.Active = nil
- if (self.OldMoveType) then
- self.Owner:SetMoveType(self.OldMoveType)
- else
- self.Owner:SetMoveType(MOVETYPE_WALK)
+ if self.Active then
+ if (self.OldMoveType) then
+ self.Owner:SetMoveType(self.OldMoveType)
+ else
+ self.Owner:SetMoveType(MOVETYPE_WALK)
+ end
end
+ self.Active = nil
self.OldMoveType = nil
self.Owner:DrawViewModel(true)
if (self.Linked and self.Linked:IsValid()) then
Something went wrong with that request. Please try again.