-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
155 changed files
with
24,932 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// keep clean |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
function EFFECT:Init( data ) | ||
|
||
local size = 64 | ||
local ply = data:GetEntity() | ||
|
||
self:SetCollisionBounds( Vector( -size,-size,-size ), Vector( size,size,size ) ) | ||
self:SetAngles( data:GetNormal():Angle() + Angle( 0.01, 0.01, 0.01 ) ) | ||
|
||
self.Pos = data:GetOrigin() | ||
self.Normal = data:GetNormal() | ||
self.Magnitude = data:GetMagnitude() | ||
self.Alpha = 1 | ||
self.Player = ply | ||
--self.Force = data:GetVelocity() | ||
self:SetPos( data:GetOrigin() ) | ||
|
||
local emitter = ParticleEmitter(ply:GetPos()) | ||
self.Emitter = emitter | ||
self:AddEffects(EF_NODRAW) | ||
|
||
end | ||
|
||
function EFFECT:Think( ) | ||
|
||
local emitter = self.Emitter | ||
local ply = self.Player | ||
|
||
for i = 0, 3 do | ||
local particle = emitter:Add("particle/smokesprites_000"..math.random(1,9), self.Pos) | ||
particle:SetVelocity( self.Normal * self.Magnitude ) | ||
particle:SetDieTime(0.2) | ||
particle:SetStartAlpha( 255 ) | ||
particle:SetEndAlpha( 0 ) | ||
particle:SetStartSize( 10 ) | ||
particle:SetEndSize( 50 ) | ||
--particle:SetRoll( math.Rand(150, 360) ) | ||
--particle:SetRollDelta( math.Rand(-1, 1) ) | ||
particle:SetAirResistance( 0 ) | ||
--particle:SetGravity( Vector( math.Rand( -200 , 200 ), math.Rand( -200 , 200 ), math.Rand( 10 , 100 ) ) ) | ||
particle:SetColor( 64, 0, 0 ) | ||
end | ||
|
||
local particle = emitter:Add("particle/smokesprites_000"..math.random(1,9), self.Pos) | ||
particle:SetVelocity( self.Normal * self.Magnitude ) | ||
particle:SetDieTime(1.2) | ||
particle:SetStartAlpha( 255 ) | ||
particle:SetEndAlpha( 0 ) | ||
particle:SetStartSize( 10 ) | ||
particle:SetEndSize( 150 ) | ||
--particle:SetRoll( math.Rand(150, 360) ) | ||
--particle:SetRollDelta( math.Rand(-1, 1) ) | ||
particle:SetAirResistance( 0 ) | ||
--particle:SetGravity( Vector( math.Rand( -200 , 200 ), math.Rand( -200 , 200 ), math.Rand( 10 , 100 ) ) ) | ||
particle:SetColor( 64, 0, 0 ) | ||
|
||
self:Remove() | ||
|
||
end | ||
|
||
function EFFECT:OnRemove() | ||
--self.Emitter:Finish() | ||
end | ||
|
||
function EFFECT:Draw() | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
EFFECT.Mat1 = Material( "lambda/death_point.png" ) | ||
|
||
function EFFECT:Init( data ) | ||
|
||
local size = 64 | ||
local ply = data:GetEntity() | ||
|
||
self:SetCollisionBounds( Vector( -size,-size,-size ), Vector( size,size,size ) ) | ||
self:SetAngles( data:GetNormal():Angle() + Angle( 0.01, 0.01, 0.01 ) ) | ||
|
||
self.Pos = data:GetOrigin() | ||
self.Normal = data:GetNormal() | ||
self.Alpha = 1 | ||
self.Player = ply | ||
|
||
self.Direction = data:GetScale() | ||
self.Size = data:GetRadius() | ||
self.Axis = data:GetOrigin() | ||
self.Dist = 0 | ||
|
||
self:SetPos( data:GetOrigin() ) | ||
self.PlayerName = ply:Nick() | ||
|
||
end | ||
|
||
function EFFECT:Think( ) | ||
|
||
local speed = FrameTime() | ||
|
||
if not IsValid(self.Player) then | ||
return false | ||
end | ||
|
||
if self.Player:Alive() then | ||
return false | ||
end | ||
|
||
self.Alpha = self.Alpha - speed * 0.08 | ||
self.Dist = math.sin(CurTime() * 5) * 5 | ||
|
||
if (self.Alpha < 0 ) then return false end | ||
|
||
return true | ||
|
||
end | ||
|
||
function EFFECT:Render( ) | ||
|
||
if (self.Alpha < 0 ) then return end | ||
|
||
local Normal = self.Normal | ||
local dir = Normal:Angle() | ||
local ply = LocalPlayer() | ||
local ang = ply:GetPos() - self:GetPos() | ||
local dist = ply:GetPos():Distance(self:GetPos()) | ||
|
||
local signsize = math.Clamp(dist / 20, self.Size / 2, self.Size * 5) | ||
local offset_z = math.Clamp(dist / 20, 50, 200) | ||
|
||
cam.IgnoreZ(true) | ||
|
||
render.SetMaterial( self.Mat1 ) | ||
render.DrawQuadEasy( self:GetPos() + (dir:Forward() * (offset_z + self.Dist)) , | ||
ang, | ||
signsize, signsize, | ||
Color( 255, 255, 255, (self.Alpha ^ 1.1) * 255 ), | ||
180) | ||
|
||
cam.IgnoreZ(false) | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
EFFECT.Mat1 = Material( "lambda/ring1.png" ) | ||
EFFECT.Mat2 = Material( "lambda/ring2.png" ) | ||
EFFECT.Mat3 = Material( "lambda/ring3.png" ) | ||
EFFECT.Mat4 = Material( "lambda/run_point.png" ) | ||
|
||
function EFFECT:Init( data ) | ||
|
||
local size = 64 | ||
local ply = data:GetEntity() | ||
|
||
if ply.LastPointer and IsValid(ply.LastPointer) then | ||
ply.LastPointer:Remove() | ||
end | ||
ply.LastPointer = self | ||
|
||
self:SetCollisionBounds( Vector( -size,-size,-size ), Vector( size,size,size ) ) | ||
self:SetAngles( data:GetNormal():Angle() + Angle( 0.01, 0.01, 0.01 ) ) | ||
|
||
self.Pos = data:GetOrigin() | ||
self.Normal = data:GetNormal() | ||
self.Alpha = 1 | ||
|
||
self.Direction = data:GetScale() | ||
self.Size = data:GetRadius() | ||
self.Axis = data:GetOrigin() | ||
self.Dist = 0 | ||
|
||
self:SetPos( data:GetOrigin() ) | ||
|
||
end | ||
|
||
function EFFECT:Think( ) | ||
|
||
local speed = FrameTime() | ||
|
||
self.Alpha = self.Alpha - speed * 0.16 | ||
self.Dist = math.sin(CurTime() * 5) * 5 | ||
|
||
if (self.Alpha < 0 ) then return false end | ||
|
||
return true | ||
|
||
end | ||
|
||
function EFFECT:Render( ) | ||
|
||
if (self.Alpha < 0 ) then return end | ||
|
||
local Normal = self.Normal | ||
local dir = Normal:Angle() | ||
local ply = LocalPlayer() | ||
local ang = ply:GetPos() - self:GetPos() | ||
local dist = ply:GetPos():Distance(self:GetPos()) | ||
|
||
render.SetMaterial( self.Mat1 ) | ||
render.DrawQuadEasy( self:GetPos() + Normal, | ||
Normal:GetNormalized() * self.Direction, | ||
self.Size, self.Size, | ||
Color( 255, 255, 255, (self.Alpha ^ 1.1) * 255 ), | ||
-(self.Alpha * 400) ) | ||
|
||
render.SetMaterial( self.Mat2 ) | ||
render.DrawQuadEasy( self:GetPos() + Normal, | ||
Normal:GetNormalized() * self.Direction, | ||
self.Size, self.Size, | ||
Color( 255, 255, 255, (self.Alpha ^ 1.1) * 255 ), | ||
(self.Alpha * 500) ) | ||
|
||
render.SetMaterial( self.Mat3 ) | ||
render.DrawQuadEasy( self:GetPos() + Normal, | ||
Normal:GetNormalized() * self.Direction, | ||
self.Size, self.Size, | ||
Color( 255, 255, 255, (self.Alpha ^ 1.1) * 255 ), | ||
-(self.Alpha * 800) ) | ||
|
||
local signsize = math.Clamp(dist / 20, self.Size / 2, self.Size * 5) | ||
local offset_z = math.Clamp(dist / 20, 50, 200) | ||
|
||
render.SetMaterial( self.Mat4 ) | ||
render.DrawQuadEasy( self:GetPos() + (dir:Forward() * (offset_z + self.Dist)) , | ||
ang, | ||
signsize, signsize, | ||
Color( 255, 255, 255, (self.Alpha ^ 1.1) * 255 ), | ||
180) | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
if SERVER then | ||
|
||
util.AddNetworkString("LambdaHintText") | ||
|
||
SF_HUDHINT_ALLPLAYERS = 1 | ||
|
||
ENT.Base = "lambda_entity" | ||
ENT.Type = "point" | ||
|
||
DEFINE_BASECLASS( "lambda_entity" ) | ||
|
||
function ENT:PreInitialize() | ||
|
||
BaseClass.PreInitialize(self) | ||
|
||
self:SetInputFunction("ShowHudHint", self.InputShowHudHint) | ||
self:SetInputFunction("HideHudHint", self.InputHideHudHint) | ||
self.Message = "" | ||
|
||
end | ||
|
||
function ENT:Initialize() | ||
|
||
BaseClass.Initialize(self) | ||
|
||
self:AddSpawnFlags(SF_HUDHINT_ALLPLAYERS) | ||
|
||
end | ||
|
||
function ENT:KeyValue(key, val) | ||
|
||
BaseClass.KeyValue(self, key, val) | ||
|
||
if key == "message" then | ||
self.Message = val | ||
end | ||
|
||
end | ||
|
||
function ENT:InputShowHudHint(data, activator, caller) | ||
|
||
return self:Command(data, activator, caller) | ||
|
||
end | ||
|
||
function ENT:InputHideHudHint(data, activator, caller) | ||
|
||
return self:Command(data, activator, caller) | ||
|
||
end | ||
|
||
function ENT:Command(data, activator, caller) | ||
-- Stub | ||
end | ||
|
||
else -- CLIENT | ||
|
||
|
||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
if SERVER then | ||
|
||
ENT.Base = "lambda_entity" | ||
ENT.Type = "point" | ||
|
||
DEFINE_BASECLASS( "lambda_entity" ) | ||
|
||
function ENT:PreInitialize() | ||
|
||
BaseClass.PreInitialize(self) | ||
--self:SetInputFunction("ShowMessage", self.InputCommand) | ||
|
||
end | ||
|
||
function ENT:Initialize() | ||
|
||
BaseClass.Initialize(self) | ||
|
||
end | ||
|
||
function ENT:KeyValue(key, val) | ||
|
||
BaseClass.KeyValue(self, key, val) | ||
|
||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
local DbgPrint = GetLogging("NPC") | ||
|
||
if SERVER then | ||
|
||
ENT.Base = "base_point" | ||
ENT.ReuseDelay = 0 | ||
ENT.RenameNPC = nil | ||
ENT.TimeNextAvailable = 0 | ||
|
||
DEFINE_BASECLASS( "base_point" ) | ||
|
||
function ENT:PreInitialize() | ||
|
||
self:SetupOutput("OnSpawnNPC") | ||
|
||
end | ||
|
||
function ENT:KeyValue(key, val) | ||
|
||
if key:iequals("ReuseDelay") then | ||
self.ReuseDelay = tonumber(val) | ||
elseif key:iequals("RenameNPC") then | ||
self.RenameNPC = val | ||
end | ||
|
||
return BaseClass.KeyValue(self, key, val) | ||
|
||
end | ||
|
||
function ENT:Initialize() | ||
|
||
self.TimeNextAvailable = CurTime() | ||
|
||
BaseClass.Initialize(self) | ||
|
||
end | ||
|
||
function ENT:IsAvailable() | ||
|
||
if self.TimeNextAvailable > CurTime() then | ||
return false | ||
end | ||
|
||
return true | ||
|
||
end | ||
|
||
function ENT:OnSpawnedNPC(ent) | ||
|
||
if self.RenameNPC ~= nil and self.RenameNPC ~= "" then | ||
ent:SetName(self.RenameNPC) | ||
end | ||
|
||
self:FireOutputs("OnSpawnNPC", ent, self) | ||
self.TimeNextAvailable = CurTime() + self.ReuseDelay | ||
|
||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ENT.Base = "base_point" | ||
ENT.Type = "point" | ||
|
||
function ENT:Initialize() | ||
end |
Oops, something went wrong.