Skip to content
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 (event handlers and dev functions) #10157

Merged
merged 380 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
380 commits
Select commit Hold shift + click to select a range
d683be8
Merge branch 'master' of https://github.com/lambdatiger/ace_frag-over…
lambdatiger Jan 15, 2024
4ef1166
Small optimization to optimize config lookup
lambdatiger Jan 16, 2024
902af64
avoid mismatch sides when debugging frags with unconcious or captive …
lambdatiger Jan 16, 2024
bd33ab0
removed return of sphere object, not required or useful.
lambdatiger Jan 16, 2024
e3c8e8d
Merge branch 'master' of https://github.com/lambdatiger/ace_frag-over…
lambdatiger Jan 16, 2024
f713791
fixed a loop that got caught in the merge crossfire
lambdatiger Jan 16, 2024
a8e268c
Optimized approach to classifying blacklist type
lambdatiger Jan 16, 2024
c4a93c7
Implemented changes discussed here https://github.com/acemod/ACE3/pul…
lambdatiger Jan 16, 2024
b2666fc
Config lookup optimization mentioned by johnb432 here: https://github…
lambdatiger Jan 16, 2024
b780704
white space/formatting changes
lambdatiger Jan 16, 2024
67e125c
Merge branch 'master' of https://github.com/lambdatiger/ace_frag-over…
lambdatiger Jan 16, 2024
85b566a
removed old parameter changed in https://github.com/acemod/ACE3/pull/…
lambdatiger Jan 16, 2024
67ede76
compacted text a bit
lambdatiger Jan 16, 2024
572f909
formatting whitespace
lambdatiger Jan 16, 2024
7aa17aa
Grammatical erros
lambdatiger Jan 16, 2024
8dd76d1
Changes as discussed here https://github.com/acemod/ACE3/pull/9728#di…
lambdatiger Jan 16, 2024
6dacd38
Few quick optimizations of == to isEqualTo
lambdatiger Jan 16, 2024
9178611
Debug updated to be easier to control
lambdatiger Jan 16, 2024
769bb29
Changed how spall hold off is calculated to avoid repeated unneeded c…
lambdatiger Jan 16, 2024
63cba6b
clarified a hold off variable
lambdatiger Jan 16, 2024
4be8c82
Better approach to ACE_FRAG_RM_EH macro
lambdatiger Jan 17, 2024
4727386
Git rid of superfulous stringtable entries
lambdatiger Jan 17, 2024
16e699e
unneeded parens
lambdatiger Jan 18, 2024
cdf1b4d
Clarified arguments
lambdatiger Jan 18, 2024
1b03ef7
getposATL to getPosATL
lambdatiger Jan 18, 2024
0958d6a
Update addons/frag/functions/fnc_dev_addRound.sqf
lambdatiger Jan 18, 2024
1612872
Function header changes
lambdatiger Jan 18, 2024
3cc300a
another great isNotEqualTo opportunity
lambdatiger Jan 18, 2024
b6891b7
formatting changes
lambdatiger Jan 18, 2024
e5f62c7
unneeded parens
lambdatiger Jan 18, 2024
c0c423b
Declared _ammoInfo twice
lambdatiger Jan 18, 2024
5160361
optimized around checking if systems are active and moved debug argum…
lambdatiger Jan 18, 2024
73d0064
Removed white space from removing an if statement in a previous commit
lambdatiger Jan 18, 2024
ea15eea
Removed superfulous parenthese
lambdatiger Jan 18, 2024
a1c498d
clarified function description and removed unneeded comments
lambdatiger Jan 18, 2024
0321b78
Moved "isServer" check to initRound function
lambdatiger Jan 18, 2024
1f294f5
Merge branch 'master' of https://github.com/lambdatiger/ace_frag-over…
lambdatiger Jan 18, 2024
3f84a45
https://github.com/acemod/ACE3/pull/9728#discussion_r1454832701
lambdatiger Jan 18, 2024
da1d184
changed params statement, function header, and propigated doFrag argu…
lambdatiger Jan 18, 2024
183d9f0
capitization from cfg to Cfg in config lookups
lambdatiger Jan 18, 2024
df884dc
changed default arguments, check isKindOf to "CAManBase"
lambdatiger Jan 18, 2024
8b45d0a
Updated function headers
lambdatiger Jan 18, 2024
9bcf2b7
white space and define placement changes
lambdatiger Jan 18, 2024
35592fa
removed 2 argument option and removed some defaults
lambdatiger Jan 18, 2024
63d67df
removed spurious commas
lambdatiger Jan 18, 2024
c921b1f
removed unused debug GVAR
lambdatiger Jan 18, 2024
13834d7
Switched debug clear traces from addAction to ACE self interact
lambdatiger Jan 18, 2024
85df838
variable names weren't verbose enough
lambdatiger Jan 18, 2024
f741737
Mactched format https://github.com/acemod/ACE3/pull/9728#discussion_r…
lambdatiger Jan 18, 2024
a4f2ad4
Updated debug settings
lambdatiger Jan 18, 2024
59bf6e3
Shot parent possible fix #1
lambdatiger Jan 18, 2024
722e86a
Removed extra text from CfgAmmoFragParameters
lambdatiger Jan 18, 2024
4ebbc28
Makes sure spall power square root is positive and also we don't prod…
lambdatiger Jan 18, 2024
8b3826a
white space for clarity
lambdatiger Jan 18, 2024
78a15b1
Optimize dev_hitbox deleting
lambdatiger Jan 18, 2024
5f1cf0b
saving people from their own bad testing setup
lambdatiger Jan 18, 2024
f3788af
Since the functions always exist, I guess these variables should too
lambdatiger Jan 18, 2024
a3efede
Fixe bad search function
lambdatiger Jan 18, 2024
8636926
optimization, see https://github.com/acemod/ACE3/pull/9728#discussion…
lambdatiger Jan 19, 2024
00dc419
changed SPG-9 Fragments
lambdatiger Jan 19, 2024
2d9828d
removed unneeded toLower
lambdatiger Jan 19, 2024
40b9cd3
Merge branch 'master' of https://github.com/lambdatiger/ace_frag-over…
lambdatiger Jan 19, 2024
2e6186c
Changed case output to match config
lambdatiger Jan 19, 2024
33afd8a
Merge branch 'ACE_advancedThrowing-shotParent-issue'
lambdatiger Jan 21, 2024
3540062
Increased relative chance to hit torso/pelvis when fragemnt should hit.
lambdatiger Jan 21, 2024
fd6b9bc
Removed double space
lambdatiger Jan 21, 2024
07f055e
updated some round types
lambdatiger Feb 8, 2024
f63b408
Added commented 2.18 commands and updated script component
lambdatiger Feb 8, 2024
60543a5
added print incomplete only option to fnc_debugAmmo
lambdatiger Feb 8, 2024
2ad2564
removed all spaces from macros
lambdatiger Feb 8, 2024
49c6187
Sync main repo
lambdatiger Feb 8, 2024
a4c88ec
removd unneeded define
lambdatiger Feb 8, 2024
665707b
a Brett (HEMTT) suggested change I miss
lambdatiger Feb 8, 2024
1da1c68
Apply suggestions from code review
lambdatiger Feb 14, 2024
fa241ca
Removed doublespace
lambdatiger Feb 14, 2024
61029ba
Update addons/frag/functions/fnc_dev_addRound.sqf
lambdatiger Feb 14, 2024
4d9f61e
Update addons/frag/functions/fnc_dev_drawTrace.sqf
lambdatiger Feb 15, 2024
ae116e2
variable name changes
lambdatiger Feb 15, 2024
a976b28
magic number clean up and white space
lambdatiger Feb 15, 2024
4ef23df
white space, function headers and variable names
lambdatiger Feb 15, 2024
bc2a6bb
small Should spall optimization
lambdatiger Feb 15, 2024
7e54280
Merge branch 'master' of https://github.com/lambdatiger/ace_frag-over…
lambdatiger Feb 15, 2024
668d222
Removed blacklist functions and settings
lambdatiger Feb 16, 2024
c09c2a1
reformatted function headers, removed value type checking, and change…
lambdatiger Feb 16, 2024
656fa9f
fixed missing underscore in change from review
lambdatiger Feb 16, 2024
78a27ff
function header, lazy eval, and params list simplifications
lambdatiger Feb 16, 2024
dfdea2d
function header and variable name readability
lambdatiger Feb 16, 2024
6cbfe15
changed defaults to make them more clear they're just a default value
lambdatiger Feb 16, 2024
21e7b3d
Updated wiki to be clearer in a few areas, and add some other informa…
lambdatiger Feb 16, 2024
4913887
added MP debug compatability
lambdatiger Feb 16, 2024
66c566b
Possible shouldFrag legibility improvement
lambdatiger Feb 16, 2024
a8778a6
added changes to stringtable
lambdatiger Feb 16, 2024
f4dc052
Grammar sweep on the wiki, and added some clarifications to config va…
lambdatiger Feb 16, 2024
7248496
optimized dev_trackHitbox and made variables more explicit
lambdatiger Feb 16, 2024
4728a56
Cleaned up documentation and documentation
lambdatiger Feb 16, 2024
008328c
reorganized postInit CBA_settingInitialized EH
lambdatiger Feb 16, 2024
dd65fc8
missing underscore in fnc_dev_trackObj
lambdatiger Feb 17, 2024
c3470de
stopped adding unneeded extra points
lambdatiger Feb 17, 2024
b98aae7
cleaned un-updated stringtable entries
lambdatiger Feb 17, 2024
05dedff
reworked some function headers and deleted whitespace in doFragTargeted
lambdatiger Feb 21, 2024
776c1f7
Merge branch 'acemod:master' into master
lambdatiger Feb 21, 2024
fc745e4
Removed outdated code
johnb432 Mar 1, 2024
279f2e0
Formatting and header fixes
johnb432 Mar 1, 2024
480d2df
Ignore curators and spectators
johnb432 Mar 1, 2024
d6c21e0
Made clear traces global again, added interaction condition
johnb432 Mar 2, 2024
d6a37f3
Change stringtable entries
johnb432 Mar 2, 2024
e3395c5
Removed unused stringtable entries & fixed hitbox description
lambdatiger Mar 2, 2024
f57ac94
Small coding standard changes (missing semicolons on non-return valu…
lambdatiger Mar 2, 2024
8a2f40c
Changed sphere size and added return based on usage in dev_trackHitBox
lambdatiger Mar 3, 2024
3cb07e8
removed "_lo" random fragment entries as they are unused
lambdatiger Mar 3, 2024
3e52ce2
doFragRandom was always being called and spawning at least 5 fragment…
lambdatiger Mar 3, 2024
5915d0e
removed unnceassary "disableCollisionWith"
lambdatiger Mar 3, 2024
4c905fe
Clarified trace statements and corrected format and spelling
lambdatiger Mar 3, 2024
9c6a919
Do spall exits for time 90% of the time (round hits multiple walls) a…
lambdatiger Mar 3, 2024
fd2c595
Fixed ordering in which frag hold off variables are set to not skip w…
lambdatiger Mar 3, 2024
98caad5
initRound ordering and fixed define names
lambdatiger Mar 3, 2024
ff98917
Fixed function header
lambdatiger Mar 3, 2024
4583a0d
reformatted comments and some v2.18 remakrs comments
lambdatiger Mar 3, 2024
deecaf9
Removed unneeded ground offset
lambdatiger Mar 5, 2024
448f3e8
Merge remote-tracking branch 'upstream/master'
lambdatiger Mar 10, 2024
9dd45e1
Expanded TRACE
johnb432 Mar 13, 2024
ab51d8f
Fix typo
johnb432 Mar 13, 2024
04a3ba8
Moved event to preInit
johnb432 Mar 17, 2024
786ce92
Updated default fallback frag distance to be less extreme and changed…
lambdatiger Mar 17, 2024
48f96b4
Merge branch 'acemod:master' into master
lambdatiger Mar 18, 2024
e1d085c
Merge branch 'acemod:master' into master
lambdatiger Mar 22, 2024
eda865f
Randomized random frag directions
lambdatiger Mar 29, 2024
5bab127
removed some magic numbers, and cached numbers from shouldSpall
lambdatiger Mar 29, 2024
ef39e78
removed magic numbers and cached values preemptively (normally spallI…
lambdatiger Mar 29, 2024
c487f7f
Unify example formatting
lambdatiger Mar 29, 2024
5e41b51
Merge branch 'master' of https://github.com/lambdatiger/ace_frag-over…
lambdatiger Mar 29, 2024
bd23b42
cleaned up function examples
lambdatiger Mar 29, 2024
a817e5e
removed excess square brackets
lambdatiger Mar 29, 2024
0800205
Final function example reformat
lambdatiger Mar 29, 2024
60d0af8
Update addons/frag/script_component.hpp
johnb432 Mar 29, 2024
ecf5dbf
Merge branch 'master' into pr/9728
johnb432 Mar 29, 2024
6b82859
Corrected docs
johnb432 Apr 1, 2024
e8283c3
Use `getOrDefaultCall`
johnb432 Apr 1, 2024
6c53fff
Merge branch 'acemod:master' into master
lambdatiger Apr 4, 2024
2206ef4
Removed unused classes, redefined using macros to minimize error and …
lambdatiger Apr 14, 2024
25f14af
updated debugging output and fixed velocity error
lambdatiger Apr 14, 2024
eb24c11
Reformatted for legibility and debug output
lambdatiger Apr 14, 2024
3c2a3c7
caught calc error while answer johnb's question
lambdatiger Apr 14, 2024
ce60bd3
Almost finished with compats and I had some changes to align vanilla …
lambdatiger Apr 14, 2024
d6c400e
Missed variable when updating
lambdatiger Apr 14, 2024
283b806
Added unneeded class details to make PBOproject happy
lambdatiger Apr 14, 2024
868c613
Forgot to update doFragRandom docs with previous changes
lambdatiger Apr 14, 2024
559c611
and the debug context
lambdatiger Apr 14, 2024
afc3b10
Merge branch 'acemod:master' into master
lambdatiger Apr 16, 2024
4f0c167
Merge branch 'master' into pr/9728
johnb432 May 9, 2024
e2dce5e
Readd blacklist
johnb432 May 18, 2024
b9aa3cb
Fixed an issue with fragments being created above water for explosion…
lambdatiger May 19, 2024
eaff498
Exposed projectile event handlers for both blacklist use and other sh…
lambdatiger May 19, 2024
f1483c5
Revert "Exposed projectile event handlers for both blacklist use and …
lambdatiger May 19, 2024
8d071f9
added debug information and folded if statements
lambdatiger May 19, 2024
3d6c406
fixed error (if statement with no argument)
lambdatiger May 19, 2024
718c3d6
Only send blacklist updates to the server
lambdatiger May 20, 2024
130037d
Added default fragCount fallback value based on current ACE frag rang…
lambdatiger Jun 20, 2024
474321b
Converted all positions for doFrag to AGL since we're converting to t…
lambdatiger Jun 20, 2024
60a0dae
removed feet hitpoints & tightened multishot submunitions.
lambdatiger Jun 20, 2024
d0df8e5
Merge branch 'acemod:master' into master
lambdatiger Jun 20, 2024
eedbb0b
Revert to 60a0dae, merge conflict wasn't resolved properly
lambdatiger Jun 20, 2024
7050afb
Merge branch 'master' of https://github.com/lambdatiger/ace_frag-over…
lambdatiger Jun 20, 2024
d6adfb7
Merge remote-tracking branch 'upstream/master'
lambdatiger Jun 20, 2024
a6cfcbf
Removed event handlers
lambdatiger Jul 17, 2024
cf1860d
Changed blacklist to acting on local projectiles to match initial per…
lambdatiger Jul 17, 2024
9df2e5b
added fired EH and moved projectile tracking to be local to projectile
lambdatiger Jul 17, 2024
f65fcbf
updated initialization and should frag to check for submunitions sinc…
lambdatiger Jul 17, 2024
cd4d2a9
Fixed calls for shouldFrag and got rid of old initRound.sfq (maybe ba…
lambdatiger Jul 17, 2024
04e844f
fixed small mistakes in names and function calls
lambdatiger Jul 17, 2024
1ae4fc7
fixed frame offset to avoid hitting dead targets
lambdatiger Jul 17, 2024
15d5256
Merge branch 'acemod:master' into master
lambdatiger Jul 17, 2024
32af820
Fixed config path in shouldFrag
lambdatiger Jul 17, 2024
0269039
Didn't know that PBO project needed trailing {} on class inheritance …
lambdatiger Jul 17, 2024
15de0d9
fixed more useless trailing {}
lambdatiger Jul 17, 2024
b656ef6
Initial rollback to old frag simulation and spalling simulation. Upda…
lambdatiger Jul 17, 2024
2c5b058
missed comma
lambdatiger Jul 17, 2024
20b1ab7
remove fragCount from config
lambdatiger Jul 17, 2024
a20274a
made addBlackList remove projectile EHs
lambdatiger Jul 18, 2024
842b818
updated config path to be relevant to post-EH version
lambdatiger Jul 18, 2024
fbca983
All spalling in current version is local
lambdatiger Jul 18, 2024
04c4bd4
updated search pattern to one discussed in PR #9728
lambdatiger Jul 19, 2024
682568f
updated defines to match implementation
lambdatiger Jul 19, 2024
9c8e9e3
removed commented out debug information from nouber
lambdatiger Jul 19, 2024
3fcf6f7
removed magic numbers and code with no effect
lambdatiger Jul 19, 2024
3595f82
removed more magic numbers
lambdatiger Jul 19, 2024
39e7f7f
unfucked a comma
lambdatiger Jul 19, 2024
783c2aa
fixed debug def names
lambdatiger Jul 19, 2024
f7d6c78
updated documentation
lambdatiger Jul 19, 2024
8da5e47
changed debug colors
lambdatiger Jul 19, 2024
437f6c1
mass must be in grams in this version I guess
lambdatiger Jul 19, 2024
48e2996
fixed errors in frag with downgrade
lambdatiger Jul 19, 2024
1480715
fixed timing and other spall issues
lambdatiger Jul 19, 2024
4f25176
updated some defne names and usages
lambdatiger Jul 19, 2024
c344130
increased code legiblity and optimized some randomizations
lambdatiger Jul 19, 2024
f57f6f5
clarified parts of the spall event chain
lambdatiger Jul 19, 2024
2713acd
Optimized loop to find spall position using larger steps and fewer op…
lambdatiger Jul 19, 2024
e4d36c6
fixed small errors
lambdatiger Jul 19, 2024
160bb15
Merge remote-tracking branch 'upstream/master' into Event-hanlder-rep…
lambdatiger Jul 19, 2024
3efaef0
removed unused variables & EHs and set defaults in the case debug mod…
lambdatiger Jul 30, 2024
6137849
removed "class eventhandler" references
lambdatiger Jul 30, 2024
5df635c
removed _fragCount reference in newly backported debug functions
lambdatiger Jul 30, 2024
33a0653
fragmenting projectile velocity isn't used anywhere
lambdatiger Jul 30, 2024
72a6cff
removed unused variables, implemented fixes from full rewrite PR, and…
lambdatiger Jul 30, 2024
3659aff
added debug draw mode to DEBUG_ENABLED_FRAG define check
lambdatiger Jul 30, 2024
8b29b86
Merge branch 'acemod:master' into Event-hanlder-replacement
lambdatiger Jul 30, 2024
06d3b23
fix documentation to make units clear on metal and filler quanities
lambdatiger Jul 30, 2024
4d79e93
Merge branch 'Event-hanlder-replacement' of https://github.com/lambda…
lambdatiger Jul 30, 2024
0ef3991
command capitalization
lambdatiger Jul 30, 2024
cfdf291
added target point debug spheres
lambdatiger Jul 30, 2024
5745455
fixed target sphere visability
lambdatiger Jul 30, 2024
bee8eee
Jank fix so that the unit firing can get hit with it's own fragments
lambdatiger Jul 30, 2024
5059cb2
accidentally committed script_component.hpp w/ debug enabled
lambdatiger Jul 30, 2024
ed36b6a
Alternative way to address shot parent self-harm issue
lambdatiger Jul 30, 2024
61a1770
missed comma, going to bed, sorry
lambdatiger Jul 30, 2024
7b282ec
add newline and fix blacklist
lambdatiger Jul 30, 2024
22ca38f
legability formatting
lambdatiger Jul 30, 2024
25cc22b
removed extra newlines and double spaces
lambdatiger Jul 30, 2024
2e67d5d
Updated function documentation
lambdatiger Jul 30, 2024
4092177
Removed unused stringtable items
lambdatiger Jul 30, 2024
8c68f13
Debug sphere conditional was missing in frago
lambdatiger Jul 31, 2024
eb04dec
Completed suggested changed by johnb432
lambdatiger Aug 14, 2024
66fce29
Merge branch 'acemod:master' into Event-hanlder-replacement
lambdatiger Aug 14, 2024
5d16ecb
restored 40mm grenade fragmentation
lambdatiger Aug 23, 2024
b17ea96
Apply suggestions from code review
lambdatiger Aug 23, 2024
58e021b
Fixed firefist inheritance and order of 125mm shell
lambdatiger Aug 23, 2024
82d9044
Merge branch 'acemod:master' into Event-hanlder-replacement
lambdatiger Aug 23, 2024
ea782c1
Wrong order on reflections variables, but it's not like anyone uses that
lambdatiger Aug 23, 2024
9e150e0
Added projectile locality
lambdatiger Aug 24, 2024
b9138bd
Added proper projectile locality checks
lambdatiger Aug 24, 2024
bd557af
Merge branch 'Event-hanlder-replacement' of https://github.com/lambda…
lambdatiger Aug 24, 2024
f485b5a
left some locality debug text
lambdatiger Aug 24, 2024
dae81be
This isn't worthy of a warning as most of the time _objectHit is null…
lambdatiger Aug 24, 2024
70606d4
Removed a newlines for code brackets in arrays
lambdatiger Aug 28, 2024
1855441
updated debug functions with some minor optimizations
lambdatiger Aug 28, 2024
dfbcd15
Apply suggestions from code review
lambdatiger Aug 29, 2024
5ae31fa
Merge remote-tracking branch 'upstream/master' into Event-hanlder-rep…
lambdatiger Sep 4, 2024
6a51a82
didn't consider someone might use explosion reflections but not frag
lambdatiger Sep 4, 2024
7bbd8a0
addressed future arma v2.18 changes more aptly
lambdatiger Sep 4, 2024
c0ea806
Fixed authors line on fired function. Used to make sense different wh…
lambdatiger Sep 4, 2024
bdf0854
switch all hash fallbacks to getOrDefaultCall and turned default frag…
lambdatiger Sep 7, 2024
f512fab
Merge branch 'acemod:master' into Event-hanlder-replacement
lambdatiger Sep 8, 2024
f918816
Transitioned frag system from fired to ace explode event system
lambdatiger Sep 8, 2024
65c0304
decreased chance to hit / fragment inaccuracy.
lambdatiger Sep 9, 2024
18816cf
fixing setShotParents only sometimes setting first argument, not inst…
lambdatiger Sep 10, 2024
6808b81
cleanup
LinkIsGrim Sep 11, 2024
1568dde
Slight optimization of "_vecVar" calculation
lambdatiger Sep 11, 2024
4ec7dfd
removed dev_addRound function
lambdatiger Sep 11, 2024
07eb58f
revert typical speed to match current master
lambdatiger Sep 16, 2024
b249b2c
Updated doSpall/fired to match not attempting to set shot parents off…
lambdatiger Sep 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
289 changes: 9 additions & 280 deletions addons/frag/CfgAmmo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,272 +4,16 @@

class CfgAmmo {

// ~~~~ Bombs:
class ammo_Bomb_LaserGuidedBase;
class Bo_GBU12_LGB: ammo_Bomb_LaserGuidedBase {
GVAR(enabled) = 1;
#include "CfgAmmoBaseClasses.hpp"

GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large), QGVAR(huge), QGVAR(huge_HD), QGVAR(huge)};
GVAR(metal) = 140000;
GVAR(charge) = 87000;
GVAR(gurney_c) = 2320;
GVAR(gurney_k) = "1/2";
};
class Bomb_04_F: ammo_Bomb_LaserGuidedBase {
GVAR(enabled) = 1;

GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large), QGVAR(huge), QGVAR(huge_HD), QGVAR(huge)};
GVAR(metal) = 140000;
GVAR(charge) = 87000;
GVAR(gurney_c) = 2320;
GVAR(gurney_k) = "1/2";
};
class BombCore;
class Bo_Mk82: BombCore {
GVAR(enabled) = 1;

GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large), QGVAR(huge), QGVAR(huge_HD), QGVAR(huge)};
GVAR(metal) = 140000;
GVAR(charge) = 87000;
GVAR(gurney_c) = 2320;
GVAR(gurney_k) = "1/2";
};

