From de11bc9cc8753c69d21a2eade1139bf4bd835600 Mon Sep 17 00:00:00 2001 From: Rodro555 <149922274+Rodro555@users.noreply.github.com> Date: Mon, 26 Aug 2024 23:39:03 -0300 Subject: [PATCH 1/2] Add files via upload --- lua/autorun/doom64_dirty.lua | 1 + lua/entities/d64_bfgball.lua | 12 ++++++++---- lua/entities/d64_plsball.lua | 19 +++++++++++++++---- lua/entities/d64_rocketproj.lua | 14 +++++++++----- lua/weapons/d64_bfg.lua | 3 ++- lua/weapons/d64_laser.lua | 3 ++- lua/weapons/d64_laserlvl3.lua | 1 + lua/weapons/d64_laserlvl4.lua | 1 + lua/weapons/d64_plasma.lua | 3 ++- lua/weapons/d64_rocket.lua | 3 ++- 10 files changed, 43 insertions(+), 17 deletions(-) create mode 100644 lua/autorun/doom64_dirty.lua diff --git a/lua/autorun/doom64_dirty.lua b/lua/autorun/doom64_dirty.lua new file mode 100644 index 0000000..1ff8e07 --- /dev/null +++ b/lua/autorun/doom64_dirty.lua @@ -0,0 +1 @@ +print("test") diff --git a/lua/entities/d64_bfgball.lua b/lua/entities/d64_bfgball.lua index 9cc0a60..7ab34bb 100644 --- a/lua/entities/d64_bfgball.lua +++ b/lua/entities/d64_bfgball.lua @@ -12,6 +12,7 @@ function ENT:Initialize() self:SetNWString("CurSprite", "ent/bfgball/bfs") self:SetNWFloat("SpriteTimer", 0) self:SetNWInt("IdleSprite", 0) + self:SetNWBool( "stateless", false ) if SERVER then self:SetModel("models/hunter/misc/sphere025x025.mdl") self:SetMoveType(MOVETYPE_VPHYSICS) @@ -26,7 +27,7 @@ end function ENT:Think() if SERVER then - if IsValid(self:GetPhysicsObject()) then + if IsValid(self:GetPhysicsObject()) and self:GetNWBool( "stateless") == false then self:GetPhysicsObject():SetVelocity(self:GetForward() * 1500) end @@ -86,8 +87,11 @@ function ENT:FireTracers() end function ENT:PhysicsCollide() - self:SetMoveType(MOVETYPE_NONE) - self:SetSolid(SOLID_NONE) + self:GetPhysicsObject():SetVelocity(self:GetForward()) + if self:GetNWBool( "stateless") == true then return end + self:SetNWBool( "stateless", true ) + --self:SetMoveType(MOVETYPE_NONE) + --self:SetSolid(SOLID_NONE) self:EmitSound("DOOM64_BFGHit") self:SetNWString("CurSprite", "ent/bfgball/BFS1C0.png") timer.Simple(0.1, function() @@ -111,4 +115,4 @@ function ENT:PhysicsCollide() end) end -scripted_ents.Register(ENT, "d64_bfgball") \ No newline at end of file +scripted_ents.Register(ENT, "d64_bfgball") diff --git a/lua/entities/d64_plsball.lua b/lua/entities/d64_plsball.lua index c01d36e..a1d7b6a 100644 --- a/lua/entities/d64_plsball.lua +++ b/lua/entities/d64_plsball.lua @@ -7,6 +7,7 @@ ENT.Base = "base_anim" ENT.RenderGroup = RENDERGROUP_BOTH function ENT:Initialize() + self:SetNWBool( "stateless", false ) self:SetNWString("CurSprite", "ent/plsball/PLSSA0.png") if SERVER then self:SetModel("models/hunter/misc/sphere025x025.mdl") @@ -22,7 +23,7 @@ end function ENT:Think() if SERVER then - if IsValid(self:GetPhysicsObject()) then + if IsValid(self:GetPhysicsObject()) and self:GetNWBool( "stateless") == false then self:GetPhysicsObject():SetVelocity(self:GetForward() * 2000) end if self:WaterLevel() > 0 then @@ -40,8 +41,11 @@ function ENT:Draw() end function ENT:PhysicsCollide() - self:SetMoveType(MOVETYPE_NONE) - self:SetSolid(SOLID_NONE) + self:GetPhysicsObject():SetVelocity(self:GetForward()) + if self:GetNWBool( "stateless") == true then return end + self:SetNWBool( "stateless", true ) + --self:SetMoveType(MOVETYPE_NONE) + --self:SetSolid(SOLID_NONE) self:EmitSound("DOOM64_RocketHit") self:SetNWString("CurSprite", "ent/plsball/PLSSC0.png") timer.Simple(0.1, function() @@ -77,4 +81,11 @@ function ENT:Touch(entity) end end -scripted_ents.Register(ENT, "d64_plasmaball") \ No newline at end of file +--[[ +self:SetNWBool( "stateless", false ) + self:GetPhysicsObject():SetVelocity(self:GetForward()) + if self:GetNWBool( "stateless") == true then return end + self:SetNWBool( "stateless", true ) +]] + +scripted_ents.Register(ENT, "d64_plasmaball") diff --git a/lua/entities/d64_rocketproj.lua b/lua/entities/d64_rocketproj.lua index feea0b9..fad9c92 100644 --- a/lua/entities/d64_rocketproj.lua +++ b/lua/entities/d64_rocketproj.lua @@ -8,6 +8,7 @@ ENT.RenderGroup = RENDERGROUP_BOTH function ENT:Initialize() self:SetNWString("CurSprite", "ent/rocket/MISLA5.png") + self:SetNWBool( "stateless", false ) if SERVER then self:SetModel("models/hunter/misc/sphere025x025.mdl") self:SetMoveType(MOVETYPE_VPHYSICS) @@ -22,7 +23,7 @@ end function ENT:Think() if SERVER then - if IsValid(self:GetPhysicsObject()) then + if IsValid(self:GetPhysicsObject()) and self:GetNWBool( "stateless") == false then self:GetPhysicsObject():SetVelocity(self:GetForward() * 2000) end if self:WaterLevel() > 0 then @@ -30,7 +31,7 @@ function ENT:Think() end EffectData():SetOrigin(self:GetPos()) - util.Effect("doom64_rocketrail", EffectData()) + if self:GetNWBool( "stateless") == false then util.Effect("doom64_rocketrail", EffectData()) end self:NextThink(CurTime() + 0.08) end return true @@ -43,8 +44,11 @@ function ENT:Draw() end function ENT:PhysicsCollide() - self:SetMoveType(MOVETYPE_NONE) - self:SetSolid(SOLID_NONE) + self:GetPhysicsObject():SetVelocity(Vector(0,0,0)) + if self:GetNWBool( "stateless") == true then return end + self:SetNWBool( "stateless", true ) + --self:SetMoveType(MOVETYPE_NONE) + --self:SetSolid(SOLID_NONE) util.BlastDamage(self, self.Owner, self:GetPos(), 128, 128) self:EmitSound("DOOM64_RocketHit") self:SetNWString("CurSprite", "ent/rocket/MISLB0.png") @@ -71,4 +75,4 @@ function ENT:Touch(ent) end end -scripted_ents.Register(ENT, "d64_rocketproj") \ No newline at end of file +scripted_ents.Register(ENT, "d64_rocketproj") diff --git a/lua/weapons/d64_bfg.lua b/lua/weapons/d64_bfg.lua index 03ed69b..69c0f04 100644 --- a/lua/weapons/d64_bfg.lua +++ b/lua/weapons/d64_bfg.lua @@ -27,6 +27,7 @@ if CLIENT then end function SWEP:Shoot() + if not SERVER then return end timer.Simple(1, function() local ent = ents.Create("d64_bfgball") ent:SetOwner(self.Owner) @@ -62,4 +63,4 @@ function SWEP:SetState(State) self:SetNWInt("NextState", 1) self:SetNWFloat("NextTime", CurTime() + 0.2) end -end \ No newline at end of file +end diff --git a/lua/weapons/d64_laser.lua b/lua/weapons/d64_laser.lua index 284ebda..0e08fce 100644 --- a/lua/weapons/d64_laser.lua +++ b/lua/weapons/d64_laser.lua @@ -46,6 +46,7 @@ function SWEP:PrimaryAttack() end function SWEP:Shoot() + if not SERVER then return end local ent = ents.Create("d64_unmakerlsr") ent:SetOwner(self.Owner) ent:SetPos(self.Owner:GetShootPos() - self.Owner:EyeAngles():Up() * 8) @@ -68,4 +69,4 @@ function SWEP:SetState(State) self:SetNWInt("NextState", 1) self:SetNWFloat("NextTime", CurTime() + 0.2) end -end \ No newline at end of file +end diff --git a/lua/weapons/d64_laserlvl3.lua b/lua/weapons/d64_laserlvl3.lua index 267a963..51e8cd7 100644 --- a/lua/weapons/d64_laserlvl3.lua +++ b/lua/weapons/d64_laserlvl3.lua @@ -9,6 +9,7 @@ SWEP.Slot = 4 SWEP.SlotPos = 6 function SWEP:Shoot() + if not SERVER then return end for i = -1, 1, 2 do local ent = ents.Create("d64_unmakerlsr") ent:SetOwner(self.Owner) diff --git a/lua/weapons/d64_laserlvl4.lua b/lua/weapons/d64_laserlvl4.lua index 2c7d526..ab72b30 100644 --- a/lua/weapons/d64_laserlvl4.lua +++ b/lua/weapons/d64_laserlvl4.lua @@ -10,6 +10,7 @@ SWEP.SlotPos = 7 local LaserOffset = 0 function SWEP:Shoot() + if not SERVER then return end LaserOffset = LaserOffset + 1 if (LaserOffset > 4) then LaserOffset = 1 diff --git a/lua/weapons/d64_plasma.lua b/lua/weapons/d64_plasma.lua index d13eb8f..68ec7ec 100644 --- a/lua/weapons/d64_plasma.lua +++ b/lua/weapons/d64_plasma.lua @@ -93,6 +93,7 @@ function SWEP:PrimaryAttack() end function SWEP:Shoot() + if not SERVER then return end local ent = ents.Create("d64_plasmaball") ent:SetOwner(self.Owner) ent:SetPos(self.Owner:GetShootPos() - self.Owner:EyeAngles():Up() * 8) @@ -122,4 +123,4 @@ function SWEP:SetState(State) self:SetNWInt("NextState", 1) self:SetNWFloat("NextTime", CurTime() + 0.1) end -end \ No newline at end of file +end diff --git a/lua/weapons/d64_rocket.lua b/lua/weapons/d64_rocket.lua index 6be34de..41bffa3 100644 --- a/lua/weapons/d64_rocket.lua +++ b/lua/weapons/d64_rocket.lua @@ -26,6 +26,7 @@ if CLIENT then end function SWEP:Shoot() + if not SERVER then return end local ent = ents.Create("d64_rocketproj") ent:SetOwner(self.Owner) ent:SetPos(self.Owner:GetShootPos() - self.Owner:EyeAngles():Up() * 8) @@ -60,4 +61,4 @@ function SWEP:SetState(State) self:SetNWInt("NextState", 1) self:SetNWFloat("NextTime", CurTime() + 0.1) end -end \ No newline at end of file +end From 671a056babc51c98ea33f0208cf51d42e69af93f Mon Sep 17 00:00:00 2001 From: Rodro555 <149922274+Rodro555@users.noreply.github.com> Date: Tue, 27 Aug 2024 01:53:24 -0300 Subject: [PATCH 2/2] Delete lua/autorun/doom64_dirty.lua --- lua/autorun/doom64_dirty.lua | 1 - 1 file changed, 1 deletion(-) delete mode 100644 lua/autorun/doom64_dirty.lua diff --git a/lua/autorun/doom64_dirty.lua b/lua/autorun/doom64_dirty.lua deleted file mode 100644 index 1ff8e07..0000000 --- a/lua/autorun/doom64_dirty.lua +++ /dev/null @@ -1 +0,0 @@ -print("test")