Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions MorbusGamemode/addon.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,66 +5,69 @@
ENT.Type = "anim"

if SERVER then
AddCSLuaFile("shared.lua")

function ENT:Initialize()
self:SetMoveType( MOVETYPE_NONE )
self:SetSolid( SOLID_NONE )
self:SetCollisionGroup( COLLISION_GROUP_NONE )
self:DrawShadow(false)
self:SetModel("models/glowstick/stick_lblu.mdl")
AddCSLuaFile("shared.lua")

end
function ENT:Think()
function ENT:Initialize()
self:SetMoveType( MOVETYPE_NONE )
self:SetSolid( SOLID_NONE )
self:SetCollisionGroup( COLLISION_GROUP_NONE )
self:DrawShadow(false)
self:SetModel("models/glowstick/stick_lblu.mdl")

local player = self:GetOwner()
self:SetColor(player:GetColor())
self:SetMaterial(player:GetMaterial())
end

end
end

if CLIENT then
function ENT:Draw()
-- some lines of code were modified, cause i dont need all bones, only right hand.
local p = self:GetOwner():GetRagdollEntity() or self:GetOwner()
local hand = p:LookupBone("ValveBiped.Bip01_R_Hand")
if hand then
local position, angles = p:GetBonePosition(hand)
local x = angles:Up() * (-0.00 )
local y = angles:Right() * 2.50
local z = angles:Forward() * 4.15
local pitch = 0.00
local yaw = 0.00
local roll = 0.00

angles:RotateAroundAxis(angles:Forward(), pitch)
angles:RotateAroundAxis(angles:Right(), yaw)
angles:RotateAroundAxis(angles:Up(), roll)
self:SetPos(position + x + y + z)
self:SetAngles(angles)
end
function ENT:Draw()
-- some lines of code were modified, cause i dont need all bones, only right hand.
local p = self:GetOwner():GetRagdollEntity() or self:GetOwner()
local hand = p:LookupBone("ValveBiped.Bip01_R_Hand")
if hand then
local position, angles = p:GetBonePosition(hand)
local x = angles:Up() * (-0.00 )
local y = angles:Right() * 2.50
local z = angles:Forward() * 4.15
local pitch = 0.00
local yaw = 0.00
local roll = 0.00
angles:RotateAroundAxis(angles:Forward(), pitch)
angles:RotateAroundAxis(angles:Right(), yaw)
angles:RotateAroundAxis(angles:Up(), roll)
self:SetPos(position + x + y + z)
self:SetAngles(angles)
end
local eyepos = EyePos()
local eyepos2 = LocalPlayer():EyePos()
if eyepos:Distance(eyepos2) > 5 or LocalPlayer() != self:GetOwner() then
self:DrawModel()
end
end
function ENT:Think()
if self:GetPos():Distance(LocalPlayer():GetPos()) > 5000 then return end
local dlight = DynamicLight( self:EntIndex() )
if ( dlight ) then
local r, g, b, a = self:GetColor()
dlight.Pos = self:GetPos()
dlight.r = 12
dlight.g = 240
dlight.b = 250
dlight.Brightness = 1
dlight.Size = 750
dlight.Decay = 750
dlight.DieTime = CurTime() + 1
end
end
end

function ENT:Think()
if self:GetPos():Distance(LocalPlayer():GetPos()) > 5000 then
self:SetNextClientThink(CurTime() + 0.25)
return true
end

local dlight = DynamicLight( self:EntIndex() )
if ( dlight ) then
local r, g, b, a = self:GetColor()
dlight.Pos = self:GetPos()
dlight.r = 12
dlight.g = 240
dlight.b = 250
dlight.Brightness = 1
dlight.Size = 750
dlight.Decay = 750
dlight.DieTime = CurTime() + 1
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,19 @@ function ENT:Initialize()
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
if phys:IsValid() then phys:Wake() end
self.Death = CurTime() + 90

timer.Simple(90, function() if self.Entity then self.Entity:Remove() end end)
end

function ENT:SpawnFunction( ply, tr )
if ( !tr.Hit ) then return end
local ent = ents.Create("ent_glowstick_fly")
ent:SetPos( tr.HitPos + tr.HitNormal * 16 )
ent:Spawn()
ent:Activate()
if ( !tr.Hit ) then return end

local ent = ents.Create("ent_glowstick_fly")
ent:SetPos( tr.HitPos + tr.HitNormal * 16 )
ent:Spawn()
ent:Activate()

return ent
end

function ENT:OnRemove()
end

function ENT:Think()
if self.Death && self.Death < CurTime() then
self:Remove()
end
return ent
end