// ~~~~ Grenades:
class GrenadeBase;
class Grenade;
class GrenadeHand: Grenade {
GVAR(enabled) = 1;

GVAR(skip) = 0;
GVAR(force) = 1;
// This is a good high-drag frag type for grenades.
GVAR(classes)[] = {QGVAR(tiny_HD)};
/*
These values are based on the M67 Grenade, should be tweaked for
individual grenades.
*/
GVAR(metal) = 210; // metal in grams
GVAR(charge) = 185; // explosive in grams
GVAR(gurney_c) = 2843; // Gurney velocity constant for explosive type. See: http://en.wikipedia.org/wiki/Gurney_equations
GVAR(gurney_k) = "3/5"; // Gurney shape factor, in this case a sphere. See: http://en.wikipedia.org/wiki/Gurney_equations
};
class GrenadeHand_stone: GrenadeHand {
GVAR(skip) = 1;
};
class SmokeShell: GrenadeHand {
GVAR(skip) = 1;
};
class G_40mm_HE: GrenadeBase {
// Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M441
GVAR(enabled) = 1;
GVAR(force) = 1;

GVAR(classes)[] = {QGVAR(tiny_HD)};
GVAR(metal) = 200;
GVAR(charge) = 32;
GVAR(gurney_c) = 2700;
GVAR(gurney_k) = "1/2";
};
class G_40mm_HEDP: G_40mm_HE {
// Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M433
GVAR(enabled) = 1;

GVAR(classes)[] = {QGVAR(tiny_HD)};
GVAR(metal) = 200;
GVAR(charge) = 45;
GVAR(gurney_c) = 2830;
GVAR(gurney_k) = "1/2";
};

