mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
0.3.9.0 b553
Zombies: fixed issue with multiple targets moved CfgSounds and CfgSay3Dhandler to mission file added new mission config (CfgSwitchMovehandler) for EPOCH_server_handle_switchMove function minor cleanup to EPOCH_server_handle_say3D usages.
This commit is contained in:
parent
66c49bc440
commit
8f3b06f0f4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -12,18 +12,17 @@
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_antiWall.sqf
|
||||
*/
|
||||
private ["_worldPos","_front","_dirTo","_front2"];
|
||||
private ["_start","_end","_dirTo"];
|
||||
params ["_unit","_position","_vehicle"];
|
||||
if (_unit == player) then {
|
||||
_worldPos = getPosATLVisual _vehicle;
|
||||
_worldPos set[2, (_worldPos select 2) + 1];
|
||||
_front = _worldPos;
|
||||
_start = getPosWorld _vehicle;
|
||||
// _worldPos set[2, (_worldPos select 2) + 1];
|
||||
_dirTo = _vehicle getDir player;
|
||||
_front2 = _vehicle getPos [(_vehicle distance player) + 1, _dirTo];
|
||||
_end = _vehicle getPos [(_vehicle distance player) + 1, _dirTo];
|
||||
{
|
||||
if (_x isKindOf "Const_All_Walls_F") exitWith{
|
||||
player moveInAny _vehicle;
|
||||
EPOCH_antiWallCount = EPOCH_antiWallCount + 1;
|
||||
};
|
||||
} forEach lineintersectsobjs[ATLToASL _front, ATLToASL _front2, player, _vehicle, true, 2];
|
||||
} forEach lineintersectsobjs[_start, AGLToASL _end, player, _vehicle, true, 2];
|
||||
};
|
||||
|
@ -37,7 +37,7 @@ _unit = createAgent[_unitClass, position player, [], _zRange, "FORM"];
|
||||
//};
|
||||
_unit call _disableAI;
|
||||
_unit switchMove "AmovPercMstpSnonWnonDnon_SaluteOut";
|
||||
[[_unit,player], 4, Epoch_personalToken] remoteExec ["EPOCH_server_handle_switchMove",2];
|
||||
[player, "AmovPercMstpSnonWnonDnon_SaluteOut", Epoch_personalToken, _unit] remoteExec ["EPOCH_server_handle_switchMove",2];
|
||||
|
||||
_unit setmimic "dead";
|
||||
_unit setface (selectRandom ["RyanZombieFace1", "RyanZombieFace2", "RyanZombieFace3", "RyanZombieFace4", "RyanZombieFace5"]);
|
||||
|
@ -30,19 +30,6 @@ if !(_target isEqualTo player) then {
|
||||
} else {
|
||||
|
||||
if !(isNull _unit && alive _unit) then {
|
||||
_distance = 5;
|
||||
_toxicChance = 0.1;
|
||||
_bleedChance = 1;
|
||||
_bloodpChance = 0;
|
||||
_fatigueChance = 0.1;
|
||||
_bleedAmount = 30;
|
||||
_bloodpAmount = 2;
|
||||
_soundEffect = "";
|
||||
_soundEffectGlobal = -1;
|
||||
_animationEffect = "";
|
||||
_animationEffectGlobal = -1;
|
||||
_canSee = false;
|
||||
_ppEffect = 0;
|
||||
|
||||
_cfgObjectInteraction = (('CfgObjectInteractions' call EPOCH_returnConfig) >> (typeOf _unit));
|
||||
if (isClass _cfgObjectInteraction) then {
|
||||
@ -64,70 +51,75 @@ if !(_target isEqualTo player) then {
|
||||
_animationEffectGlobal = getNumber (_cfgObjectInteraction >> "animationEffectGlobal");
|
||||
_canSee = call compile (getText (_cfgObjectInteraction >> "canSee"));
|
||||
_ppEffect = getNumber (_cfgObjectInteraction >> "ppEffect");
|
||||
};
|
||||
|
||||
if ((_unit distance player) < _distance && _canSee) then {
|
||||
if ((_unit distance player) < _distance && _canSee) then {
|
||||
|
||||
if (_soundEffect isEqualType []) then {
|
||||
_soundEffect params ["_soundEffectFinal",["_soundEffectRange",0]];
|
||||
playSound3D [_soundEffectFinal, _unit, false, getPosASL _unit, 1, 1, _soundEffectRange];
|
||||
} else {
|
||||
_soundEffectIndex = EPOCH_sounds find _soundEffect;
|
||||
if (_soundEffectIndex != -1) then {
|
||||
_unit say3D _soundEffect;
|
||||
if (_soundEffectGlobal != -1) then {
|
||||
[player, _unit, _soundEffectIndex, Epoch_personalToken] remoteExec ["EPOCH_server_handle_say3D",2];
|
||||
_say3dsoundsConfig = 'CfgSay3Dhandler' call EPOCH_returnConfig;
|
||||
_switchMovehandlerConfig = 'CfgSwitchMovehandler' call EPOCH_returnConfig;
|
||||
|
||||
if (_soundEffect isEqualType []) then {
|
||||
_soundEffect params ["_soundEffectFinal",["_soundEffectRange",0]];
|
||||
playSound3D [_soundEffectFinal, _unit, false, getPosASL _unit, 1, 1, _soundEffectRange];
|
||||
} else {
|
||||
_selectedSound = (_say3dsoundsConfig >> _soundEffect);
|
||||
if (isClass _selectedSound) then {
|
||||
_unit say3D _soundEffect;
|
||||
if (_soundEffectGlobal isEqualTo 1) then {
|
||||
[player, _unit, _soundEffect, Epoch_personalToken] remoteExec ["EPOCH_server_handle_say3D",2];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (_animationEffect != "") then {
|
||||
_unit switchMove _animationEffect;
|
||||
if (_animationEffectGlobal != -1) then {
|
||||
[[_unit,player], _animationEffectGlobal, Epoch_personalToken] remoteExec ["EPOCH_server_handle_switchMove",2];
|
||||
};
|
||||
};
|
||||
|
||||
if (random 1 < _toxicChance) then {
|
||||
EPOCH_playerToxicity = (EPOCH_playerToxicity + (random(100 - EPOCH_playerImmunity))) min 100;
|
||||
};
|
||||
if (random 1 < _bleedChance) then {
|
||||
player setBleedingRemaining((getBleedingRemaining player) + _bleedAmount);
|
||||
};
|
||||
if (random 1 < _bloodpChance) then {
|
||||
EPOCH_playerBloodP = (EPOCH_playerBloodP + (_bloodpAmount + (EPOCH_playerBloodP - 100))) min 190;
|
||||
if (_ppEffect == 1) then {
|
||||
[] spawn{
|
||||
_ppGrain = ppEffectCreate["filmGrain", 2005];
|
||||
_ppChrom = ppEffectCreate["chromAberration", 2006];
|
||||
_ppColor = ppEffectCreate["colorCorrections", 2007];
|
||||
_ppBlur = ppEffectCreate["radialBlur", 2008];
|
||||
_ppColor ppEffectAdjust[1, 1, 0, [1.5, -1, -1.5, 0.5], [5, 3.5, -5, -0.5], [-3, 5, -5, -0.5]];
|
||||
_ppColor ppEffectCommit 5;
|
||||
_ppChrom ppEffectAdjust[0.01, 0.01, true];
|
||||
_ppChrom ppEffectCommit 5;
|
||||
_ppBlur ppEffectAdjust[0.02, 0.02, 0.15, 0.15];
|
||||
_ppBlur ppEffectCommit 5;
|
||||
_ppGrain ppEffectAdjust[0.1, -1, 0.05, 0.05, 2, false];
|
||||
_ppGrain ppEffectCommit 1;
|
||||
_ppGrain ppEffectEnable true;
|
||||
_ppChrom ppEffectEnable true;
|
||||
_ppColor ppEffectEnable true;
|
||||
_ppBlur ppEffectEnable true;
|
||||
uiSleep 2;
|
||||
_ppColor ppEffectAdjust[1, 1, -0.01, [0.0, 0.0, 0.0, 0.0], [1.5, 1, 1.2, 0.6], [0.199, 0.587, 0.114, 0.20]];
|
||||
_ppColor ppEffectCommit 5;
|
||||
_ppChrom ppEffectAdjust[0, 0, true];
|
||||
_ppChrom ppEffectCommit 5;
|
||||
_ppBlur ppEffectAdjust[0, 0, 0, 0];
|
||||
_ppBlur ppEffectCommit 5;
|
||||
uiSleep 5;
|
||||
ppEffectDestroy[_ppGrain, _ppChrom, _ppColor, _ppBlur];
|
||||
_selectedMove = (_switchMovehandlerConfig >> _animationEffect);
|
||||
if (isClass _selectedMove) then {
|
||||
_unit switchMove _animationEffect;
|
||||
if (_animationEffectGlobal isEqualTo 1) then {
|
||||
[player, _animationEffect, Epoch_personalToken, _unit] remoteExec ["EPOCH_server_handle_switchMove",2];
|
||||
};
|
||||
};
|
||||
};
|
||||
if (random 1 < _fatigueChance) then {
|
||||
player setFatigue 1;
|
||||
|
||||
if (random 1 < _toxicChance) then {
|
||||
EPOCH_playerToxicity = (EPOCH_playerToxicity + (random(100 - EPOCH_playerImmunity))) min 100;
|
||||
};
|
||||
if (random 1 < _bleedChance) then {
|
||||
player setBleedingRemaining((getBleedingRemaining player) + _bleedAmount);
|
||||
};
|
||||
if (random 1 < _bloodpChance) then {
|
||||
EPOCH_playerBloodP = (EPOCH_playerBloodP + (_bloodpAmount + (EPOCH_playerBloodP - 100))) min 190;
|
||||
// todo configize
|
||||
if (_ppEffect == 1) then {
|
||||
[] spawn{
|
||||
_ppGrain = ppEffectCreate["filmGrain", 2005];
|
||||
_ppChrom = ppEffectCreate["chromAberration", 2006];
|
||||
_ppColor = ppEffectCreate["colorCorrections", 2007];
|
||||
_ppBlur = ppEffectCreate["radialBlur", 2008];
|
||||
_ppColor ppEffectAdjust[1, 1, 0, [1.5, -1, -1.5, 0.5], [5, 3.5, -5, -0.5], [-3, 5, -5, -0.5]];
|
||||
_ppColor ppEffectCommit 5;
|
||||
_ppChrom ppEffectAdjust[0.01, 0.01, true];
|
||||
_ppChrom ppEffectCommit 5;
|
||||
_ppBlur ppEffectAdjust[0.02, 0.02, 0.15, 0.15];
|
||||
_ppBlur ppEffectCommit 5;
|
||||
_ppGrain ppEffectAdjust[0.1, -1, 0.05, 0.05, 2, false];
|
||||
_ppGrain ppEffectCommit 1;
|
||||
_ppGrain ppEffectEnable true;
|
||||
_ppChrom ppEffectEnable true;
|
||||
_ppColor ppEffectEnable true;
|
||||
_ppBlur ppEffectEnable true;
|
||||
uiSleep 2;
|
||||
_ppColor ppEffectAdjust[1, 1, -0.01, [0.0, 0.0, 0.0, 0.0], [1.5, 1, 1.2, 0.6], [0.199, 0.587, 0.114, 0.20]];
|
||||
_ppColor ppEffectCommit 5;
|
||||
_ppChrom ppEffectAdjust[0, 0, true];
|
||||
_ppChrom ppEffectCommit 5;
|
||||
_ppBlur ppEffectAdjust[0, 0, 0, 0];
|
||||
_ppBlur ppEffectCommit 5;
|
||||
uiSleep 5;
|
||||
ppEffectDestroy[_ppGrain, _ppChrom, _ppColor, _ppBlur];
|
||||
};
|
||||
};
|
||||
};
|
||||
if (random 1 < _fatigueChance) then {
|
||||
player setFatigue 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -215,12 +215,12 @@ if (vehicle player == player) then {
|
||||
if (isTouchingGround player && speed player > 10) then {
|
||||
if ((primaryWeapon player != "") && (currentWeapon player == primaryWeapon player)) then {
|
||||
player switchMove "AovrPercMrunSrasWrflDf";
|
||||
[player, 1, Epoch_personalToken] remoteExec ["EPOCH_server_handle_switchMove",2];
|
||||
[player, "AovrPercMrunSrasWrflDf", Epoch_personalToken] remoteExec ["EPOCH_server_handle_switchMove",2];
|
||||
_handled = true;
|
||||
} else {
|
||||
if (currentWeapon player == "") then {
|
||||
player switchMove "epoch_unarmed_jump";
|
||||
[player, 2, Epoch_personalToken] remoteExec ["EPOCH_server_handle_switchMove",2];
|
||||
[player, "epoch_unarmed_jump", Epoch_personalToken] remoteExec ["EPOCH_server_handle_switchMove",2];
|
||||
_handled = true;
|
||||
};
|
||||
};
|
||||
|
@ -51,7 +51,7 @@ while {player distance _sapper < 100 && alive player} do {
|
||||
_sounds = ["sapper_groan0","sapper_groan1","sapper_groan2"];
|
||||
_sound = selectRandom _sounds;
|
||||
_sapper say3D _sound;
|
||||
[player, _sapper,(EPOCH_sounds find _sound), Epoch_personalToken] remoteExec ["EPOCH_server_handle_say3D",2];
|
||||
[player, _sapper,_sound, Epoch_personalToken] remoteExec ["EPOCH_server_handle_say3D",2];
|
||||
};
|
||||
uiSleep 0.5;
|
||||
};
|
||||
|
@ -85,11 +85,10 @@ EPOCH_group_upgrade_lvl = ["CfgEpochClient", "group_upgrade_lvl", [4,"100",6,"30
|
||||
|
||||
// Init 3d sound handler
|
||||
EPOCH_sounds = [];
|
||||
EPOCH_soundsDistance = [];
|
||||
_say3dsounds = "isClass _x" configClasses (configFile >> "CfgSay3Dhandler");
|
||||
_say3dsoundsConfig = 'CfgSay3Dhandler' call EPOCH_returnConfig;
|
||||
_say3dsounds = "isClass _x" configClasses (_say3dsoundsConfig);
|
||||
{
|
||||
EPOCH_sounds pushBack (configName _x);
|
||||
EPOCH_soundsDistance pushBack getNumber(_x >> "distance");
|
||||
} forEach _say3dsounds;
|
||||
|
||||
// disable remote sensors on server and client as all Epoch AI is local to the side controlling it.
|
||||
|
@ -9,9 +9,9 @@ class CfgObjectInteractions {
|
||||
bleedAmount = 0;
|
||||
bloodpAmount = 0;
|
||||
soundEffect[] = {};
|
||||
soundEffectGlobal = -1;
|
||||
soundEffectGlobal = 0;
|
||||
animationEffect[] = {};
|
||||
animationEffectGlobal = -1;
|
||||
animationEffectGlobal = 0;
|
||||
canSee = "false";
|
||||
ppEffect = 0;
|
||||
aliveState = 0; // 0 = alive or dead, 1 = dead, 2 = alive.
|
||||
@ -227,7 +227,7 @@ class CfgObjectInteractions {
|
||||
soundEffect[] = {{"ryanzombies\sounds\attack1.ogg",400}, {"ryanzombies\sounds\attack2.ogg",400}, {"ryanzombies\sounds\attack3.ogg",400}, {"ryanzombies\sounds\attack4.ogg",400}, {"ryanzombies\sounds\attack5.ogg",400}};
|
||||
soundEffectGlobal = 1;
|
||||
animationEffect[] = {"AwopPercMstpSgthWnonDnon_throw"};
|
||||
animationEffectGlobal = 3;
|
||||
animationEffectGlobal = 1;
|
||||
canSee = "!(lineIntersects[eyePos _unit, aimPos _target, _unit, _target])";
|
||||
ppEffect = 0;
|
||||
interactMode = 3;
|
||||
|
64
Sources/epoch_config/Configs/CfgSay3Dhandler.hpp
Normal file
64
Sources/epoch_config/Configs/CfgSay3Dhandler.hpp
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Custom Epoch config for say3d broadcsting to nearby players.
|
||||
|
||||
Licence:
|
||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_config/Configs/CfgSounds.hpp
|
||||
*/
|
||||
class CfgSay3Dhandler {
|
||||
class snake_bite0 {
|
||||
distance = 100;
|
||||
};
|
||||
class cultist_nearby {
|
||||
distance = 100;
|
||||
};
|
||||
class dog_bark {
|
||||
distance = 750;
|
||||
};
|
||||
class dog_cry {
|
||||
distance = 600;
|
||||
};
|
||||
class hed_cluck0 {
|
||||
distance = 600;
|
||||
};
|
||||
class hed_cluck1 {
|
||||
distance = 600;
|
||||
};
|
||||
class hed_cluck2 {
|
||||
distance = 600;
|
||||
};
|
||||
class cultist_talk {
|
||||
distance = 30;
|
||||
};
|
||||
class cultist_laugh {
|
||||
distance = 30;
|
||||
};
|
||||
class cloak_death {
|
||||
distance = 30;
|
||||
};
|
||||
class drone_alert0 {
|
||||
distance = 400;
|
||||
};
|
||||
class sapper_alert0 {
|
||||
distance = 400;
|
||||
};
|
||||
class sapper_groan0 {
|
||||
distance = 400;
|
||||
};
|
||||
class sapper_groan1 {
|
||||
distance = 400;
|
||||
};
|
||||
class sapper_groan2 {
|
||||
distance = 400;
|
||||
};
|
||||
class sapper_explode {
|
||||
distance = 1000;
|
||||
};
|
||||
};
|
67
Sources/epoch_config/Configs/CfgSounds.hpp
Normal file
67
Sources/epoch_config/Configs/CfgSounds.hpp
Normal file
@ -0,0 +1,67 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
CfgSounds
|
||||
|
||||
Licence:
|
||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_config/Configs/CfgSounds.hpp
|
||||
*/
|
||||
class CfgSounds
|
||||
{
|
||||
class dog_bark
|
||||
{
|
||||
sound[] = { "@A3\Sounds_F\ambient\animals\dog1", 0.6, 1.0 };
|
||||
titles[] = {};
|
||||
};
|
||||
class dog_cry
|
||||
{
|
||||
sound[] = { "@A3\Sounds_F\ambient\animals\dog4", 0.6, 1.0 };
|
||||
titles[] = {};
|
||||
};
|
||||
class hed_cluck0
|
||||
{
|
||||
sound[] = { "@A3\Sounds_F\ambient\animals\hen1", 0.3, 1.0 };
|
||||
titles[] = {};
|
||||
};
|
||||
class hed_cluck1
|
||||
{
|
||||
sound[] = { "@A3\Sounds_F\ambient\animals\hen2", 0.3, 1.0 };
|
||||
titles[] = {};
|
||||
};
|
||||
class hed_cluck2
|
||||
{
|
||||
sound[] = { "@A3\Sounds_F\ambient\animals\hen3", 0.3, 1.0 };
|
||||
titles[] = {};
|
||||
};
|
||||
class cultist_talk
|
||||
{
|
||||
sound[] = { "@x\addons\a3_epoch_assets\sounds\cloak\cultist_banter1", 0.7, 1.0 };
|
||||
titles[] = {};
|
||||
};
|
||||
class cultist_death
|
||||
{
|
||||
sound[] = { "@x\addons\a3_epoch_assets\sounds\cloak\cultist_death", 0.7, 1.0 };
|
||||
titles[] = {};
|
||||
};
|
||||
class cultist_laugh
|
||||
{
|
||||
sound[] = { "@x\addons\a3_epoch_assets\sounds\cloak\cultist_laugh", 0.7, 1.0 };
|
||||
titles[] = {};
|
||||
};
|
||||
class cultist_nearby
|
||||
{
|
||||
sound[] = { "@x\addons\a3_epoch_assets\sounds\cloak\cultist_nearby", 0.7, 1.0 };
|
||||
titles[] = {};
|
||||
};
|
||||
class cultist_taunt
|
||||
{
|
||||
sound[] = { "@x\addons\a3_epoch_assets\sounds\cloak\cultist_taunt", 0.7, 1.0 };
|
||||
titles[] = {};
|
||||
};
|
||||
};
|
28
Sources/epoch_config/Configs/CfgSwitchMovehandler.hpp
Normal file
28
Sources/epoch_config/Configs/CfgSwitchMovehandler.hpp
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Custom Epoch config for say3d broadcsting to nearby players.
|
||||
|
||||
Licence:
|
||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_config/Configs/CfgSounds.hpp
|
||||
*/
|
||||
class CfgSwitchMovehandler {
|
||||
class AovrPercMrunSrasWrflDf {
|
||||
distance = 1000;
|
||||
};
|
||||
class epoch_unarmed_jump {
|
||||
distance = 1000;
|
||||
};
|
||||
class AwopPercMstpSgthWnonDnon_throw {
|
||||
distance = 1000;
|
||||
};
|
||||
class AmovPercMstpSnonWnonDnon_SaluteOut {
|
||||
distance = 1000;
|
||||
};
|
||||
};
|
@ -1 +1 @@
|
||||
build=552;
|
||||
build=553;
|
||||
|
@ -70,8 +70,11 @@ disableRandomization[] = {"All"};
|
||||
#include "Configs\CfgClientFunctions.hpp"
|
||||
#include "Configs\CfgObjectInteractions.hpp"
|
||||
#include "Configs\CfgItemInteractions.hpp"
|
||||
#include "Configs\CfgSay3Dhandler.hpp"
|
||||
#include "Configs\CfgSwitchMovehandler.hpp"
|
||||
|
||||
// A3 specific configs
|
||||
#include "Configs\CfgSounds.hpp"
|
||||
#include "Configs\CfgFunctions.hpp"
|
||||
#include "Configs\CfgRemoteExec.hpp"
|
||||
|
||||
|
@ -1 +1 @@
|
||||
build=552;
|
||||
build=553;
|
||||
|
@ -13,18 +13,20 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_antagonists/EPOCH_server_handle_say3D.sqf
|
||||
*/
|
||||
private["_range", "_nearBy", "_sound"];
|
||||
params ["_player",["_target",objNull],["_soundIndex",-1], ["_token","",[""]]];
|
||||
params [["_player",objNull,[objNull]],["_target",objNull],["_sound","",[""]], ["_token","",[""]]];
|
||||
|
||||
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
|
||||
if (isNull _target) exitWith {};
|
||||
if (isNull _target) then {_target = _player};
|
||||
|
||||
_sound = EPOCH_sounds param [_soundIndex,-1];
|
||||
if !(_sound isEqualTo -1) then {
|
||||
_range = getNumber(configFile >> "CfgSay3Dhandler" >> _sound >> "distance");
|
||||
_nearBy = _target nearEntities [["Epoch_Male_F","Epoch_Female_F","LandVehicle","Ship","Air","Tank"], _range];
|
||||
{
|
||||
if (isPlayer _x) then {
|
||||
[_target,_sound] remoteExec ['say3D',_x];
|
||||
}
|
||||
}forEach (_nearBy - [_player]); //_this select 0 == the caller, play the sound already locally!
|
||||
_say3dsoundsConfig = 'CfgSay3Dhandler' call EPOCH_returnConfig;
|
||||
_selectedSound = (_say3dsoundsConfig >> _sound);
|
||||
if (isClass _selectedSound) then {
|
||||
// get nearby players based on range
|
||||
_range = getNumber(_selectedSound >> "distance");
|
||||
_nearBy = (_target nearEntities [["Epoch_Male_F","Epoch_Female_F","LandVehicle","Ship","Air","Tank"], _range]) select {isPlayer _x};
|
||||
// send sound to everyone except caller.
|
||||
_targets = _nearBy - [_player];
|
||||
if !(_targets isEqualTo []) then {
|
||||
[_target, _sound] remoteExec ['say3D',_targets];
|
||||
};
|
||||
};
|
||||
|
@ -11,40 +11,28 @@
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_antagonists/EPOCH_server_handle_switchMove.sqf
|
||||
|
||||
Usage:
|
||||
[_player,"moveName","token",_target] call EPOCH_server_handle_switchMove;
|
||||
or
|
||||
[_player,"moveName","token"] call EPOCH_server_handle_switchMove;
|
||||
*/
|
||||
private["_range", "_move", "_nearBy"];
|
||||
params ["_target","_moveCase",["_token","",[""]]];
|
||||
_player = _target;
|
||||
if (_target isEqualType []) then {
|
||||
_target params ["_target","_player"];
|
||||
};
|
||||
params [["_player",objNull,[objNull]],["_move","",[""]],["_token","",[""]],["_target",objNull]];
|
||||
|
||||
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
|
||||
_range = 0;
|
||||
_move = "";
|
||||
if (_move isEqualTo "") exitWith {};
|
||||
if (isNull _target) then {_target = _player};
|
||||
|
||||
// TODO configize
|
||||
switch (_moveCase) do {
|
||||
case 1: {
|
||||
_range = 1000;
|
||||
_move = "AovrPercMrunSrasWrflDf";
|
||||
};
|
||||
case 2: {
|
||||
_range = 1000;
|
||||
_move = "epoch_unarmed_jump";
|
||||
};
|
||||
case 3: {
|
||||
_range = 1000;
|
||||
_move = "AwopPercMstpSgthWnonDnon_throw";
|
||||
};
|
||||
case 4: {
|
||||
_range = 1000;
|
||||
_move = "AmovPercMstpSnonWnonDnon_SaluteOut";
|
||||
_switchMovehandlerConfig = 'CfgSwitchMovehandler' call EPOCH_returnConfig;
|
||||
_selectedMove = (_switchMovehandlerConfig >> _move);
|
||||
if (isClass _selectedMove) then {
|
||||
// get nearby players based on range
|
||||
_range = getNumber(_selectedMove >> "distance");
|
||||
_nearBy = (_target nearEntities [["Epoch_Male_F","Epoch_Female_F","LandVehicle","Ship","Air","Tank"], _range]) select {isPlayer _x};
|
||||
// send move to everyone except caller.
|
||||
_targets = _nearBy - [_player];
|
||||
if !(_targets isEqualTo []) then {
|
||||
[_target, _move] remoteExec ['switchMove',_targets];
|
||||
};
|
||||
};
|
||||
|
||||
if (_range > 0 && _move != "") then {
|
||||
_nearBy = _target nearEntities [["Epoch_Male_F","Epoch_Female_F"], _range];
|
||||
{
|
||||
[_target, _move] remoteExec ['switchMove',_x];
|
||||
}forEach (_nearBy - [_target]); //_target == the caller, already plays the animation locally!
|
||||
};
|
||||
|
@ -1 +1 @@
|
||||
build=552;
|
||||
build=553;
|
||||
|
@ -1 +1 @@
|
||||
build=552;
|
||||
build=553;
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user