Add - Iron dome for defending against projectiles#10038
Closed
TheCandianVendingMachine wants to merge 287 commits intomasterfrom
Closed
Add - Iron dome for defending against projectiles#10038TheCandianVendingMachine wants to merge 287 commits intomasterfrom
TheCandianVendingMachine wants to merge 287 commits intomasterfrom
Conversation
13 tasks
rautamiekka
suggested changes
May 28, 2024
| @@ -0,0 +1,7 @@ | |||
| #include "script_component.hpp" | |||
|
|
|||
| if (isServer && { GVAR(enable) }) then { | |||
Contributor
There was a problem hiding this comment.
A boolean check is too cheap for lazy eval.
I just tested that without lazy eval (isServer && true) it takes 0.0011ms - 0.0027ms, whereas with lazy eval (isServer && {true}) it always takes at least 0.0015ms (most of the time), sometimes up to 0.0045ms.
Suggested change
| if (isServer && { GVAR(enable) }) then { | |
| if (isServer && GVAR(enable)) then { |
|
|
||
| GVAR(interceptors) = []; | ||
| // Put these into hash table to avoid massive amounts of loops | ||
| GVAR(toBeShot) = call CBA_fnc_hashCreate; |
Contributor
There was a problem hiding this comment.
HashMaps are in vanilla already, though.
Member
|
Iron Dome fires two missiles per threat. Why not a CBA state machine? |
Contributor
Author
|
closing in favour of #10965 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When merged this pull request will:
Missiles will automatically track threats and kill them when they enter a "defend" radius. The missiles are managed by a "commander" state machine, and only one missile will be assigned to each threat.
The API is kinda shitty, and I would like feedback on how to improve.
I hate that I separated this PR after the recent political situation, but it is a cool system for ARMA missions
Merge Strategy
Follow #10019
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}.