class ACE_G_40mm_HEDP: G_40mm_HEDP {};
class ACE_G_40mm_HE: G_40mm_HE {};
class ACE_G_40mm_Practice: ACE_G_40mm_HE {
GVAR(skip) = 1;
GVAR(force) = 0;
EGVAR(vehicle_damage,incendiary) = 0;
};
class ACE_G40mm_HE_VOG25P: G_40mm_HE {
GVAR(skip) = 0;
GVAR(force) = 1;
};


// ~~~~ RPGs:
class MissileBase;
class R_PG32V_F;
class R_TBG32V_F: R_PG32V_F { // HE
GVAR(enabled) = 1;
GVAR(metal) = 400;
GVAR(charge) = 210;
GVAR(gurney_c) = 2800;
GVAR(gurney_k) = "3/5";
GVAR(classes)[] = {"ACE_frag_medium_HD"};
};
class M_Titan_AA: MissileBase {
GVAR(skip) = 1;
};
class M_Titan_AT: MissileBase {
GVAR(skip) = 1;
};
class M_Titan_AP: M_Titan_AT { // "anti personnel"
GVAR(skip) = 0;
GVAR(enabled) = 1;
GVAR(metal) = 400;
GVAR(charge) = 210;
GVAR(gurney_c) = 2800;
GVAR(gurney_k) = "3/5";
GVAR(classes)[] = {"ACE_frag_medium_HD"};
};

