Bubbus / ACF-Missiles

Racked munitions for ACF
MIT License
24 stars 13 forks source link

Fuse/primer safety #42

Closed Cre8or closed 9 years ago

Cre8or commented 9 years ago

This just came to my mind, we're going to need some kind of safety for both missiles and bombs to avoid early detonation as a result to them spawning near or inside objects. It's an issue I've had with my jet's bombs before, where they would spawn too close to the wing they just came from, resulting in a fairly decent fireball.

I'm thinking an arming delay would be the simplest solution. If each round definition had a variable for this, we could adjust each of them to prevent undesired explosions while maintaining effectiveness against their respective targets. It'd also give us another balancing factor to tinker with.

Now to figure out whether this should be beta or post-beta. Bub, if you're too busy this week, I might just give this a crack since I don't have anything else to do. It'd probably take me way longer since I haven't messed with round data yet, but then again it doesn't sound like a big feat. Just seems like an important feature to me, hence why I'd like to make it happen.

Bubbus commented 9 years ago

I'll add it as a configurable value in the fuses if you put the corresponding behaviour into the missiles. Not sure if you want them to just disappear or turn into clientside debris or something. I'll provide an IsArmed() function into each fuse and you can take it from there.

(lol can't multi-assign)

Cre8or commented 9 years ago

Don't think a function will be necessary, a simple missile.IsArmed boolean would do. But like I said, a delay-before-armed variable per round definition would be nice, so we could give AAMs a shorter delay than SAMs or bombs.

As for what happens when it impacts while unarmed, I'm thinking of two scenarios:

Bubbus commented 9 years ago

Sounds good as long as it never explodes after becoming a zomby goast. I added acf_missile:Dud() along with the rest of it - dudding config in acfmenu with enforced minimum delay, hf. 06ecea85ec8762b3331755fd15657955922ea838

duds

Cre8or commented 9 years ago

To be fair, I'd rather have it as a pre-set variable that I define for each round type, thus taking the hassle of doing it in-game away.

Bubbus commented 9 years ago

Yeah, it's in there as "armdelay". Check out 06ecea85ec8762b3331755fd15657955922ea838, I put some test values into the AAMs. armdelay enforces the minimum boundary of the slider.

I made it configurable because for example, you'd want a shorter or longer fuse on bombs depending on your plane speed and bomb yield.

Bubbus commented 9 years ago

This is working and stable so I'm going to close this.