-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from jonpas/towingClean
Towing Fixes & Additions & Cleanup
- Loading branch information
Showing
18 changed files
with
320 additions
and
140 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ace_towing | ||
=============== | ||
|
||
Adds ability to tow vehicles with tow bar and tilt flipped vehicles with ropes. | ||
|
||
## Maintainers | ||
|
||
The people responsible for merging changes to this component or answering potential questions. | ||
|
||
- [GitHawk] (https://github.com/GitHawk) | ||
- [Jonpas] (https://github.com/jonpas) |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Author: GitHawk | ||
* Check if a unit can connect a tilt cable. | ||
* | ||
* Arguments: | ||
* 0: Target <OBJECT> | ||
* 1: Unit <OBJECT> | ||
* | ||
* Return Value: | ||
* Can Connect <BOOL> | ||
* | ||
* Example: | ||
* [tank, player] call ace_towing_fnc_canConnectTiltCable | ||
* | ||
* Public: No | ||
*/ | ||
#include "script_component.hpp" | ||
|
||
params ["_target", "_unit"]; | ||
|
||
!(_target distance _unit > TOWING_ACTION_DISTANCE) && | ||
{isNil {_target getVariable QGVAR(tiltUp)}} && | ||
{isNil {_unit getVariable QGVAR(towConnecting)}} && | ||
{((vectorUp _target) select 2) < 0.7 || _unit getVariable [QGVAR(isTilting), 0] == 1} |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Author: Jonpas | ||
* Check if a unit can connect a tow bar. | ||
* | ||
* Arguments: | ||
* 0: Target <OBJECT> | ||
* 1: Unit <OBJECT> | ||
* | ||
* Return Value: | ||
* Can Connect <BOOL> | ||
* | ||
* Example: | ||
* [tank, player] call ace_towing_fnc_canConnectTowBar | ||
* | ||
* Public: No | ||
*/ | ||
#include "script_component.hpp" | ||
|
||
params ["_target", "_unit"]; | ||
|
||
!(_target distance _unit > TOWING_ACTION_DISTANCE) && | ||
{isNil {_target getVariable QGVAR(isTowing)}} && | ||
{isNil {_target getVariable QGVAR(isTowed)}} && | ||
{_unit getVariable [QGVAR(isTilting), 0] == 0} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Author: GitHawk | ||
* Check if a unit can cut a tilt cable. | ||
* | ||
* Arguments: | ||
* 0: Target <OBJECT> | ||
* 1: Unit <OBJECT> | ||
* | ||
* Return Value: | ||
* Can Disconnect <BOOL> | ||
* | ||
* Example: | ||
* [tank, player] call ace_logistics_fnc_canDisconnectTiltCable | ||
* | ||
* Public: No | ||
*/ | ||
#include "script_component.hpp" | ||
|
||
params ["_target", "_unit"]; | ||
|
||
!(_target distance _unit > TOWING_ACTION_DISTANCE) && | ||
{_target getVariable [QGVAR(tiltUp), _unit] == _unit} && | ||
{_unit getVariable [QGVAR(isTilting), 0] == 2} |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Author: Jonpas | ||
* Check if a unit can disconnect a tow bar. | ||
* | ||
* Arguments: | ||
* 0: Target <OBJECT> | ||
* 1: Unit <OBJECT> | ||
* | ||
* Return Value: | ||
* Can Disconnect <BOOL> | ||
* | ||
* Example: | ||
* [tank, player] call ace_logistics_fnc_canDisconnectTowBar | ||
* | ||
* Public: No | ||
*/ | ||
#include "script_component.hpp" | ||
|
||
params ["_target", "_unit"]; | ||
|
||
!(_target distance _unit > TOWING_ACTION_DISTANCE) && | ||
{!isNil {_target getVariable QGVAR(isTowing)} || !isNil {_target getVariable QGVAR(isTowed)}} |
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
Oops, something went wrong.