-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make single place to control E + SPAWN (#27)
Fixed: Admins cannot remove players stuff Fixed: Refraction in case water texture entry misses sequential source Fixed: Surface world `SetSurfaceWorld` moved outside Fixed: Tool HUD shows reflector info incorrectly Fixed: Use beam general temporary trace output instead of `tr` Fixed: Water surface finder not supporting filters Fixed: `LaserLib.IsOther` returns the correct flag Fixed: `LaserLib.RegisterUnit` is unneeded now Added: Beam meta trace result Added: Checker for non utilizable models `IsOther` Added: Class registration and visual updates. Tested on crystal Added: Class, model and material will be inserted on spawn Added: Contents ID extractor to use refract table Added: Contents to the sequential table keys Added: Error message for invalid unit registration Added: Laser unit proper initialization Added: Library function `LaserLib.SetClass` and `LaserLib.IsOther` Added: Reflector support `GetReflectInfo` Added: Refraction reverse indexing for sequential Added: Second argument to model and material to update cashe Added: Sim for disabling values Added: Some models for portal and portal 2 Added: Support for other mediums different than water Added: Surface world added current contents argument Added: Unique unit ID for every laser entity Added: `SetWaterSurface` Removed: 3-rd column (variable name extension) from units list Removed: Dedicated library function `GeFolder` Removed: Dedicated medium contents Removed: Global material and model tables. Stored in gtUNITS Removed: Passing laser unit ID to `SpawnFunction` Removed: `LaserLib.GetUnit` as it is not needed anymore Renamed: Library function `LaserLib.SetClass` Renamed: Plane to surface ( water surface ) Renamed: Sone internal variables Renamed: `LaserLib.SetClass` to `LaserLib.RegisterUnit` Updated: Dedicated unit registration creating convars `RegisterUnit` Updated: Material and models configure routine Updated: Rearrange of data values and calls Updated: Snap custom and normal to accept trace reference Updated: Surface angle to do only one indexing Updated: Trace entity model replace with `E` Updated: Water direct to use temporary Utilize: `SetWaterSurface` in some methods and cases Factorize: Contents manager `SetRefractContent`
- Loading branch information
1 parent
e554834
commit ca2a93f
Showing
27 changed files
with
447 additions
and
400 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -14,6 +14,7 @@ ENT.Contact = "[email protected]" | |
ENT.Spawnable = true | ||
ENT.AdminSpawnable = true | ||
ENT.RenderGroup = RENDERGROUP_OPAQUE | ||
ENT.UnitID = 1 | ||
|
||
local EFFECTDT = LaserLib.GetData("EFFECTDT") | ||
local DAMAGEDT = LaserLib.GetData("DAMAGEDT") | ||
|
@@ -235,7 +236,7 @@ function ENT:DoSound(state) | |
if(self.onState ~= state) then | ||
self.onState = state -- Write the state | ||
local pos, enb = self:GetPos(), LaserLib.GetData("ENSOUNDS") | ||
local cls, mcs = self:GetClass(), LaserLib.GetClass(1, 1) | ||
local cls, mcs = self:GetClass(), LaserLib.GetClass(1) | ||
if(cls == mcs or enb:GetBool()) then | ||
if(state) then -- Activating laser for given position | ||
self:EmitSound(self:GetStartSound()) | ||
|
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
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ ENT.Type = "anim" | |
ENT.Category = LaserLib.GetData("CATG") | ||
ENT.PrintName = "Crystal" | ||
ENT.Information = ENT.Category.." "..ENT.PrintName | ||
ENT.Base = LaserLib.GetClass(1, 1) | ||
ENT.Base = LaserLib.GetClass(1) | ||
if(WireLib) then | ||
ENT.WireDebugName = ENT.Information | ||
end | ||
|
@@ -11,6 +11,9 @@ ENT.Contact = "[email protected]" | |
ENT.Spawnable = true | ||
ENT.AdminSpawnable = true | ||
ENT.RenderGroup = RENDERGROUP_BOTH | ||
ENT.UnitID = 2 | ||
|
||
LaserLib.RegisterUnit(ENT, "models/props_c17/pottery02a.mdl", "models/dog/eyeglass") | ||
|
||
function ENT:SetupDataTables() | ||
LaserLib.SetPrimary(self) | ||
|
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
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 |
---|---|---|
|
@@ -14,6 +14,9 @@ ENT.Contact = "[email protected]" | |
ENT.Spawnable = true | ||
ENT.AdminSpawnable = true | ||
ENT.RenderGroup = RENDERGROUP_BOTH | ||
ENT.UnitID = 7 | ||
|
||
LaserLib.RegisterUnit(ENT, "models/props_c17/furnitureshelf001b.mdl", "models/dog/eyeglass") | ||
|
||
include(LaserLib.GetTool().."/wire_wrapper.lua") | ||
include(LaserLib.GetTool().."/editable_wrapper.lua") | ||
|
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
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ ENT.Type = "anim" | |
ENT.Category = LaserLib.GetData("CATG") | ||
ENT.PrintName = "Divider" | ||
ENT.Information = ENT.Category.." "..ENT.PrintName | ||
ENT.Base = LaserLib.GetClass(1, 1) | ||
ENT.Base = LaserLib.GetClass(1) | ||
if(WireLib) then | ||
ENT.WireDebugName = ENT.Information | ||
end | ||
|
@@ -12,6 +12,9 @@ ENT.Contact = "[email protected]" | |
ENT.Spawnable = true | ||
ENT.AdminSpawnable = true | ||
ENT.RenderGroup = RENDERGROUP_BOTH | ||
ENT.UnitID = 5 | ||
|
||
LaserLib.RegisterUnit(ENT, "models/props_c17/furnitureshelf001b.mdl", "models/dog/eyeglass") | ||
|
||
function ENT:UpdateInternals() | ||
self.hitSize = 0 -- Add sources in array | ||
|
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
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 |
---|---|---|
|
@@ -14,6 +14,9 @@ ENT.Contact = "[email protected]" | |
ENT.Spawnable = true | ||
ENT.AdminSpawnable = true | ||
ENT.RenderGroup = RENDERGROUP_BOTH | ||
ENT.UnitID = 11 | ||
|
||
LaserLib.RegisterUnit(ENT, "models/props_c17/frame002a.mdl", "models/props_combine/citadel_cable") | ||
|
||
include(LaserLib.GetTool().."/wire_wrapper.lua") | ||
include(LaserLib.GetTool().."/editable_wrapper.lua") | ||
|
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
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 |
---|---|---|
|
@@ -14,6 +14,9 @@ ENT.Contact = "[email protected]" | |
ENT.Spawnable = true | ||
ENT.AdminSpawnable = true | ||
ENT.RenderGroup = RENDERGROUP_BOTH | ||
ENT.UnitID = 10 | ||
|
||
LaserLib.RegisterUnit(ENT, "models/props_c17/furnitureshelf001b.mdl", "models/dog/eyeglass") | ||
|
||
include(LaserLib.GetTool().."/wire_wrapper.lua") | ||
include(LaserLib.GetTool().."/editable_wrapper.lua") | ||
|
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
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 |
---|---|---|
|
@@ -14,6 +14,9 @@ ENT.Contact = "[email protected]" | |
ENT.Spawnable = true | ||
ENT.AdminSpawnable = true | ||
ENT.RenderGroup = RENDERGROUP_BOTH | ||
ENT.UnitID = 9 | ||
|
||
LaserLib.RegisterUnit(ENT, "models/props_c17/frame002a.mdl", "models/props_combine/com_shield001a") | ||
|
||
include(LaserLib.GetTool().."/wire_wrapper.lua") | ||
include(LaserLib.GetTool().."/editable_wrapper.lua") | ||
|
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
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ ENT.Contact = "[email protected]" | |
ENT.Spawnable = false | ||
ENT.AdminSpawnable = true | ||
ENT.RenderGroup = RENDERGROUP_BOTH | ||
ENT.UnitID = 0 | ||
|
||
include(LaserLib.GetTool().."/wire_wrapper.lua") | ||
include(LaserLib.GetTool().."/editable_wrapper.lua") | ||
|
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
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 |
---|---|---|
|
@@ -14,6 +14,9 @@ ENT.Contact = "[email protected]" | |
ENT.Spawnable = true | ||
ENT.AdminSpawnable = true | ||
ENT.RenderGroup = RENDERGROUP_BOTH | ||
ENT.UnitID = 3 | ||
|
||
LaserLib.RegisterUnit(ENT, "models/madjawa/laser_reflector.mdl", "debug/env_cubemap_model") | ||
|
||
include(LaserLib.GetTool().."/wire_wrapper.lua") | ||
include(LaserLib.GetTool().."/editable_wrapper.lua") | ||
|
@@ -42,3 +45,10 @@ function ENT:SetReflectRatio(ratio) | |
self:WireWrite("Ratio", ratio) | ||
return self | ||
end | ||
|
||
function ENT:GetReflectInfo(reflect) | ||
local cpy = table.Copy(reflect) | ||
local rat = self:GetReflectRatio() | ||
cpy[1] = ((rat > 0) and rat or reflect[1]) | ||
return cpy -- Return modified row copy | ||
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
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 |
---|---|---|
|
@@ -14,6 +14,9 @@ ENT.Contact = "[email protected]" | |
ENT.Spawnable = true | ||
ENT.AdminSpawnable = true | ||
ENT.RenderGroup = RENDERGROUP_BOTH | ||
ENT.UnitID = 12 | ||
|
||
LaserLib.RegisterUnit(ENT, "models/madjawa/laser_reflector.mdl", "models/props_combine/health_charger_glass") | ||
|
||
include(LaserLib.GetTool().."/wire_wrapper.lua") | ||
include(LaserLib.GetTool().."/editable_wrapper.lua") | ||
|
@@ -73,5 +76,5 @@ function ENT:GetRefractInfo(refract) | |
if(self:GetZeroIndexMode()) then cpy[1] = idx | ||
else cpy[1] = ((idx ~= 0) and idx or refract[1]) end | ||
cpy[2], cpy[3] = ((rat > 0) and rat or refract[2]), nil | ||
return cpy | ||
return cpy -- Return modified row copy | ||
end |
Oops, something went wrong.