From 8425166ffd9d8635f24c6c4765ec91f251b192b4 Mon Sep 17 00:00:00 2001 From: march <106459595+marchc1@users.noreply.github.com> Date: Sun, 15 Dec 2024 18:50:08 -0800 Subject: [PATCH 1/3] Try to fix x86-64 crash --- lua/acf/damage/debris_cl.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/acf/damage/debris_cl.lua b/lua/acf/damage/debris_cl.lua index b6741348..9478432c 100644 --- a/lua/acf/damage/debris_cl.lua +++ b/lua/acf/damage/debris_cl.lua @@ -57,6 +57,7 @@ local function Ignite(Entity, Lifetime, IsGib) end local function CreateDebris(Model, Position, Angles, Material, Color, Normal, Power, ShouldIgnite) + if not util.IsValidModel(Model) then return end local Debris = ents.CreateClientProp(Model) if not IsValid(Debris) then return end @@ -225,4 +226,4 @@ PrecacheParticleSystem("env_fire_small_smoke") PrecacheParticleSystem("smoke_gib_01") PrecacheParticleSystem("smoke_exhaust_01a") PrecacheParticleSystem("smoke_small_01b") -PrecacheParticleSystem("embers_medium_01") \ No newline at end of file +PrecacheParticleSystem("embers_medium_01") From 0e1fae517557b2c4dd314fc2b33a0beb8c8b1b9b Mon Sep 17 00:00:00 2001 From: march <106459595+marchc1@users.noreply.github.com> Date: Sun, 15 Dec 2024 19:07:24 -0800 Subject: [PATCH 2/3] Add TODO comment --- lua/acf/damage/debris_cl.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/acf/damage/debris_cl.lua b/lua/acf/damage/debris_cl.lua index 9478432c..a9b449fe 100644 --- a/lua/acf/damage/debris_cl.lua +++ b/lua/acf/damage/debris_cl.lua @@ -57,7 +57,9 @@ local function Ignite(Entity, Lifetime, IsGib) end local function CreateDebris(Model, Position, Angles, Material, Color, Normal, Power, ShouldIgnite) + -- TODO: This fixes a crashing bug, but the underlying issue that Model can sometimes be blank ("") isn't fixed yet if not util.IsValidModel(Model) then return end + local Debris = ents.CreateClientProp(Model) if not IsValid(Debris) then return end From 42598e2d1438b49c9a92a5e2cfbc9a1a061dd942 Mon Sep 17 00:00:00 2001 From: march <106459595+marchc1@users.noreply.github.com> Date: Sun, 15 Dec 2024 19:57:39 -0800 Subject: [PATCH 3/3] No more trailing whitespace --- lua/acf/damage/debris_cl.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/acf/damage/debris_cl.lua b/lua/acf/damage/debris_cl.lua index a9b449fe..969db115 100644 --- a/lua/acf/damage/debris_cl.lua +++ b/lua/acf/damage/debris_cl.lua @@ -59,7 +59,7 @@ end local function CreateDebris(Model, Position, Angles, Material, Color, Normal, Power, ShouldIgnite) -- TODO: This fixes a crashing bug, but the underlying issue that Model can sometimes be blank ("") isn't fixed yet if not util.IsValidModel(Model) then return end - + local Debris = ents.CreateClientProp(Model) if not IsValid(Debris) then return end