Permalink
Browse files

Tool Entity Updates

* Removed unnecessary variables
* Fixed Glow for Button & Light
* Removed glow sprite for Light when light is off
* Animations made faster for Button, so it actually looks like you are
pressing the button instead of slowly pushing it
  • Loading branch information...
1 parent 267608d commit 3e339994697c7ea7ddb82a4daf974512840ad2d0 @robotboy655 robotboy655 committed Sep 21, 2013
@@ -2,14 +2,7 @@
AddCSLuaFile()
DEFINE_BASECLASS( "base_gmodentity" )
-ENT.PrintName = ""
-ENT.Author = ""
-ENT.Contact = ""
-ENT.Purpose = ""
-ENT.Instructions = ""
-
ENT.Spawnable = false
-ENT.AdminSpawnable = false
--[[---------------------------------------------------------
Name: Initialize
@@ -30,7 +30,7 @@ function ENT:Initialize()
else
- self.PosePosition = 0.5;
+ self.PosePosition = 0;
end
@@ -87,6 +87,8 @@ end
function ENT:Think()
+ self.BaseClass.Think( self )
+
--
-- Add a world tip if the player is looking at it
--
@@ -147,16 +149,15 @@ function ENT:UpdateLever()
local TargetPos = 0.0;
if ( self:GetOn() ) then TargetPos = 1.0; end
- self.PosePosition = math.Approach( self.PosePosition, TargetPos, FrameTime() * 2.0 )
+ self.PosePosition = math.Approach( self.PosePosition, TargetPos, FrameTime() * 5.0 )
self:SetPoseParameter( "switch", self.PosePosition )
self:InvalidateBoneCache()
end
-
function ENT:Draw()
self:DrawModel()
-end
+end
@@ -7,15 +7,8 @@ end
ENT.Type = "anim"
ENT.Spawnable = false
-ENT.AdminSpawnable = false
ENT.RenderGroup = RENDERGROUP_BOTH
-ENT.PrintName = ""
-ENT.Author = ""
-ENT.Contact = ""
-ENT.Purpose = ""
-ENT.Instructions = ""
-
local CAMERA_MODEL = Model( "models/dav0r/camera.mdl" )
function ENT:SetupDataTables()
@@ -2,11 +2,7 @@
AddCSLuaFile()
DEFINE_BASECLASS( "base_gmodentity" )
-ENT.PrintName = ""
-ENT.Author = ""
-ENT.Contact = ""
ENT.Spawnable = false
-ENT.AdminSpawnable = false
ENT.RenderGroup = RENDERGROUP_OPAQUE
AccessorFunc( ENT, "m_ShouldRemove", "ShouldRemove" )
@@ -2,13 +2,7 @@
AddCSLuaFile()
DEFINE_BASECLASS( "base_gmodentity" )
-ENT.PrintName = ""
-ENT.Author = ""
-ENT.Contact = ""
-ENT.Purpose = ""
-ENT.Instructions = ""
ENT.Spawnable = false
-ENT.AdminSpawnable = false
ENT.RenderGroup = RENDERGROUP_OPAQUE
local matLight = Material( "sprites/light_ignorez" )
@@ -4,7 +4,6 @@ DEFINE_BASECLASS( "base_gmodentity" )
ENT.Type = "anim"
ENT.Spawnable = false
-ENT.AdminSpawnable = false
--[[---------------------------------------------------------
@@ -2,16 +2,9 @@
AddCSLuaFile()
DEFINE_BASECLASS( "base_gmodentity" )
-ENT.PrintName = "Hover Ball"
-ENT.Author = ""
-ENT.Contact = ""
-ENT.Purpose = ""
-ENT.Instructions = ""
+ENT.Spawnable = false
ENT.RenderGroup = RENDERGROUP_BOTH
-ENT.Spawnable = false
-ENT.AdminSpawnable = false
-
function ENT:SetupDataTables()
self:NetworkVar( "Float", 0, "TargetZ" );
@@ -3,7 +3,6 @@ AddCSLuaFile()
DEFINE_BASECLASS( "base_gmodentity" )
ENT.Spawnable = false
-ENT.AdminSpawnable = false
ENT.RenderGroup = RENDERGROUP_BOTH
local matLight = Material( "sprites/light_ignorez" )
@@ -2,26 +2,19 @@
AddCSLuaFile()
DEFINE_BASECLASS( "base_gmodentity" )
-ENT.PrintName = ""
-ENT.Author = ""
-ENT.Contact = ""
-ENT.Purpose = ""
-ENT.Instructions = ""
ENT.Spawnable = false
-ENT.AdminSpawnable = false
-ENT.RenderGroup = RENDERGROUP_TRANSLUCENT
+ENT.RenderGroup = RENDERGROUP_BOTH
local matLight = Material( "sprites/light_ignorez" )
-local matBeam = Material( "effects/lamp_beam" )
local MODEL = Model( "models/MaxOfS2D/light_tubular.mdl" )
+
--
-- Set up our data table
--
function ENT:SetupDataTables()
self:NetworkVar( "Bool", 0, "On" );
self:NetworkVar( "Bool", 1, "Toggle" );
- --self:NetworkVar( "Float", 0, "LightFOV" );
self:NetworkVar( "Float", 1, "LightSize" );
self:NetworkVar( "Float", 2, "Brightness" );
@@ -60,14 +53,16 @@ end
function ENT:Draw()
BaseClass.Draw( self, true )
-
+
end
--[[---------------------------------------------------------
Name: Think
-----------------------------------------------------------]]
function ENT:Think()
+ self.BaseClass.Think( self )
+
if ( CLIENT ) then
if ( !self:GetOn() ) then return end
@@ -114,11 +109,7 @@ function ENT:DrawTranslucent()
if ( !Visibile || Visibile < 0.1 ) then return end
- if ( !self:GetOn() ) then
-
- render.DrawSprite( LightPos, 20, 20, Color(70, 70, 70, 255 * Visibile) )
-
- return end
+ if ( !self:GetOn() ) then return end
local c = self:GetColor()
local Alpha = 255 * Visibile
@@ -2,15 +2,8 @@
AddCSLuaFile()
DEFINE_BASECLASS( "base_gmodentity" )
-ENT.PrintName = ""
-ENT.Author = ""
-ENT.Contact = ""
-ENT.Purpose = ""
-ENT.Instructions = ""
-ENT.RenderGroup = RENDERGROUP_BOTH
-
ENT.Spawnable = false
-ENT.AdminSpawnable = false
+ENT.RenderGroup = RENDERGROUP_BOTH
local matHeatWave = Material( "sprites/heatwave" )
local matFire = Material( "effects/fire_cloud1" )

0 comments on commit 3e33999

Please sign in to comment.