-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix killer marker behaviour and prevent cops from seeing jail situati…
…on from the map markers (#60) * Fix killer marker not going back to red if he's armed * Prevent cops from seeing "hidden" killer marker in jail and shortly after release * Fix compilation * Fix isHandcuffed returning nil every time * Remove redundant empty line * Remove cop/killer marker on death
- Loading branch information
Showing
11 changed files
with
100 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: 3Mydlo3 | ||
* Function checks if a unit is handcuffed. | ||
* | ||
* Arguments: | ||
* 0: Unit to check <UNIT> | ||
* | ||
* Return Value: | ||
* True if unit is handcuffed (alive, but can't move on it's own) <BOOL> | ||
* | ||
* Example: | ||
* [bob] call afsk_jail_fnc_isHandcuffed | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_unit"]; | ||
|
||
if (EGVAR(common,ACE_Loaded)) then { | ||
_unit getVariable [QACEGVAR(captives,isHandcuffed), false] | ||
} else { | ||
_unit getVariable [QEGVAR(jail,isImprisoned), false] | ||
}; |
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 |
---|---|---|
|
@@ -12,3 +12,5 @@ | |
#endif | ||
|
||
#include "\z\afsk\addons\main\script_macros.hpp" | ||
|
||
#define RECENTLY_FREED_TIMEOUT 60 |
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
33 changes: 33 additions & 0 deletions
33
addons/markers/functions/fnc_createOrUpdateKillerMarker.sqf
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,33 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: 3Mydlo3 | ||
* Function creates or updates marker for given killer. | ||
* | ||
* Arguments: | ||
* 0: Unit to create marker for <OBJECT> | ||
* 1: Is it hide marker? <BOOL> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [player] call afsk_markers_fnc_createKillerMarker | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_killer", ["_hidden", false]]; | ||
|
||
private _marker = _killer getVariable [QGVAR(marker), ""]; | ||
|
||
if (_marker isEqualTo "") then { | ||
_marker = [_killer, _hidden] call FUNC(createKillerMarker); | ||
} else { | ||
_marker setMarkerPosLocal (position _killer); | ||
|
||
if (_hidden) then { | ||
_marker setMarkerColorLocal "ColorGreen"; | ||
} else { | ||
_marker setMarkerColorLocal "ColorRed"; | ||
}; | ||
}; |
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