function ENT:Use( activator, caller )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,66 +5,69 @@
ENT.Type = "anim"

if SERVER then
AddCSLuaFile("shared.lua")

function ENT:Initialize()
self:SetMoveType( MOVETYPE_NONE )
self:SetSolid( SOLID_NONE )
self:SetCollisionGroup( COLLISION_GROUP_NONE )
self:DrawShadow(false)
self:SetModel("models/glowstick/stick.mdl")
AddCSLuaFile("shared.lua")

end
function ENT:Think()
function ENT:Initialize()
self:SetMoveType( MOVETYPE_NONE )
self:SetSolid( SOLID_NONE )
self:SetCollisionGroup( COLLISION_GROUP_NONE )
self:DrawShadow(false)
self:SetModel("models/glowstick/stick.mdl")

local player = self:GetOwner()
self:SetColor(player:GetColor())
self:SetMaterial(player:GetMaterial())
end

end
end
end

if CLIENT then
function ENT:Draw()
-- some lines of code were modified, cause i dont need all bones, only right hand.
local p = self:GetOwner():GetRagdollEntity() or self:GetOwner()
local hand = p:LookupBone("ValveBiped.Bip01_R_Hand")
if hand then
local position, angles = p:GetBonePosition(hand)

local x = angles:Up() * (-0.00 )
local y = angles:Right() * 2.50
local z = angles:Forward() * 4.15

local pitch = 0.00
local yaw = 0.00
local roll = 0.00

angles:RotateAroundAxis(angles:Forward(), pitch)
angles:RotateAroundAxis(angles:Right(), yaw)
angles:RotateAroundAxis(angles:Up(), roll)

self:SetPos(position + x + y + z)
self:SetAngles(angles)
end
function ENT:Draw()
-- some lines of code were modified, cause i dont need all bones, only right hand.
local p = self:GetOwner():GetRagdollEntity() or self:GetOwner()
local hand = p:LookupBone("ValveBiped.Bip01_R_Hand")
if hand then
local position, angles = p:GetBonePosition(hand)

local x = angles:Up() * (-0.00 )
local y = angles:Right() * 2.50
local z = angles:Forward() * 4.15

local pitch = 0.00
local yaw = 0.00
local roll = 0.00

angles:RotateAroundAxis(angles:Forward(), pitch)
angles:RotateAroundAxis(angles:Right(), yaw)
angles:RotateAroundAxis(angles:Up(), roll)

self:SetPos(position + x + y + z)
self:SetAngles(angles)
end

local eyepos = EyePos()
local eyepos2 = LocalPlayer():EyePos()
if eyepos:Distance(eyepos2) > 5 or LocalPlayer() != self:GetOwner() then
self:DrawModel()
end
end
function ENT:Think()
if self:GetPos():Distance(LocalPlayer():GetPos()) > 5000 then return end
local dlight = DynamicLight( self:EntIndex() )
if ( dlight ) then
local r, g, b, a = self:GetColor()
dlight.Pos = self:GetPos()
dlight.r = 0
dlight.g = 255
dlight.b = 0
dlight.Brightness = 1
dlight.Size = 750
dlight.Decay = 750
dlight.DieTime = CurTime() + 1
end
end
end

function ENT:Think()
if self:GetPos():Distance(LocalPlayer():GetPos()) > 5000 then
self:SetNextClientThink(CurTime() + 0.25)
return true
end

local dlight = DynamicLight( self:EntIndex() )
if ( dlight ) then
local r, g, b, a = self:GetColor()
dlight.Pos = self:GetPos()
dlight.r = 0
dlight.g = 255
dlight.b = 0
dlight.Brightness = 1
dlight.Size = 750
dlight.Decay = 750
dlight.DieTime = CurTime() + 1
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,19 @@ function ENT:Initialize()
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
if phys:IsValid() then phys:Wake() end
self.Death = CurTime() + 90

timer.Simple(90, function() if self.Entity then self.Entity:Remove() end end)
end

function ENT:SpawnFunction( ply, tr )
if ( !tr.Hit ) then return end
local ent = ents.Create("ent_glowstick_fly")
ent:SetPos( tr.HitPos + tr.HitNormal * 16 )
ent:Spawn()
ent:Activate()

return ent
end

function ENT:OnRemove()
end

function ENT:Think()
if self.Death && self.Death < CurTime() then
self:Remove()
end
if ( !tr.Hit ) then return end

local ent = ents.Create("ent_glowstick_fly")
ent:SetPos( tr.HitPos + tr.HitNormal * 16 )
ent:Spawn()
ent:Activate()

return ent
end

function ENT:Use( activator, caller )
Expand Down
Loading