-
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
Refuel for non-AllVehicle objects #5151
Conversation
I think this should let us fix #3310 |
Not sure if damage from collisions would be an issue. Didn't BIS disable collisions of attachTo'd objects recently? |
addons/refuel/CfgVehicles.hpp
Outdated
class GVAR(helper): Helicopter_Base_F { | ||
author = "Beswick.T"; | ||
scope = 1; | ||
model = QPATHTOF(data\helper.p3d); |
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.
Is this an actual model or just an empty dummy? One can use model = "-";
instead for no model.
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.
It's an empty dummy. Tried and it doesn't work with "-", just gives an error.
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.
What about:
model = "\A3\Weapons_f\empty";
?
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.
Will give that a shot 1 min
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.
That seems to work juuuust fine
Have done a little more playing around, and although it fixes the issue for things like the Huron fuel container, it doesn't fix it for buildings like the fuel bladder. It seems when the helper is attached to the fuel bladder, it loses simulation. Detach it and it's fine. Unsure how to get around that...is there a way to make an object static in a position without disabling simulation? Edit: I've found a solution where the helper object simply is not attachTo'd the target object. The rope simulation works fine now, and using hideObjectGlobal ensures collisions don't occur. I am having some issues with the position of the rope now though. It's not taking into account object rotation. |
If the simulation type is thingX, which handles attachTo just fine with rope simulation, it will use that, otherwise it will set the helper position, direction, and vectorUp to the same as the target's, resulting in proper positioning. This should be fine, as it's not everyday a house or fuel pump gets up and walks away. Hope this satisfies :) |
…uction effects of helper object.
Could you explain a little more in your OP what this does and what's being improved? And it would be helpful when writing the change logs. |
private _ropeTarget = _target; | ||
if (!(_target isKindOf "AllVehicles")) then { | ||
private _helper = QGVAR(helper) createVehicle [0,0,0]; | ||
hideObjectGlobal _helper; |
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.
Keep in mind this has to run on the server, there is an event in common that can handle the locality:
[QEGVAR(common,hideObjectGlobal), [_helper, true]] call CBA_fnc_serverEvent;
To give @bux some context: This adds a workaround which makes it possible to have a fuel hose (an arma rope) coming from a non-physx object (limitation of |
Pushed some config changes to disable actions on the helper IIRC it's a little dangerous to |
@@ -37,7 +37,7 @@ class Extended_InitPost_EventHandlers { | |||
class Helicopter { | |||
class ADDON { | |||
init = QUOTE(_this call DFUNC(addRepairActions)); | |||
exclude[] = {QEGVAR(fastroping,helper), "ACE_friesBase"}; | |||
exclude[] = {QEGVAR(fastroping,helper), "ACE_friesBase", QEGVAR(refuel,helper)}; |
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.
I believe this fastroping helper does not need to be here anymore.
@PabstMirror just so I can understand better, when you say streaming is that to do with view distance? So the vars are there when in view but if you go far away and back the vars might not be there? |
@tbeswick96 Correct. I think the gains are well worth it, maybe we could have a map of building positions to data that would allow that to be persistent. But I'd say that's for another PR anyways. |
http://killzonekid.com/arma-scripting-tutorials-variables-part-3/
|
Can just change the setVar to be on the nozzle instead if that is preferred? Not sure about the other setVars on the target |
When merged this pull request will:
This adds a workaround which makes it possible to have a fuel hose (an arma rope) coming from a non-physx object (limitation of ropeCreate) by using an invisible helper object which the rope is connected to instead - such that it looks like it connects to the actual object.
This has been used for sling-loadable fuel barrels for a number of weeks with no issues. These can be found here: https://github.com/uksf/modpack/blob/master/addons/vehicles/CfgVehicles.hpp#L102