mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
don't use owner for RE targets
http://epochmod.com/forum/topic/41959-be-carefull-with-remoteexec-and-owner/#comment-275436
This commit is contained in:
parent
e691fe1247
commit
8d407973a0
@ -81,7 +81,7 @@ if (typeOf _object == "PlotPole_EPOCH") then {
|
||||
_playerCryptoLimit params ["_playerCryptoLimitMax","_playerCryptoLimitMin"];
|
||||
_current_crypto = ((_current_crypto - _counter) min _playerCryptoLimitMax) max _playerCryptoLimitMin;
|
||||
|
||||
_current_crypto remoteExec ['EPOCH_effectCrypto',(owner _player)];
|
||||
_current_crypto remoteExec ['EPOCH_effectCrypto',_player];
|
||||
|
||||
_vars set[_cIndex, _current_crypto];
|
||||
_player setVariable["VARS", _vars];
|
||||
|
@ -40,7 +40,7 @@ if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
|
||||
_playerCryptoLimit params ["_playerCryptoLimitMax","_playerCryptoLimitMin"];
|
||||
_current_crypto = ((_current_crypto - _upgradePrice) min _playerCryptoLimitMax) max _playerCryptoLimitMin;
|
||||
// send to player
|
||||
_current_crypto remoteExec ['EPOCH_effectCrypto',(owner _player)];
|
||||
_current_crypto remoteExec ['EPOCH_effectCrypto',_player];
|
||||
_vars set[_cIndex, _current_crypto];
|
||||
_player setVariable["VARS", _vars];
|
||||
|
||||
|
@ -267,7 +267,7 @@ if (_slot != -1) then {
|
||||
_playerCryptoLimit params ["_playerCryptoLimitMax","_playerCryptoLimitMin"];
|
||||
_current_crypto = ((_current_cryptoRaw + _tradeTotal) min _playerCryptoLimitMax) max _playerCryptoLimitMin;
|
||||
// send to player
|
||||
_current_crypto remoteExec ['EPOCH_effectCrypto',(owner _player)];
|
||||
_current_crypto remoteExec ['EPOCH_effectCrypto',_player];
|
||||
_vars set[_cIndex, _current_crypto];
|
||||
_player setVariable["VARS", _vars];
|
||||
};
|
||||
|
@ -44,7 +44,7 @@ if ((_player1 getVariable["currentTradeKey", -1]) isEqualto (_player2 getVariabl
|
||||
|
||||
_current_crypto1 = ((_current_crypto1 - _tradeCryptoOffer1) min _playerCryptoLimitMax) max _playerCryptoLimitMin;
|
||||
// send to player
|
||||
_current_crypto1 remoteExec ['EPOCH_effectCrypto',(owner _player1)];
|
||||
_current_crypto1 remoteExec ['EPOCH_effectCrypto',_player1];
|
||||
_player1_vars set[_cIndex, _current_crypto1];
|
||||
_player1 setVariable["VARS", _player1_vars];
|
||||
};
|
||||
@ -64,7 +64,7 @@ if ((_player1 getVariable["currentTradeKey", -1]) isEqualto (_player2 getVariabl
|
||||
|
||||
_current_crypto1 = ((_current_crypto1 + _tradeCryptoOffer2) min _playerCryptoLimitMax) max _playerCryptoLimitMin;
|
||||
// send to player
|
||||
_current_crypto1 remoteExec ['EPOCH_effectCrypto',(owner _player1)];
|
||||
_current_crypto1 remoteExec ['EPOCH_effectCrypto',_player1];
|
||||
_player1_vars set[_cIndex, _current_crypto1];
|
||||
_player1 setVariable["VARS", _player1_vars];
|
||||
};
|
||||
|
@ -33,7 +33,7 @@ if (_getCrypto > 0) then {
|
||||
_playerCryptoLimit params ["_playerCryptoLimitMax","_playerCryptoLimitMin"];
|
||||
_current_crypto = ((_current_crypto + _getCrypto) min _playerCryptoLimitMax) max _playerCryptoLimitMin;
|
||||
// send to player
|
||||
_current_crypto remoteExec ['EPOCH_effectCrypto',(owner _player)];
|
||||
_current_crypto remoteExec ['EPOCH_effectCrypto',_player];
|
||||
_vars set[_cIndex, _current_crypto];
|
||||
_player setVariable["VARS", _vars];
|
||||
};
|
||||
|
@ -76,10 +76,10 @@ if (_logic) then {
|
||||
} else {
|
||||
if (_value) then {
|
||||
// send to player
|
||||
[_vehicle, true] remoteExec ['EPOCH_client_lockVehicle',(owner _vehicle)];
|
||||
[_vehicle, true] remoteExec ['EPOCH_client_lockVehicle',_vehicle];
|
||||
} else {
|
||||
// send to player
|
||||
[_vehicle, false] remoteExec ['EPOCH_client_lockVehicle',(owner _vehicle)];
|
||||
[_vehicle, false] remoteExec ['EPOCH_client_lockVehicle',_vehicle];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ if ((_value select 0) isEqualTo "ALL") then {
|
||||
if (local _vehicle) then {
|
||||
_vehicle setHitIndex _value;
|
||||
} else {
|
||||
[_vehicle, _value] remoteExec ['EPOCH_client_repairVehicle',(owner _vehicle)];
|
||||
[_vehicle, _value] remoteExec ['EPOCH_client_repairVehicle',_vehicle];
|
||||
};
|
||||
};
|
||||
_vehicle call EPOCH_server_save_vehicle;
|
||||
|
@ -1041,7 +1041,7 @@ call compile ("'"+_skn_doAdminRequest+"' addPublicVariableEventHandler {
|
||||
_cIndex = EPOCH_customVars find 'Crypto';
|
||||
_vars = _player getVariable['VARS', call EPOCH_defaultVars_SEPXVar];
|
||||
_current_crypto = (((_vars select _cIndex) + (_content select 1)) min "+str _skn_playerCryptoLimit+") max 0;
|
||||
_current_crypto remoteExec ['EPOCH_effectCrypto',(owner _player)];
|
||||
_current_crypto remoteExec ['EPOCH_effectCrypto',_player];
|
||||
_vars set[_cIndex, _current_crypto];
|
||||
_player setVariable['VARS', _vars];
|
||||
if (_player == _admin) then {
|
||||
|
@ -17,7 +17,7 @@ if ((count _position) == 2) then{
|
||||
if ((random 1) > _chance) then {
|
||||
// send earthquake to each player in zone
|
||||
{
|
||||
[_position] remoteExec ['EPOCH_client_earthQuake',(owner _x)];
|
||||
[_position] remoteExec ['EPOCH_client_earthQuake',_x];
|
||||
}forEach _playersNearEpicenter;
|
||||
|
||||
// todo configize
|
||||
|
Loading…
Reference in New Issue
Block a user