Open Spearkiller opened 3 months ago
Your title mentions FindInRadius in addition to FindInCapsule, but I can't seem to find any references to it in the description of the issue ? Did you do some tests with FindInRadius, or is it a typo in the title of the issue ? (I'm asking because I'm more familar with FindInRadius... Extremely questionable implementation, so what you describe would not surprise me that much if it applied to FindInRadius)
oop, I mustve forgotten to mention it, but yes, I tested using FindInRadius as well.
I'm making a familiar (Which, in this situation, is technically a bomb due to complications regarding TryThrow not working on familiars, but that's besides the point but feel it worth mentioning just in case that plays a part in the issue) that when thrown, destroys any projectiles that it collides with. I have been doing this with
A note that this is done in a MC_PRE_BOMB_UPDATE callback. POST_BOMB_COLLISION does not fire in this circumstance.
When testing, I found that, inexplicably, enemies would randomly die when hit by my familiar/bomb. After some further experimentation, I found that removing the v:Kill() call stopped this from happening.
Some other things I have tested/noticed:
print(v.Type)
always printed "9" into the console (EntityType.ENTITY_PROJECTILE)if v:ToProjectile() then v:Kill() end
had no effect and npcs would continue to randomly die as before.Remove()
works as expected.if v:ToProjectile() then
did not stop non-projectiles being killed.Initially I had thought this was just an issue with FindInCapsule, but further testing has left me stumped.