-
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
cf8421f
Enabled refuel for non-AllVehicles objects. Un-magic'd refuel progres…
tbeswick96 1104a59
Changed helper attach position to centre of object. Offset applied wh…
tbeswick96 89bcca3
Made fully compatible with non-thingX simulation types. Removed destr…
tbeswick96 d8a7ef4
Using arma model. Removed ACE_Actions from helper object.
tbeswick96 08440d3
Correct use of hideObjectGlobal
tbeswick96 014c849
Merge branch 'refuelimprovements' of https://github.com/tbeswick96/AC…
PabstMirror d0298d9
Remove actions, cargo, repair on helper
PabstMirror e18fe02
Switched helper to be setVar'd on the nozzle object
tbeswick96 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ if (isNull _nozzle) then { // func is called on fuel truck | |
_endPosOffset = _endPosOffset select 0; | ||
}; | ||
[ | ||
2, | ||
REFUEL_PROGRESS_DURATION, | ||
[_unit, _target, _endPosOffset], | ||
{ | ||
params ["_args"]; | ||
|
@@ -53,11 +53,22 @@ if (isNull _nozzle) then { // func is called on fuel truck | |
_newNozzle attachTo [_unit, [-0.02,0.05,-0.12], "righthandmiddle1"]; | ||
_unit setVariable [QGVAR(nozzle), _newNozzle, true]; | ||
|
||
if (_target isKindOf "AllVehicles") then { | ||
// Currently ropeCreate requires its first parameter to be a real vehicle | ||
private _rope = ropeCreate [_target, _endPosOffset, _newNozzle, [0, -0.20, 0.12], REFUEL_HOSE_LENGTH]; | ||
_newNozzle setVariable [QGVAR(rope), _rope, true]; | ||
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 commentThe 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:
|
||
if ((getText (configFile >> "CfgVehicles" >> typeOf _target >> "simulation")) isEqualTo "thingX") then { | ||
_helper attachTo [_target, [0,0,0]]; | ||
} else { | ||
_helper setPosWorld (getPosWorld _target); | ||
_helper setDir (getDir _target); | ||
_helper setVectorUp (vectorUp _target); | ||
}; | ||
_target setVariable [QGVAR(helper), _helper, true]; | ||
_ropeTarget = _helper; | ||
}; | ||
private _rope = ropeCreate [_ropeTarget, _endPosOffset, _newNozzle, [0, -0.20, 0.12], REFUEL_HOSE_LENGTH]; | ||
_newNozzle setVariable [QGVAR(rope), _rope, true]; | ||
_newNozzle setVariable [QGVAR(attachPos), _endPosOffset, true]; | ||
_newNozzle setVariable [QGVAR(source), _target, true]; | ||
|
||
|
@@ -93,7 +104,7 @@ if (isNull _nozzle) then { // func is called on fuel truck | |
] call EFUNC(common,progressBar); | ||
} else { // func is called on muzzle either connected or on ground | ||
[ | ||
2, | ||
REFUEL_PROGRESS_DURATION, | ||
[_unit, _nozzle], | ||
{ | ||
params ["_args"]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
?
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