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
12 changes: 8 additions & 4 deletions lua/entities/d64_bfgball.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down Expand Up @@ -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()
Expand All @@ -111,4 +115,4 @@ function ENT:PhysicsCollide()
end)
end

scripted_ents.Register(ENT, "d64_bfgball")
scripted_ents.Register(ENT, "d64_bfgball")
19 changes: 15 additions & 4 deletions lua/entities/d64_plsball.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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
Expand All @@ -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()
Expand Down Expand Up @@ -77,4 +81,11 @@ function ENT:Touch(entity)
end
end

scripted_ents.Register(ENT, "d64_plasmaball")
--[[
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")
14 changes: 9 additions & 5 deletions lua/entities/d64_rocketproj.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -22,15 +23,15 @@ 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
self:Remove()
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
Expand All @@ -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")
Expand All @@ -71,4 +75,4 @@ function ENT:Touch(ent)
end
end

scripted_ents.Register(ENT, "d64_rocketproj")
scripted_ents.Register(ENT, "d64_rocketproj")
3 changes: 2 additions & 1 deletion lua/weapons/d64_bfg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -62,4 +63,4 @@ function SWEP:SetState(State)
self:SetNWInt("NextState", 1)
self:SetNWFloat("NextTime", CurTime() + 0.2)
end
end
end
3 changes: 2 additions & 1 deletion lua/weapons/d64_laser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -68,4 +69,4 @@ function SWEP:SetState(State)
self:SetNWInt("NextState", 1)
self:SetNWFloat("NextTime", CurTime() + 0.2)
end
end
end
1 change: 1 addition & 0 deletions lua/weapons/d64_laserlvl3.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions lua/weapons/d64_laserlvl4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lua/weapons/d64_plasma.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -122,4 +123,4 @@ function SWEP:SetState(State)
self:SetNWInt("NextState", 1)
self:SetNWFloat("NextTime", CurTime() + 0.1)
end
end
end
3 changes: 2 additions & 1 deletion lua/weapons/d64_rocket.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -60,4 +61,4 @@ function SWEP:SetState(State)
self:SetNWInt("NextState", 1)
self:SetNWFloat("NextTime", CurTime() + 0.1)
end
end
end