-
Notifications
You must be signed in to change notification settings - Fork 737
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
Overpressure - Add to vehicle/static Missile Launchers and Recoilless Guns #10270
base: master
Are you sure you want to change the base?
Conversation
Why separate the overpressure configs from the regular RHS compats? They don't set dependencies. |
To make the config cleaner, imo, as the overpressure overrides are now more significant and numerous. |
Making a component is, imo, not worth it in this case. Asking for other ACE devs to weigh in on the subject. |
I don't think this needs a new component either |
Was done as well for the tiny |
The hearing subcomponents include a file from hearing, so it has a hard dependency. The hellfire is only loaded if the hellfire component is loaded, so it's necessary to be a in a separate subcomponent. |
Isn't that just an include that is pre-processed either way in the process of determining whether the component has the necessary dependencies loaded? |
No, because if didn't load hearing, I imagine it would throw an error, but it doesn't. This is missing documentation, needs to be added. |
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.
Unfortunately, this doesn't account for the shooter taking damage. E.g: Use the Jeep Wrangler with an SPG-9, with the rear of the SPG facing a wall. You're in an open vehicle, but you don't take damage, as FUNC(firedEHOP)
just isn't meant to handle backblast.
I think you need to change
ACE3/addons/overpressure/XEH_postInit.sqf
Line 13 in d56a3a6
["ace_firedPlayerVehicle", LINKFUNC(firedEHOP)] call CBA_fnc_addEventHandler; |
so that it first checks what sort of damage it's supposed to apply (backblast vs overpressure), then call the respective function.
To differentiate what type of damage to apply, you should introduce a new attribute (something like
GVAR(backblast) = 1;
). I'm not a fan of changing offset
's purpose like this, it's too subtle and should be done in a separate PR imo. It would be clearer in the changelog that ACE now supports the offset
attribute for overpressure (i.e. vehicle based weapons).
addons/compat_rhs_usf3/compat_rhs_usf3_overpressure/CfgWeapons.hpp
Outdated
Show resolved
Hide resolved
Yeah, I noticed that limitation but didn't think much more about it.
Thinking about this, it seems it could create too much duplicated code. The most efficient option might be merging the 2
Thought that would add needless complexity at first, but given the other necessary changes, this is the best solution. |
I am having doubts on the feasibility of backblast damage to the vehicle gunner, neither |
I've managed to get backblast to work the existing functions in the static titan launcher. I'll make the required suggestions. |
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.
In XEH_postInit.sqf
:
["ace_firedPlayerVehicle", {
if (getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(backblast)) == 1) then {
_this call FUNC(firedEHBB);
} else {
_this call FUNC(firedEHOP);
};
}] call CBA_fnc_addEventHandler;
In fnc_firedEHBB.sqf
, change all instances of _unit
to _gunner
except in lines 18 & 19.
This is only a rough working version. Ideally we'd want to cache GVAR(backblast)
with the other overpressure values, let's get a working version first, then worry about optimising.
Sure, but how can the BB EH reliably tell whether the vehicle is "open" and damage from backblast reflection should be applied to the gunner? Or do you intend applying it either way, to simulate some sort of overpressure even on armored vehicles like a BRDM with ATGMs? |
ace_hearing (and also acre) have some code to detect how open a turret seat is: https://github.com/acemod/ACE3/blob/master/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf |
Current implementation works well. |
Overpressure on mortars works pretty well. A bigger issue is that truck-mounted MLRS backblast reflection can easily cause unrealistic injury to the gunner at higher launcher elevations, due to the vehicle counting as open. |
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.
Merge master into PR, so it's easier to test.
@@ -37,7 +37,7 @@ TRACE_3("cache",_overpressureAngle,_overpressureRange,_overpressureDamage); | |||
private _distance = vectorMagnitude _relativePosition; | |||
private _angle = acos (_axisDistance / _distance); | |||
|
|||
private _line = [_posASL, _targetPositionASL, _firer, _x]; | |||
private _line = [_posASL, _targetPositionASL, vehicle _firer, _x]; |
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.
Line 33 might also have to be changed, to accommodate gunners being able to be injured from overpressure/backblast from other sources. I'm not sure about this though, so hold off on any changes to that just yet.
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.
True, should work by just allowing the loop to run on entities in vehicles and then putting the same "closed vehicle" condition on it as run by firedEHBB
.
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.
Checking line intersection between the BB origin and a player on a vehicle seems a bit tricky though, it keeps registering an intersection with 2 guys on a quad right behind an SPG-9 🤔
When merged this pull request will:
ModifyfiredEHOP
for vehicle Overpressure so that is uses theoffset
config value when determining OP direction.A positive value will shift the Overpressure origin point forward along the weapon's direction (just like it does backwards for launchers).A negative value will orient the Overpressure direction backwards, as well as shift its origin point further back.backblast
config value for vehicle weapons, if set their overpressure will be simulated backwards just like for man-portable launchers. Includes backblast reflection damage to the shooter if in an open vehicle.Isolate their Overpressure overrides to subconfigs.