// https://ofb.gov.in/product/products/product-details/84-mm-he-round-ffv-441-b
// https://armypubs.army.mil/epubs/DR_pubs/DR_a/pdf/web/ARN18072_TC%203-22x84%20FINAL%20WEB.pdf (page 99, Table A-6. HE 441D RS, 84-mm projectile)
class R_MRAAWS_HEAT_F;
class R_MRAAWS_HE_F: R_MRAAWS_HEAT_F {
GVAR(enabled) = 1;
GVAR(metal) = 2300;
GVAR(charge) = 590;
GVAR(gurney_c) = 2800;
GVAR(gurney_k) = "1/2";
GVAR(classes)[] = {"ACE_frag_small"};
};


// ~~~~ Missiles:
class M_PG_AT;
class M_AT: M_PG_AT { // DAR (Hydra 70)
// Source: http://fas.org/man/dod-101/sys/missile/hydra-70.htm
GVAR(enabled) = 1;

GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)};
GVAR(metal) = 3850;
GVAR(charge) = 1040;
GVAR(gurney_c) = 2700;
GVAR(gurney_k) = "1/2";
};
class RocketBase;
class R_80mm_HE: RocketBase {
GVAR(skip) = 1;
};
class Missile_AGM_02_F: MissileBase {
// Source: http://fas.org/man/dod-101/sys/smart/agm-65.htm
GVAR(enabled) = 1;

GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)};
GVAR(metal) = 56250;
GVAR(charge) = 39000;
GVAR(gurney_c) = 2700;
GVAR(gurney_k) = "1/2";
};
class Rocket_04_HE_F: MissileBase { // Shrieker (Hydra 70)
GVAR(enabled) = 1;
GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)};
GVAR(metal) = 3850;
GVAR(charge) = 1040;
GVAR(gurney_c) = 2700;
GVAR(gurney_k) = "1/2";
};
class M_Scalpel_AT: MissileBase { // 9K121 Vikhr
GVAR(enabled) = 1;
GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)};
GVAR(metal) = 10000;
GVAR(charge) = 3000;
GVAR(gurney_c) = 2700;
GVAR(gurney_k) = "1/2";
};
class ACE_Hellfire_AGM114K: M_Scalpel_AT {
// Source: http://www.designation-systems.net/dusrm/m-114.html
GVAR(enabled) = 1;

GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)};
GVAR(metal) = 8000;
GVAR(charge) = 2400;
GVAR(gurney_c) = 2700;
GVAR(gurney_k) = "1/2";
};
class M_Air_AA: MissileBase {
GVAR(skip) = 1;
};
class Missile_AA_04_F: MissileBase {
GVAR(skip) = 1;
};

