Summary
Patch for C-RAM by YouAreBamboozled
Mod ID: 611F7416D7A843BD
Works great in enfusion workbench, but a few issues i wanted to correct for use on a dedicated server.
Description
This mod resolves the following;
Double coordinate transform — the original code ran the muzzle bone matrix through CoordToParent even though GetBoneMatrix already returns world space, corrupting the aim direction.
Absolute vs relative height check — AddEntityCallback was comparing target altitude against raw AttackHeight (e.g. 20m) instead of gun Y + AttackHeight, so it was engaging targets that were barely off the ground.
Bullet spawning in local space — SpawnParams.Parent was set to the gun entity, so the bullet spawn transform was being interpreted as local to the gun instead of world space, making bullets fire from the wrong position.
Muzzle direction world space mismatch in aim check — IsAimedAtTarget was comparing a world space target vector against a local space muzzle direction, so the aim error calculation was bad and the gun was firing at the wrong time.
License
Arma Public License (APL)