mirror of
https://github.com/Ghostrider-DbD-/GMS_RC.git
synced 2024-08-30 16:02:11 +00:00
tweaked player detection
Missions are triggered if a player is on foot or in a vehicle. the playerNear condition is met as long as the player is less than 5 meters above the ground, in a vehicle or on foot.
This commit is contained in:
parent
ba1cf2399f
commit
5491df83b1
@ -50,9 +50,9 @@ for "_i" from 1 to (count _missionsList) do
|
||||
if ((_missionTimeoutAt > 0) && {diag_tickTime > _missionTimeoutAt}) then
|
||||
{
|
||||
_monitorAction = -1;
|
||||
//diag_log format["_monitorInitializedMissions (37) Mission Timeout Criteria Met at %1",diag_tickTime];
|
||||
diag_log format["_monitorInitializedMissions (37) Mission Timeout Criteria Met at %1",diag_tickTime];
|
||||
} else {
|
||||
_playerInRange = if ({(_x distance2d missionCoords) < GMS_TriggerDistance && ((vehicle _x == _x) || (getPosATL _x) select 2 < 5)} count allPlayers > 0) then {true} else {false};
|
||||
_playerInRange = if ({(_x distance2d missionCoords) < GMS_TriggerDistance /*&& ((vehicle _x == _x) || (getPosATL _x) select 2 < 5)*/} count allPlayers > 0) then {true} else {false};
|
||||
//diag_log format["_monitorInitializedMissions(56): _playerInRange = %1",_playerInRange];
|
||||
if (_playerInRange) then {
|
||||
//diag_log format["_monitorInitializedMissions (52) Player in range criteria met at %1 for _key %2",diag_tickTime,_key];
|
||||
@ -67,7 +67,7 @@ for "_i" from 1 to (count _missionsList) do
|
||||
};
|
||||
};
|
||||
|
||||
if (GMS_debugLevel > 0) then {[format["_monitorInitializedMissions (68): time %1 | _monitorAction %2 | _missionConfigs %3",diag_tickTime,_monitorAction,_missionConfigs]] call GMS_fnc_log};
|
||||
//if (GMS_debugLevel > 0) then {[format["_monitorInitializedMissions (68): time %1 | _monitorAction %2 | _missionConfigs %3",diag_tickTime,_monitorAction,_missionConfigs]] call GMS_fnc_log};
|
||||
|
||||
switch (_monitorAction) do
|
||||
{
|
||||
@ -159,7 +159,7 @@ for "_i" from 1 to (count _missionsList) do
|
||||
];
|
||||
*/
|
||||
|
||||
_missionConfigs set[isSpawned, true];
|
||||
//_missionConfigs set[isSpawned, true];
|
||||
_missionConfigs set[spawnedAt, diag_tickTime];
|
||||
|
||||
_missionsList pushBack _el;
|
||||
|
@ -105,7 +105,7 @@ for "_i" from 1 to (count _missionsList) do
|
||||
// _spawnedAt is set only after everything is spawned so just having a small safety factor of 60 seconds should be enough to be sure no one can complete the mission
|
||||
// until everything is spawned and settled.
|
||||
|
||||
private _playerIsNear = if ({(((_x distance2d _coords) < 10)) && ((vehicle _x == _x))} count allPlayers > 0) then {true} else {false};
|
||||
private _playerIsNear = if ({(((_x distance2d _coords) < 20)) && (((getPosATL _x) select 2) < 5 /*((vehicle _x == _x)*/ )} count allPlayers > 0) then {true} else {false};
|
||||
//GMS_playerIsNear = _playerIsnear;
|
||||
|
||||
private _minNoAliveForCompletion = (count _missionInfantry) - (round(GMS_killPercentage * (count _missionInfantry)));
|
||||
@ -237,7 +237,7 @@ for "_i" from 1 to (count _missionsList) do
|
||||
switch (_exception) do
|
||||
{
|
||||
case 1: { // Normal Mission End
|
||||
//diag_log format["_monitorSpawnedMissions: (200): _markerMissionName %1: Normal mission end",_markerMissionName];
|
||||
diag_log format["_monitorSpawnedMissions: (200): _markerMissionName %1: Normal mission end",_markerMissionName];
|
||||
|
||||
if ((_spawnCratesTiming) in ["atMissionEndGround","atMissionEndAir"]) then
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user