-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevented sitting on flipped chairs, Stand when chair gets knocked aw…
…ay/otherwise moves
- Loading branch information
Showing
6 changed files
with
51 additions
and
10 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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Author: Jonpas | ||
* Checks if chair moved from original position. | ||
* | ||
* Arguments: | ||
* 0: Seat <OBJECT> | ||
* 1: Seat Position <ARRAY> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [seat, seatPos] call ace_sitting_fnc_hasChairMoved; | ||
* | ||
* Public: No | ||
*/ | ||
//#define DEBUG_MODE_FULL | ||
#include "script_component.hpp" | ||
|
||
PARAMS_2(_seat,_seatPosOrig); | ||
|
||
TRACE_2("Chair position",_seatPosOrig,getPosASL _seat); | ||
|
||
// Check each coordinate due to possibility of tiny movements in simulation | ||
(getPosASL _seat) select 0 < (_seatPosOrig select 0) - 0.01 || {(getPosASL _seat) select 0 > (_seatPosOrig select 0) + 0.01} || | ||
{(getPosASL _seat) select 1 < (_seatPosOrig select 1) - 0.01 || {(getPosASL _seat) select 1 > (_seatPosOrig select 1) + 0.01}} || | ||
{(getPosASL _seat) select 2 < (_seatPosOrig select 2) - 0.01 || {(getPosASL _seat) select 2 > (_seatPosOrig select 2) + 0.01}} |
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