Permalink
Browse files

Fixes for slider tool

* Fixed double left click on world which prevented future tool use
unless rightclicked
* Fixed console error spam about gmod_anchor not being AddCSLuaFile'd
  • Loading branch information...
1 parent d0de762 commit b666e09eb6d7f9d3a41a92469133edbdb5d575fe @robotboy655 robotboy655 committed Oct 27, 2013
@@ -1,23 +1,28 @@
-
-ENT.Type = "anim"
-
-function ENT:Initialize()
-
- self:SetModel( "models/Combine_Helicopter/helicopter_bomb01.mdl" )
- self:PhysicsInit( SOLID_VPHYSICS )
-
- self:SetNotSolid( true )
- self:SetNoDraw( true )
- self:DrawShadow( false )
-
- local Phys = self:GetPhysicsObject()
- if ( Phys ) then
-
- Phys:EnableMotion( false )
- Phys:EnableCollisions( false )
-
- end
-
- self:SetUnFreezable( true )
-
-end
+
+AddCSLuaFile()
+
+ENT.Type = "anim"
+
+if ( CLIENT ) then return end
+
+function ENT:Initialize()
+
+
+ self:SetModel( "models/Combine_Helicopter/helicopter_bomb01.mdl" )
+ self:PhysicsInit( SOLID_VPHYSICS )
+
+ self:SetNotSolid( true )
+ self:SetNoDraw( true )
+ self:DrawShadow( false )
+
+ local Phys = self:GetPhysicsObject()
+ if ( Phys ) then
+
+ Phys:EnableMotion( false )
+ Phys:EnableCollisions( false )
+
+ end
+
+ self:SetUnFreezable( true )
+
+end
@@ -21,9 +21,7 @@ function TOOL:LeftClick( trace )
self:SetObject( iNum + 1, trace.Entity, trace.HitPos, Phys, trace.PhysicsBone, trace.HitNormal )
if ( iNum > 0 ) then
-
- if ( !self:GetEnt(1):IsValid() && !self:GetEnt(2):IsValid() ) then return end
-
+
if ( CLIENT ) then
self:ClearObjects()
return true

0 comments on commit b666e09

Please sign in to comment.