diff --git a/lua/autorun/gwater2_init.lua b/lua/autorun/gwater2_init.lua index bdb079c..81f904f 100644 --- a/lua/autorun/gwater2_init.lua +++ b/lua/autorun/gwater2_init.lua @@ -188,4 +188,12 @@ timer.Create("gwater2_tick", limit_fps, 0, function() end) hook.Add("InitPostEntity", "gwater2_addprop", gwater2.reset_solver) -hook.Add("OnEntityCreated", "gwater2_addprop", function(ent) timer.Simple(0, function() add_prop(ent) end) end) // timer.0 so data values are setup correctly \ No newline at end of file +hook.Add("OnEntityCreated", "gwater2_addprop", function(ent) timer.Simple(0, function() add_prop(ent) end) end) // timer.0 so data values are setup correctly + +hook.Add("gwater2_pretick", "gravgun", function() + local lp = LocalPlayer() + if !lp:KeyDown(IN_ATTACK2) then return end + if IsValid(LocalPlayer():GetActiveWeapon()) and LocalPlayer():GetActiveWeapon():GetClass() == "weapon_physcannon" then + gwater2.solver:AddForceField(LocalPlayer():EyePos() + LocalPlayer():GetAimVector() * 170, 150, -60, 0, true) + end +end) \ No newline at end of file diff --git a/lua/entities/gwater2_blackhole.lua b/lua/entities/gwater2_blackhole.lua index 4efab9d..a17ba0f 100644 --- a/lua/entities/gwater2_blackhole.lua +++ b/lua/entities/gwater2_blackhole.lua @@ -32,7 +32,7 @@ function ENT:SetupDataTables() self.PARTICLE_EMITTER = ParticleEmitter(self:GetPos(), false) hook.Add("gwater2_pretick", self, function() - gwater2.solver:AddForceField(self:GetPos(), self:GetRadius(), self:GetStrength(), self:GetMode(), self:GetLinear()) + gwater2.solver:AddForceField(self:GetPos(), self:GetRadius(), -self:GetStrength(), self:GetMode(), self:GetLinear()) end) end @@ -45,7 +45,7 @@ if SERVER then ent:Activate() ent:SetRadius(1000) - ent:SetStrength(-50) + ent:SetStrength(50) ent:SetMode(0) ent:SetLinear(1) @@ -59,7 +59,7 @@ elseif CLIENT then local part = self.PARTICLE_EMITTER:Add("particle/warp_ripple", self:GetPos()) part:SetVelocity(Vector()) part:SetGravity(Vector()) - part:SetDieTime(0.1) + part:SetDieTime(FrameTime() * 10) //part:SetColor(Color(255, 255, 255, 0)) part:SetStartSize(50) part:SetEndSize(50) @@ -69,10 +69,10 @@ elseif CLIENT then local part = self.PARTICLE_EMITTER:Add("particle/warp1_warp", self:GetPos()) part:SetVelocity(Vector()) part:SetGravity(Vector()) - part:SetDieTime(0.2) + part:SetDieTime(FrameTime() * 20) part:SetColor(Color(255, 255, 255)) part:SetStartSize(25 + (math.sin(CurTime() * 2) * 3)) - part:SetEndSize(0) + part:SetEndSize(22) //part:SetStartAlpha(255) part:SetLighting(false) self:SetNextClientThink(CurTime() + 0.001) diff --git a/lua/gwater2_shaders.lua b/lua/gwater2_shaders.lua index f6378c1..dfe8610 100644 --- a/lua/gwater2_shaders.lua +++ b/lua/gwater2_shaders.lua @@ -107,7 +107,7 @@ hook.Add("PostDrawOpaqueRenderables", "gwater2_render", function(depth, sky, sky else -- no absorption calculations, so just use solid color render.PushRenderTarget(cache_absorption) - render.Clear(10, 10, 10, 10) + render.Clear(15, 15, 15, 10) render.PopRenderTarget() end diff --git a/lua/gwater2_swimming.lua b/lua/gwater2_swimming.lua index 217a898..a377043 100644 --- a/lua/gwater2_swimming.lua +++ b/lua/gwater2_swimming.lua @@ -1,5 +1,5 @@ -local GWATER2_PARTICLES_TO_SWIM = 30 +local GWATER2_PARTICLES_TO_SWIM = 50 -- swim code provided by kodya (with permission) local gravity_convar = GetConVar("sv_gravity") diff --git a/materials/gwater2/finalpass.vmt b/materials/gwater2/finalpass.vmt index ff26e41..2bf59a2 100644 --- a/materials/gwater2/finalpass.vmt +++ b/materials/gwater2/finalpass.vmt @@ -2,7 +2,7 @@ GWaterFinalpass { $envmap "env_cubemap" $radius 10 $ior 1.333 - $reflectance 0.6 + $reflectance 0.65 $screentexture "_rt_fullframefb" $color2 "[209 237 255 25]" $flashlight 1