You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Apologies for any inconvenience, I am posting this rather for an informative reply rather than a fix per say.
I went back to playing around with an old add-on of mine when I noticed this error that started popping up anytime one of the NextBots would be killed by being blown up, it would happen.
[iv04] Cannot destroy physics in a physics callback!
1. Giv - addons/iv04/lua/entities/npc_iv04_weaponuserbase/shared.lua:67
2. unknown - addons/halo ce nextbots/lua/entities/npc_iv04_hce_marine/shared.lua:1711 (x3)
Here is the function mentioned
function ENT:Give(wep)
local wep = ents.Create(wep)
local pos = self:GetAttachment(self:LookupAttachment("anim_attachment_RH")).Pos
wep:SetOwner(self)
wep:SetPos(pos)
wep:Spawn()
wep:PhysicsInit(SOLID_NONE)
wep:SetSolid(SOLID_NONE)
wep:SetParent(self)
wep:Fire("setparentattachment", "anim_attachment_RH")
wep:AddEffects(EF_BONEMERGE)
self.Weapon = wep
end
This is line 67: wep:PhysicsInit(SOLID_NONE)
Thank you for your time, please let me know what I'm missing or doing wrong in order to fix this.
Best regards!
The text was updated successfully, but these errors were encountered:
This is not really a place to seek modding help. You can do so on the official Discord server linked in the README.
That being said, the error you are experiencing should be self explanatory - You cannot destroy physics objects (done via PhysicsInit if the entity already has a physics object) during a physics callback because that would lead to a crash.
You have to avoid doing so by delaying the physics callbacks in some way.
Hello! Apologies for any inconvenience, I am posting this rather for an informative reply rather than a fix per say.
I went back to playing around with an old add-on of mine when I noticed this error that started popping up anytime one of the NextBots would be killed by being blown up, it would happen.
Here is the function mentioned
This is line 67:
wep:PhysicsInit(SOLID_NONE)
Thank you for your time, please let me know what I'm missing or doing wrong in order to fix this.
Best regards!
The text was updated successfully, but these errors were encountered: