-
Notifications
You must be signed in to change notification settings - Fork 740
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
Mortar interaction and ammunition handling #3043
Conversation
Todo: Implement in module (Choose new or old/don't break old missions) Magazine UI+model Add preparing delay Fix function readmes Cleanup in functions? Credits MP Testing
@VKing6 i will take a look to the Models tomorrow |
displayName = CSTRING(magazine_HE_LaserGuided_displayName); | ||
descriptionShort = CSTRING(magazine_HE_LaserGuided_descriptionShort); | ||
model = PATHTOF(data\l16_ammo_he.p3d) | ||
picture = PATHTOF(UI\w_l16_ammo_he_ca.paa); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TAAAAAB
You can blame me for awful code. Im glad you guys are finding it helpful though. If there is any stuff that it links to in the main 16AA modpack that you want/need just let me know and ill pass the source files along. |
Hey I can't claim to write the best code myself (why do you think I wanted to take yours in the first place :p), I'm just more pedantic. |
Now taking suggestions on the best way to prepare the mortars if ammunition handling is enabled. The challenges:
|
|
|
||
_static setMagazineTurretAmmo [_magazine, _ammoCount, [0]]; | ||
|
||
}] call EFUNC(common,addEventHandler); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these three eventhandlers be defined in postinit rather than clientinit?
…eract Conflicts: addons/mk6mortar/CfgEventHandlers.hpp
|
||
// if (GVAR(useAmmoHandling)) then { | ||
_this call FUNC(mortarInit); | ||
// }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This GVAR isn't read from the module in time to work on preplaced mortars.
Any suggestions on how I can delay execution until the variable's been read?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!EGVAR(common,settingsInitFinished)) exitWith {
EGVAR(common,runAtSettingsInitialized) pushBack [{
if (GVAR(useAmmoHandling)) then {
_this call FUNC(mortarInit)
};
}, _this];
};
_this call FUNC(mortarInit);
Okay I've written a functional init script that works on reassembled mortars as well as preplaced ones (should work on zeus or script-placed ones as well, but haven't tested yet). I'd love to get some feedback on the above issue in initPost as well as a general critique of fnc_mortarInit |
Made Zeus compatible. |
I'd like to have this tested for 3.5.0, as I think it's ready (unless testing shows something horribly broken ofc). |
Switched over to playerVehicleChanged EH instead of GetIn/InitPost on commy's suggestion. Seems to work a lot smoother, but I'll have to do another MP dedi test. |
Calling this good to merge from my end. |
Mortar interaction and ammunition handling
This is a port of code originally written by Grey and Glowbal at 16AA.
Goals of this branch is to remove the multiple-round magazines for the mortars and restricting them to loading 1 round at a time and to give assistant gunners and ammo carriers something to do. The plan is to make this module-controlled.
Current status:
Make the mortar reloadable by the gunner with a time penaltyEh too complicated for now; the time penalty will be having to get out and back in between shots.