// curator ammo entries
class ShellBase;
class Sh_125mm_HEAT;
class Sh_155mm_AMOS: ShellBase {
// Source: http://www.globalsecurity.org/military/systems/munitions/m795.htm
GVAR(enabled) = 1;

GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large), QGVAR(huge), QGVAR(huge_HD), QGVAR(huge)};
GVAR(metal) = 36000;
GVAR(charge) = 9979;
GVAR(gurney_c) = 2440;
GVAR(gurney_k) = "1/2";
};
class Sh_82mm_AMOS: Sh_155mm_AMOS {
// Source: http://www.arsenal-bg.com/defense_police/mortar_bombs_82mm.htm
GVAR(enabled) = 1;

GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)};
GVAR(metal) = 3200;
GVAR(charge) = 420;
GVAR(gurney_c) = 2440;
GVAR(gurney_k) = "1/2";
};
class ModuleOrdnanceMortar_F_Ammo: Sh_82mm_AMOS {
GVAR(enabled) = 1;

GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)};
GVAR(metal) = 800;
GVAR(charge) = 4200;
GVAR(gurney_c) = 2320;
GVAR(gurney_k) = "1/2";
};
class Sh_105mm_HEAT_MP: Sh_125mm_HEAT {
GVAR(enabled) = 1;

GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)};
GVAR(metal) = 11400;
GVAR(charge) = 7100;
GVAR(gurney_c) = 2800;
GVAR(gurney_k) = "1/2";
};
class Sh_120mm_HE: ShellBase {
GVAR(enabled) = 1;

GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)};
GVAR(metal) = 23000;
GVAR(charge) = 3148;
GVAR(gurney_c) = 2830;
GVAR(gurney_k) = "1/2";
};
class Sh_125mm_HE: Sh_120mm_HE {
GVAR(enabled) = 1;

GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)};
GVAR(metal) = 16000;
GVAR(charge) = 3200;
GVAR(gurney_c) = 2440;
GVAR(gurney_k) = "1/2";
};
class ModuleOrdnanceHowitzer_F_ammo: Sh_155mm_AMOS {
GVAR(enabled) = 1;

GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large), QGVAR(huge), QGVAR(huge_HD), QGVAR(huge)};
GVAR(metal) = 1950;
GVAR(charge) = 15800;
GVAR(gurney_c) = 2320;
GVAR(gurney_k) = "1/2";
};


