-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frag - Rewrite #9728
base: master
Are you sure you want to change the base?
Frag - Rewrite #9728
Conversation
…road for munitions
…er surfaces hit afterwards
…ages are a bit clearer
Alright, I need to stress test multiplayer events to see if there needs to be a cooldown period per client request sent considering this PR should see that some rounds (i.e., 30mm HE cannons from the A-10D) can fragment. But the initial version works in multiplayer, with all simulation types. I plan to spin off the event handlers and debug functions into a single separate PR and maybe the spalling changes as well since I feel there's more than a week or two of work left on this and I don't want to delay a transition away from the current custom PFH system. I'll make a few more posts in the coming days or weeks. |
Sorry about all the errors. I'll reinstall pboProject tomorrow and fix them before my next push. The removal of all the init event handlers left some holes I should've noticed, but I guess I need something to hold my hand through it. |
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
… I believe everything should be fine wrt pboProject now.
I'm unsure about what the issue is this time. It works on my side, and pboProject is spitting out a line that is from an older commit unless I missed something it should already be fixed. It may be the order it was merged in I guess. |
Hey, I've started the process of breaking this down into some more manageable PRs (also ones that don't rely on waiting on me to finish the Frag compats), So far I've split a large chunk into just addressing the event handlers, debug, and caching functions here: #10157, but I will also take the changes to spalling to their own PR in the coming week. |
* Capitalized config entries * fixed example syntax * fixed call syntax * alphabetized PREP instead of categorizing it * Really obvious isNull instead of isEqualTo Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Fixed array of double spaced format errors * renamed files to fit proper format * fixed more spacing issues * formatting * Fixed debug mode init, a few things pointed out by johnb432 that I was dumb not to do * formatting * Updated type checks in line with recommendation from johnb432 * fixed comment to properly state variable purpose * Comments fixed * slight performance increase using forEach loops Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Small optimization to optimize config lookup quick testing shows a whole 600ns increase in Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * avoid mismatch sides when debugging frags with unconcious or captive shooters Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * removed return of sphere object, not required or useful. * fixed a loop that got caught in the merge crossfire * Optimized approach to classifying blacklist type Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Implemented changes discussed here #9728 (comment) * Config lookup optimization mentioned by johnb432 here: #9728 (comment) * white space/formatting changes * removed old parameter changed in f28d5d2 * compacted text a bit * formatting whitespace * Grammatical erros * Changes as discussed here #9728 (comment) * Few quick optimizations of == to isEqualTo * Debug updated to be easier to control * Changed how spall hold off is calculated to avoid repeated unneeded computations * clarified a hold off variable * Better approach to ACE_FRAG_RM_EH macro * Git rid of superfulous stringtable entries Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * unneeded parens Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Clarified arguments Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * getposATL to getPosATL Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/frag/functions/fnc_dev_addRound.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Function header changes Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * another great isNotEqualTo opportunity Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * formatting changes Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * unneeded parens Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Declared _ammoInfo twice * optimized around checking if systems are active and moved debug arguments to an ifdef * Removed white space from removing an if statement in a previous commit * Removed superfulous parenthese Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * clarified function description and removed unneeded comments * Moved "isServer" check to initRound function * #9728 (comment) * changed params statement, function header, and propigated doFrag argument changes * capitization from cfg to Cfg in config lookups * changed default arguments, check isKindOf to "CAManBase" * Updated function headers * white space and define placement changes * removed 2 argument option and removed some defaults * removed spurious commas * removed unused debug GVAR * Switched debug clear traces from addAction to ACE self interact * variable names weren't verbose enough * Mactched format #9728 (comment) * Updated debug settings * Shot parent possible fix #1 * Removed extra text from CfgAmmoFragParameters * Makes sure spall power square root is positive and also we don't produce fragments when for some reason the round accelerates. * white space for clarity Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Optimize dev_hitbox deleting Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * saving people from their own bad testing setup * Since the functions always exist, I guess these variables should too * Fixe bad search function * optimization, see #9728 (comment) * changed SPG-9 Fragments * removed unneeded toLower * Changed case output to match config * Increased relative chance to hit torso/pelvis when fragemnt should hit. * Removed double space * updated some round types * Added commented 2.18 commands and updated script component * added print incomplete only option to fnc_debugAmmo * removed all spaces from macros * removd unneeded define * a Brett (HEMTT) suggested change I miss * Apply suggestions from code review Small formatting changes and small errors Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Removed doublespace Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/frag/functions/fnc_dev_addRound.sqf If the round isn't in the hashmap anymore, we have to stop the PFH. Brought code up to same standard as used in FUNC(dev_trackObj). - johnb432 Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/frag/functions/fnc_dev_drawTrace.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * variable name changes * magic number clean up and white space * white space, function headers and variable names * small Should spall optimization Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Removed blacklist functions and settings * reformatted function headers, removed value type checking, and changed lazy eval. * fixed missing underscore in change from review * function header, lazy eval, and params list simplifications * function header and variable name readability * changed defaults to make them more clear they're just a default value * Updated wiki to be clearer in a few areas, and add some other information I've found working on this * added MP debug compatability * Possible shouldFrag legibility improvement * added changes to stringtable * Grammar sweep on the wiki, and added some clarifications to config values * optimized dev_trackHitbox and made variables more explicit * Cleaned up documentation and documentation * reorganized postInit CBA_settingInitialized EH * missing underscore in fnc_dev_trackObj Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * stopped adding unneeded extra points Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * cleaned un-updated stringtable entries * reworked some function headers and deleted whitespace in doFragTargeted * Removed outdated code * Formatting and header fixes * Ignore curators and spectators * Made clear traces global again, added interaction condition * Change stringtable entries * Removed unused stringtable entries & fixed hitbox description * Small coding standard changes (missing semicolons on non-return values, extra parenthesis) * Changed sphere size and added return based on usage in dev_trackHitBox * removed "_lo" random fragment entries as they are unused * doFragRandom was always being called and spawning at least 5 fragments even when the fragment budget of 50 was reached. Fixed variable name (AGL instead of ATL). * removed unnceassary "disableCollisionWith" * Clarified trace statements and corrected format and spelling * Do spall exits for time 90% of the time (round hits multiple walls) and should exit on "hitting ground since no spalling is generated * Fixed ordering in which frag hold off variables are set to not skip when unneeded * initRound ordering and fixed define names * Fixed function header * reformatted comments and some v2.18 remakrs comments * Removed unneeded ground offset * Expanded TRACE * Fix typo * Moved event to preInit * Updated default fallback frag distance to be less extreme and changed fixed a magic number * Randomized random frag directions * removed some magic numbers, and cached numbers from shouldSpall * removed magic numbers and cached values preemptively (normally spallInfoCache is called later, but we pull the right config parameters so we might as well store them) * Unify example formatting Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * cleaned up function examples * removed excess square brackets * Final function example reformat * Update addons/frag/script_component.hpp * Corrected docs * Use `getOrDefaultCall` * Removed unused classes, redefined using macros to minimize error and make review easier * updated debugging output and fixed velocity error * Reformatted for legibility and debug output * caught calc error while answer johnb's question * Almost finished with compats and I had some changes to align vanilla as well * Missed variable when updating * Added unneeded class details to make PBOproject happy * Forgot to update doFragRandom docs with previous changes * and the debug context * Readd blacklist * Fixed an issue with fragments being created above water for explosions below the surface * Exposed projectile event handlers for both blacklist use and other shenanigans. * Revert "Exposed projectile event handlers for both blacklist use and other shenanigans." This reverts commit eaff498. * added debug information and folded if statements * fixed error (if statement with no argument) * Only send blacklist updates to the server * Added default fragCount fallback value based on current ACE frag range calculation * Converted all positions for doFrag to AGL since we're converting to that now * removed feet hitpoints & tightened multishot submunitions. Feet hitpoitns aren't used since calculation for trajectory doesn't account for drag, fragments aimed at feet won't hit * Merge branch 'acemod:master' into master * Revert to 60a0dae, merge conflict wasn't resolved properly * Removed event handlers * Changed blacklist to acting on local projectiles to match initial performance * added fired EH and moved projectile tracking to be local to projectile * updated initialization and should frag to check for submunitions since we no longer rely on init EH * Fixed calls for shouldFrag and got rid of old initRound.sfq (maybe back after 2.18) * fixed small mistakes in names and function calls * fixed frame offset to avoid hitting dead targets * Fixed config path in shouldFrag * Didn't know that PBO project needed trailing {} on class inheritance structures * fixed more useless trailing {} * Initial rollback to old frag simulation and spalling simulation. Updated spall to function and helpter functions as well * missed comma * remove fragCount from config * made addBlackList remove projectile EHs * updated config path to be relevant to post-EH version * All spalling in current version is local * updated search pattern to one discussed in PR #9728 * updated defines to match implementation * removed commented out debug information from nouber * removed magic numbers and code with no effect * removed more magic numbers * unfucked a comma * fixed debug def names * updated documentation * changed debug colors * mass must be in grams in this version I guess * fixed errors in frag with downgrade * fixed timing and other spall issues * updated some defne names and usages * increased code legiblity and optimized some randomizations * clarified parts of the spall event chain * Optimized loop to find spall position using larger steps and fewer operations per loop * fixed small errors * removed unused variables & EHs and set defaults in the case debug mode draw isn't used * removed "class eventhandler" references * removed _fragCount reference in newly backported debug functions * fragmenting projectile velocity isn't used anywhere * removed unused variables, implemented fixes from full rewrite PR, and fixed math errors * added debug draw mode to DEBUG_ENABLED_FRAG define check * fix documentation to make units clear on metal and filler quanities * command capitalization * added target point debug spheres * fixed target sphere visability * Jank fix so that the unit firing can get hit with it's own fragments * accidentally committed script_component.hpp w/ debug enabled * Alternative way to address shot parent self-harm issue * missed comma, going to bed, sorry * add newline and fix blacklist * legability formatting * removed extra newlines and double spaces * Updated function documentation * Removed unused stringtable items * Debug sphere conditional was missing in frago * Added class blacklisting functionality * Converted addBlacklist function to be public * fixed glaring error * Reformatted to be more concise and added argument defaults. * Deleted one sentence too many * Fixed info macro usage * Forgot to consider someone might have explosion reflections on but not fragmentation * Fix some post merge errors * missed a few more merge errors * renamed classBlacklist function --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
* Really obvious isNull instead of isEqualTo Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Fixed array of double spaced format errors * renamed files to fit proper format * fixed more spacing issues * formatting * Fixed debug mode init, a few things pointed out by johnb432 that I was dumb not to do * formatting * Updated type checks in line with recommendation from johnb432 * fixed comment to properly state variable purpose * Comments fixed * slight performance increase using forEach loops Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Small optimization to optimize config lookup quick testing shows a whole 600ns increase in Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * avoid mismatch sides when debugging frags with unconcious or captive shooters Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * removed return of sphere object, not required or useful. * fixed a loop that got caught in the merge crossfire * Optimized approach to classifying blacklist type Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Implemented changes discussed here #9728 (comment) * Config lookup optimization mentioned by johnb432 here: #9728 (comment) * white space/formatting changes * removed old parameter changed in f28d5d2 * compacted text a bit * formatting whitespace * Grammatical erros * Changes as discussed here #9728 (comment) * Few quick optimizations of == to isEqualTo * Debug updated to be easier to control * Changed how spall hold off is calculated to avoid repeated unneeded computations * clarified a hold off variable * Better approach to ACE_FRAG_RM_EH macro * Git rid of superfulous stringtable entries Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * unneeded parens Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Clarified arguments Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * getposATL to getPosATL Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/frag/functions/fnc_dev_addRound.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Function header changes Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * another great isNotEqualTo opportunity Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * formatting changes Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * unneeded parens Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Declared _ammoInfo twice * optimized around checking if systems are active and moved debug arguments to an ifdef * Removed white space from removing an if statement in a previous commit * Removed superfulous parenthese Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * clarified function description and removed unneeded comments * Moved "isServer" check to initRound function * #9728 (comment) * changed params statement, function header, and propigated doFrag argument changes * capitization from cfg to Cfg in config lookups * changed default arguments, check isKindOf to "CAManBase" * Updated function headers * white space and define placement changes * removed 2 argument option and removed some defaults * removed spurious commas * removed unused debug GVAR * Switched debug clear traces from addAction to ACE self interact * variable names weren't verbose enough * Mactched format #9728 (comment) * Updated debug settings * Shot parent possible fix #1 * Removed extra text from CfgAmmoFragParameters * Makes sure spall power square root is positive and also we don't produce fragments when for some reason the round accelerates. * white space for clarity Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Optimize dev_hitbox deleting Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * saving people from their own bad testing setup * Since the functions always exist, I guess these variables should too * Fixe bad search function * optimization, see #9728 (comment) * changed SPG-9 Fragments * removed unneeded toLower * Changed case output to match config * Increased relative chance to hit torso/pelvis when fragemnt should hit. * Removed double space * updated some round types * Added commented 2.18 commands and updated script component * added print incomplete only option to fnc_debugAmmo * removed all spaces from macros * removd unneeded define * a Brett (HEMTT) suggested change I miss * Apply suggestions from code review Small formatting changes and small errors Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Removed doublespace Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/frag/functions/fnc_dev_addRound.sqf If the round isn't in the hashmap anymore, we have to stop the PFH. Brought code up to same standard as used in FUNC(dev_trackObj). - johnb432 Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/frag/functions/fnc_dev_drawTrace.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * variable name changes * magic number clean up and white space * white space, function headers and variable names * small Should spall optimization Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Removed blacklist functions and settings * reformatted function headers, removed value type checking, and changed lazy eval. * fixed missing underscore in change from review * function header, lazy eval, and params list simplifications * function header and variable name readability * changed defaults to make them more clear they're just a default value * Updated wiki to be clearer in a few areas, and add some other information I've found working on this * added MP debug compatability * Possible shouldFrag legibility improvement * added changes to stringtable * Grammar sweep on the wiki, and added some clarifications to config values * optimized dev_trackHitbox and made variables more explicit * Cleaned up documentation and documentation * reorganized postInit CBA_settingInitialized EH * missing underscore in fnc_dev_trackObj Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * stopped adding unneeded extra points Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * cleaned un-updated stringtable entries * reworked some function headers and deleted whitespace in doFragTargeted * Removed outdated code * Formatting and header fixes * Ignore curators and spectators * Made clear traces global again, added interaction condition * Change stringtable entries * Removed unused stringtable entries & fixed hitbox description * Small coding standard changes (missing semicolons on non-return values, extra parenthesis) * Changed sphere size and added return based on usage in dev_trackHitBox * removed "_lo" random fragment entries as they are unused * doFragRandom was always being called and spawning at least 5 fragments even when the fragment budget of 50 was reached. Fixed variable name (AGL instead of ATL). * removed unnceassary "disableCollisionWith" * Clarified trace statements and corrected format and spelling * Do spall exits for time 90% of the time (round hits multiple walls) and should exit on "hitting ground since no spalling is generated * Fixed ordering in which frag hold off variables are set to not skip when unneeded * initRound ordering and fixed define names * Fixed function header * reformatted comments and some v2.18 remakrs comments * Removed unneeded ground offset * Expanded TRACE * Fix typo * Moved event to preInit * Updated default fallback frag distance to be less extreme and changed fixed a magic number * Randomized random frag directions * removed some magic numbers, and cached numbers from shouldSpall * removed magic numbers and cached values preemptively (normally spallInfoCache is called later, but we pull the right config parameters so we might as well store them) * Unify example formatting Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * cleaned up function examples * removed excess square brackets * Final function example reformat * Update addons/frag/script_component.hpp * Corrected docs * Use `getOrDefaultCall` * Removed unused classes, redefined using macros to minimize error and make review easier * updated debugging output and fixed velocity error * Reformatted for legibility and debug output * caught calc error while answer johnb's question * Almost finished with compats and I had some changes to align vanilla as well * Missed variable when updating * Added unneeded class details to make PBOproject happy * Forgot to update doFragRandom docs with previous changes * and the debug context * Readd blacklist * Fixed an issue with fragments being created above water for explosions below the surface * Exposed projectile event handlers for both blacklist use and other shenanigans. * Revert "Exposed projectile event handlers for both blacklist use and other shenanigans." This reverts commit eaff498. * added debug information and folded if statements * fixed error (if statement with no argument) * Only send blacklist updates to the server * Added default fragCount fallback value based on current ACE frag range calculation * Converted all positions for doFrag to AGL since we're converting to that now * removed feet hitpoints & tightened multishot submunitions. Feet hitpoitns aren't used since calculation for trajectory doesn't account for drag, fragments aimed at feet won't hit * Merge branch 'acemod:master' into master * Revert to 60a0dae, merge conflict wasn't resolved properly * Removed event handlers * Changed blacklist to acting on local projectiles to match initial performance * added fired EH and moved projectile tracking to be local to projectile * updated initialization and should frag to check for submunitions since we no longer rely on init EH * Fixed calls for shouldFrag and got rid of old initRound.sfq (maybe back after 2.18) * fixed small mistakes in names and function calls * fixed frame offset to avoid hitting dead targets * Fixed config path in shouldFrag * Didn't know that PBO project needed trailing {} on class inheritance structures * fixed more useless trailing {} * Initial rollback to old frag simulation and spalling simulation. Updated spall to function and helpter functions as well * missed comma * remove fragCount from config * made addBlackList remove projectile EHs * updated config path to be relevant to post-EH version * All spalling in current version is local * updated search pattern to one discussed in PR #9728 * updated defines to match implementation * removed commented out debug information from nouber * removed magic numbers and code with no effect * removed more magic numbers * unfucked a comma * fixed debug def names * updated documentation * changed debug colors * mass must be in grams in this version I guess * fixed errors in frag with downgrade * fixed timing and other spall issues * updated some defne names and usages * increased code legiblity and optimized some randomizations * clarified parts of the spall event chain * Optimized loop to find spall position using larger steps and fewer operations per loop * fixed small errors * removed unused variables & EHs and set defaults in the case debug mode draw isn't used * removed "class eventhandler" references * removed _fragCount reference in newly backported debug functions * fragmenting projectile velocity isn't used anywhere * removed unused variables, implemented fixes from full rewrite PR, and fixed math errors * added debug draw mode to DEBUG_ENABLED_FRAG define check * fix documentation to make units clear on metal and filler quanities * command capitalization * added target point debug spheres * fixed target sphere visability * Jank fix so that the unit firing can get hit with it's own fragments * accidentally committed script_component.hpp w/ debug enabled * Alternative way to address shot parent self-harm issue * missed comma, going to bed, sorry * add newline and fix blacklist * legability formatting * removed extra newlines and double spaces * Updated function documentation * Removed unused stringtable items * Debug sphere conditional was missing in frago * Added class blacklisting functionality * Converted addBlacklist function to be public * fixed glaring error * Reformatted to be more concise and added argument defaults. * Deleted one sentence too many * Fixed info macro usage * Forgot to consider someone might have explosion reflections on but not fragmentation * Fix some post merge errors * missed a few more merge errors * renamed classBlacklist function * removed semicolons from a function return * Removed occurenes of doubled up lines * Somehow still missed one --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
The current merge will take a bit of time (limited free time and complexity), but I believe the compats are almost caught up. I'll post when the compats are ready. |
* removed old parameter changed in f28d5d2 * compacted text a bit * formatting whitespace * Grammatical erros * Changes as discussed here #9728 (comment) * Few quick optimizations of == to isEqualTo * Debug updated to be easier to control * Changed how spall hold off is calculated to avoid repeated unneeded computations * clarified a hold off variable * Better approach to ACE_FRAG_RM_EH macro * Git rid of superfulous stringtable entries Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * unneeded parens Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Clarified arguments Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * getposATL to getPosATL Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/frag/functions/fnc_dev_addRound.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Function header changes Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * another great isNotEqualTo opportunity Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * formatting changes Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * unneeded parens Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Declared _ammoInfo twice * optimized around checking if systems are active and moved debug arguments to an ifdef * Removed white space from removing an if statement in a previous commit * Removed superfulous parenthese Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * clarified function description and removed unneeded comments * Moved "isServer" check to initRound function * #9728 (comment) * changed params statement, function header, and propigated doFrag argument changes * capitization from cfg to Cfg in config lookups * changed default arguments, check isKindOf to "CAManBase" * Updated function headers * white space and define placement changes * removed 2 argument option and removed some defaults * removed spurious commas * removed unused debug GVAR * Switched debug clear traces from addAction to ACE self interact * variable names weren't verbose enough * Mactched format #9728 (comment) * Updated debug settings * Shot parent possible fix #1 * Removed extra text from CfgAmmoFragParameters * Makes sure spall power square root is positive and also we don't produce fragments when for some reason the round accelerates. * white space for clarity Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Optimize dev_hitbox deleting Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * saving people from their own bad testing setup * Since the functions always exist, I guess these variables should too * Fixe bad search function * optimization, see #9728 (comment) * changed SPG-9 Fragments * removed unneeded toLower * Changed case output to match config * Increased relative chance to hit torso/pelvis when fragemnt should hit. * Removed double space * updated some round types * Added commented 2.18 commands and updated script component * added print incomplete only option to fnc_debugAmmo * removed all spaces from macros * removd unneeded define * a Brett (HEMTT) suggested change I miss * Apply suggestions from code review Small formatting changes and small errors Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Removed doublespace Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/frag/functions/fnc_dev_addRound.sqf If the round isn't in the hashmap anymore, we have to stop the PFH. Brought code up to same standard as used in FUNC(dev_trackObj). - johnb432 Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/frag/functions/fnc_dev_drawTrace.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * variable name changes * magic number clean up and white space * white space, function headers and variable names * small Should spall optimization Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Removed blacklist functions and settings * reformatted function headers, removed value type checking, and changed lazy eval. * fixed missing underscore in change from review * function header, lazy eval, and params list simplifications * function header and variable name readability * changed defaults to make them more clear they're just a default value * Updated wiki to be clearer in a few areas, and add some other information I've found working on this * added MP debug compatability * Possible shouldFrag legibility improvement * added changes to stringtable * Grammar sweep on the wiki, and added some clarifications to config values * optimized dev_trackHitbox and made variables more explicit * Cleaned up documentation and documentation * reorganized postInit CBA_settingInitialized EH * missing underscore in fnc_dev_trackObj Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * stopped adding unneeded extra points Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * cleaned un-updated stringtable entries * reworked some function headers and deleted whitespace in doFragTargeted * Removed outdated code * Formatting and header fixes * Ignore curators and spectators * Made clear traces global again, added interaction condition * Change stringtable entries * Removed unused stringtable entries & fixed hitbox description * Small coding standard changes (missing semicolons on non-return values, extra parenthesis) * Changed sphere size and added return based on usage in dev_trackHitBox * removed "_lo" random fragment entries as they are unused * doFragRandom was always being called and spawning at least 5 fragments even when the fragment budget of 50 was reached. Fixed variable name (AGL instead of ATL). * removed unnceassary "disableCollisionWith" * Clarified trace statements and corrected format and spelling * Do spall exits for time 90% of the time (round hits multiple walls) and should exit on "hitting ground since no spalling is generated * Fixed ordering in which frag hold off variables are set to not skip when unneeded * initRound ordering and fixed define names * Fixed function header * reformatted comments and some v2.18 remakrs comments * Removed unneeded ground offset * Expanded TRACE * Fix typo * Moved event to preInit * Updated default fallback frag distance to be less extreme and changed fixed a magic number * Randomized random frag directions * removed some magic numbers, and cached numbers from shouldSpall * removed magic numbers and cached values preemptively (normally spallInfoCache is called later, but we pull the right config parameters so we might as well store them) * Unify example formatting Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * cleaned up function examples * removed excess square brackets * Final function example reformat * Update addons/frag/script_component.hpp * Corrected docs * Use `getOrDefaultCall` * Removed unused classes, redefined using macros to minimize error and make review easier * updated debugging output and fixed velocity error * Reformatted for legibility and debug output * caught calc error while answer johnb's question * Almost finished with compats and I had some changes to align vanilla as well * Missed variable when updating * Added unneeded class details to make PBOproject happy * Forgot to update doFragRandom docs with previous changes * and the debug context * Readd blacklist * Fixed an issue with fragments being created above water for explosions below the surface * Exposed projectile event handlers for both blacklist use and other shenanigans. * Revert "Exposed projectile event handlers for both blacklist use and other shenanigans." This reverts commit eaff498. * added debug information and folded if statements * fixed error (if statement with no argument) * Only send blacklist updates to the server * Added default fragCount fallback value based on current ACE frag range calculation * Converted all positions for doFrag to AGL since we're converting to that now * removed feet hitpoints & tightened multishot submunitions. Feet hitpoitns aren't used since calculation for trajectory doesn't account for drag, fragments aimed at feet won't hit * Merge branch 'acemod:master' into master * Revert to 60a0dae, merge conflict wasn't resolved properly * Removed event handlers * Changed blacklist to acting on local projectiles to match initial performance * added fired EH and moved projectile tracking to be local to projectile * updated initialization and should frag to check for submunitions since we no longer rely on init EH * Fixed calls for shouldFrag and got rid of old initRound.sfq (maybe back after 2.18) * fixed small mistakes in names and function calls * fixed frame offset to avoid hitting dead targets * Fixed config path in shouldFrag * Didn't know that PBO project needed trailing {} on class inheritance structures * fixed more useless trailing {} * Initial rollback to old frag simulation and spalling simulation. Updated spall to function and helpter functions as well * missed comma * remove fragCount from config * made addBlackList remove projectile EHs * updated config path to be relevant to post-EH version * All spalling in current version is local * updated search pattern to one discussed in PR #9728 * updated defines to match implementation * removed commented out debug information from nouber * removed magic numbers and code with no effect * removed more magic numbers * unfucked a comma * fixed debug def names * updated documentation * changed debug colors * mass must be in grams in this version I guess * fixed errors in frag with downgrade * fixed timing and other spall issues * updated some defne names and usages * increased code legiblity and optimized some randomizations * clarified parts of the spall event chain * Optimized loop to find spall position using larger steps and fewer operations per loop * fixed small errors * removed unused variables & EHs and set defaults in the case debug mode draw isn't used * removed "class eventhandler" references * removed _fragCount reference in newly backported debug functions * fragmenting projectile velocity isn't used anywhere * removed unused variables, implemented fixes from full rewrite PR, and fixed math errors * added debug draw mode to DEBUG_ENABLED_FRAG define check * fix documentation to make units clear on metal and filler quanities * command capitalization * added target point debug spheres * fixed target sphere visability * Jank fix so that the unit firing can get hit with it's own fragments * accidentally committed script_component.hpp w/ debug enabled * Alternative way to address shot parent self-harm issue * missed comma, going to bed, sorry * add newline and fix blacklist * legability formatting * removed extra newlines and double spaces * Updated function documentation * Removed unused stringtable items * Debug sphere conditional was missing in frago * Completed suggested changed by johnb432 * restored 40mm grenade fragmentation * Apply suggestions from code review Fixed a number of config errors Co-authored-by: PabstMirror <pabstmirror@gmail.com> * Fixed firefist inheritance and order of 125mm shell * Wrong order on reflections variables, but it's not like anyone uses that * Added projectile locality * Added proper projectile locality checks * left some locality debug text * This isn't worthy of a warning as most of the time _objectHit is null is due to the projectile hitting the ground * Removed a newlines for code brackets in arrays * updated debug functions with some minor optimizations * Apply suggestions from code review Grammar and spelling corrections Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com> * didn't consider someone might use explosion reflections but not frag * addressed future arma v2.18 changes more aptly * Fixed authors line on fired function. Used to make sense different when it was an init function based on ammunition extended eventhandlers, missed the revert. * switch all hash fallbacks to getOrDefaultCall and turned default fragments array into a define * Transitioned frag system from fired to ace explode event system * decreased chance to hit / fragment inaccuracy. * fixing setShotParents only sometimes setting first argument, not instigator * cleanup * Slight optimization of "_vecVar" calculation * removed dev_addRound function * Command changes for Arma 2.18 * Fixed debug setting changes * missed exit condition * removed shot parents due to local creation of spall * simplified comment * Adjusted whitespace for readability * Reformatted comments per Johnb432's suggestions Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * one more indent fix --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> Co-authored-by: PabstMirror <pabstmirror@gmail.com> Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
* removed old parameter changed in f28d5d2 * compacted text a bit * formatting whitespace * Grammatical erros * Changes as discussed here #9728 (comment) * Few quick optimizations of == to isEqualTo * Debug updated to be easier to control * Changed how spall hold off is calculated to avoid repeated unneeded computations * clarified a hold off variable * Better approach to ACE_FRAG_RM_EH macro * Git rid of superfulous stringtable entries Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * unneeded parens Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Clarified arguments Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * getposATL to getPosATL Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/frag/functions/fnc_dev_addRound.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Function header changes Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * another great isNotEqualTo opportunity Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * formatting changes Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * unneeded parens Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Declared _ammoInfo twice * optimized around checking if systems are active and moved debug arguments to an ifdef * Removed white space from removing an if statement in a previous commit * Removed superfulous parenthese Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * clarified function description and removed unneeded comments * Moved "isServer" check to initRound function * #9728 (comment) * changed params statement, function header, and propigated doFrag argument changes * capitization from cfg to Cfg in config lookups * changed default arguments, check isKindOf to "CAManBase" * Updated function headers * white space and define placement changes * removed 2 argument option and removed some defaults * removed spurious commas * removed unused debug GVAR * Switched debug clear traces from addAction to ACE self interact * variable names weren't verbose enough * Mactched format #9728 (comment) * Updated debug settings * Shot parent possible fix #1 * Removed extra text from CfgAmmoFragParameters * Makes sure spall power square root is positive and also we don't produce fragments when for some reason the round accelerates. * white space for clarity Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Optimize dev_hitbox deleting Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * saving people from their own bad testing setup * Since the functions always exist, I guess these variables should too * Fixe bad search function * optimization, see #9728 (comment) * changed SPG-9 Fragments * removed unneeded toLower * Changed case output to match config * Increased relative chance to hit torso/pelvis when fragemnt should hit. * Removed double space * updated some round types * Added commented 2.18 commands and updated script component * added print incomplete only option to fnc_debugAmmo * removed all spaces from macros * removd unneeded define * a Brett (HEMTT) suggested change I miss * Apply suggestions from code review Small formatting changes and small errors Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Removed doublespace Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/frag/functions/fnc_dev_addRound.sqf If the round isn't in the hashmap anymore, we have to stop the PFH. Brought code up to same standard as used in FUNC(dev_trackObj). - johnb432 Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/frag/functions/fnc_dev_drawTrace.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * variable name changes * magic number clean up and white space * white space, function headers and variable names * small Should spall optimization Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Removed blacklist functions and settings * reformatted function headers, removed value type checking, and changed lazy eval. * fixed missing underscore in change from review * function header, lazy eval, and params list simplifications * function header and variable name readability * changed defaults to make them more clear they're just a default value * Updated wiki to be clearer in a few areas, and add some other information I've found working on this * added MP debug compatability * Possible shouldFrag legibility improvement * added changes to stringtable * Grammar sweep on the wiki, and added some clarifications to config values * optimized dev_trackHitbox and made variables more explicit * Cleaned up documentation and documentation * reorganized postInit CBA_settingInitialized EH * missing underscore in fnc_dev_trackObj Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * stopped adding unneeded extra points Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * cleaned un-updated stringtable entries * reworked some function headers and deleted whitespace in doFragTargeted * Removed outdated code * Formatting and header fixes * Ignore curators and spectators * Made clear traces global again, added interaction condition * Change stringtable entries * Removed unused stringtable entries & fixed hitbox description * Small coding standard changes (missing semicolons on non-return values, extra parenthesis) * Changed sphere size and added return based on usage in dev_trackHitBox * removed "_lo" random fragment entries as they are unused * doFragRandom was always being called and spawning at least 5 fragments even when the fragment budget of 50 was reached. Fixed variable name (AGL instead of ATL). * removed unnceassary "disableCollisionWith" * Clarified trace statements and corrected format and spelling * Do spall exits for time 90% of the time (round hits multiple walls) and should exit on "hitting ground since no spalling is generated * Fixed ordering in which frag hold off variables are set to not skip when unneeded * initRound ordering and fixed define names * Fixed function header * reformatted comments and some v2.18 remakrs comments * Removed unneeded ground offset * Expanded TRACE * Fix typo * Moved event to preInit * Updated default fallback frag distance to be less extreme and changed fixed a magic number * Randomized random frag directions * removed some magic numbers, and cached numbers from shouldSpall * removed magic numbers and cached values preemptively (normally spallInfoCache is called later, but we pull the right config parameters so we might as well store them) * Unify example formatting Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * cleaned up function examples * removed excess square brackets * Final function example reformat * Update addons/frag/script_component.hpp * Corrected docs * Use `getOrDefaultCall` * Removed unused classes, redefined using macros to minimize error and make review easier * updated debugging output and fixed velocity error * Reformatted for legibility and debug output * caught calc error while answer johnb's question * Almost finished with compats and I had some changes to align vanilla as well * Missed variable when updating * Added unneeded class details to make PBOproject happy * Forgot to update doFragRandom docs with previous changes * and the debug context * Readd blacklist * Fixed an issue with fragments being created above water for explosions below the surface * Exposed projectile event handlers for both blacklist use and other shenanigans. * Revert "Exposed projectile event handlers for both blacklist use and other shenanigans." This reverts commit eaff498. * added debug information and folded if statements * fixed error (if statement with no argument) * Only send blacklist updates to the server * Added default fragCount fallback value based on current ACE frag range calculation * Converted all positions for doFrag to AGL since we're converting to that now * removed feet hitpoints & tightened multishot submunitions. Feet hitpoitns aren't used since calculation for trajectory doesn't account for drag, fragments aimed at feet won't hit * Merge branch 'acemod:master' into master * Revert to 60a0dae, merge conflict wasn't resolved properly * Removed event handlers * Changed blacklist to acting on local projectiles to match initial performance * added fired EH and moved projectile tracking to be local to projectile * updated initialization and should frag to check for submunitions since we no longer rely on init EH * Fixed calls for shouldFrag and got rid of old initRound.sfq (maybe back after 2.18) * fixed small mistakes in names and function calls * fixed frame offset to avoid hitting dead targets * Fixed config path in shouldFrag * Didn't know that PBO project needed trailing {} on class inheritance structures * fixed more useless trailing {} * Initial rollback to old frag simulation and spalling simulation. Updated spall to function and helpter functions as well * missed comma * remove fragCount from config * made addBlackList remove projectile EHs * updated config path to be relevant to post-EH version * All spalling in current version is local * updated search pattern to one discussed in PR #9728 * updated defines to match implementation * removed commented out debug information from nouber * removed magic numbers and code with no effect * removed more magic numbers * unfucked a comma * fixed debug def names * updated documentation * changed debug colors * mass must be in grams in this version I guess * fixed errors in frag with downgrade * fixed timing and other spall issues * updated some defne names and usages * increased code legiblity and optimized some randomizations * clarified parts of the spall event chain * Optimized loop to find spall position using larger steps and fewer operations per loop * fixed small errors * removed unused variables & EHs and set defaults in the case debug mode draw isn't used * removed "class eventhandler" references * removed _fragCount reference in newly backported debug functions * fragmenting projectile velocity isn't used anywhere * removed unused variables, implemented fixes from full rewrite PR, and fixed math errors * added debug draw mode to DEBUG_ENABLED_FRAG define check * fix documentation to make units clear on metal and filler quanities * command capitalization * added target point debug spheres * fixed target sphere visability * Jank fix so that the unit firing can get hit with it's own fragments * accidentally committed script_component.hpp w/ debug enabled * Alternative way to address shot parent self-harm issue * missed comma, going to bed, sorry * add newline and fix blacklist * legability formatting * removed extra newlines and double spaces * Updated function documentation * Removed unused stringtable items * Debug sphere conditional was missing in frago * Completed suggested changed by johnb432 * restored 40mm grenade fragmentation * Apply suggestions from code review Fixed a number of config errors Co-authored-by: PabstMirror <pabstmirror@gmail.com> * Fixed firefist inheritance and order of 125mm shell * Wrong order on reflections variables, but it's not like anyone uses that * Added projectile locality * Added proper projectile locality checks * left some locality debug text * This isn't worthy of a warning as most of the time _objectHit is null is due to the projectile hitting the ground * Removed a newlines for code brackets in arrays * updated debug functions with some minor optimizations * Apply suggestions from code review Grammar and spelling corrections Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com> * didn't consider someone might use explosion reflections but not frag * addressed future arma v2.18 changes more aptly * Fixed authors line on fired function. Used to make sense different when it was an init function based on ammunition extended eventhandlers, missed the revert. * switch all hash fallbacks to getOrDefaultCall and turned default fragments array into a define * Transitioned frag system from fired to ace explode event system * decreased chance to hit / fragment inaccuracy. * fixing setShotParents only sometimes setting first argument, not instigator * cleanup * Slight optimization of "_vecVar" calculation * removed dev_addRound function * Command changes for Arma 2.18 * Fixed debug setting changes * missed exit condition * removed shot parents due to local creation of spall * simplified comment * Adjusted whitespace for readability * Reformatted comments per Johnb432's suggestions Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * one more indent fix --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> Co-authored-by: PabstMirror <pabstmirror@gmail.com> Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
When merged, this pull request will:
Removes old system of tracking rounds by PFEH, instead adds relevant EHs at round initReworked dev functions to use EHsUses EventHandler subclass to avoid conflicts with other round init EHOnly called/tracked on serverace_frag_fragCount
that represents the maximum number of fragments createdSpalling uses a single submunition spawnerTransition caching to new BI hashMaps for cached simulation valuesAllows submunitions to fragmentFragmentation and spalling events now correctly inheritshotParents
parametersMoves fragmentation blacklist to ACE Frag settingQGVAR(enable)
now only controls fragmentation, it no longer controls spalling as well.I’d appreciate constructive feedback and criticism!
Todo
More complete multiplayer testingRevertfnc_addBlackList.sqf
to remove event handlers instead.