class B_65x39_Caseless;
class B_65x39_Caseless: BulletBase {};
class GVAR(base): B_65x39_Caseless {
ACE_damageType = "grenade"; // compatibility with medical_damage, shrapnel should produce grenade wounds
timeToLive = 12;
typicalSpeed = 1500;
timeToLive = 4;
typicalSpeed = 800;
maxSpeed = 1500;
deflecting = 65;
GVAR(skip) = 1;
};

class GVAR(tiny): GVAR(base) {
Expand Down Expand Up @@ -317,7 +61,7 @@ class CfgAmmo {
};

class GVAR(large_HD): GVAR(large) {
hit = 28;
hit = 28;
indirectHit = 2;
indirectHitRange = 0.25;
airFriction = QUOTE(BASE_DRAG_HD*0.65);
Expand All @@ -340,21 +84,6 @@ class CfgAmmo {
caliber = 2.8;
};

class GVAR(spall_small): GVAR(small) {
timeToLive = 0.1;
};

class GVAR(spall_medium): GVAR(medium) {
timeToLive = 0.15;
};

class GVAR(spall_large): GVAR(large) {
timeToLive = 0.25;
};

class GVAR(spall_huge): GVAR(huge) {
timeToLive = 0.3;
};

#include "CfgAmmoReflections.hpp"
#include "CfgAmmoSpall.hpp"
#include "CfgAmmoFragParameters.hpp"
};
47 changes: 47 additions & 0 deletions addons/frag/CfgAmmoBaseClasses.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// We need this since autocannons generally inherit from BulletBase
class BulletCore;
class BulletBase: BulletCore {};

class GrenadeCore;
class GrenadeBase: GrenadeCore {};

class LaserBombCore;
class ammo_Bomb_LaserGuidedBase: LaserBombCore {};

class MissileCore;
class MissileBase: MissileCore {};

class RocketCore;
class RocketBase: RocketCore {
GVAR(skip) = 1;
};

class ArtilleryRocketCore: RocketCore {};

class ShellCore;
class ShellBase: ShellCore {};

class ShotDeployCore;
class ShotDeployBase: ShotDeployCore {
GVAR(skip) = 1;
};

class ShotgunCore;
class ShotgunBase: ShotgunCore {};

class SubmunitionCore;
class SubmunitionBase: SubmunitionCore {
GVAR(skip) = 1;
};

class BoundingMineCore;
class BoundingMineBase: BoundingMineCore {};

class PipeBombCore;
class PipeBombBase: PipeBombCore {};

class DirectionalBombCore;
class DirectionalBombBase: DirectionalBombCore {};

class MineCore;
class MineBase: MineCore {};
Loading