mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
Note @icomrade : 1.0.6 test servers need to empty object_data or run the SQL query linked below before applying this update. http://epochmod.com/forum/topic/15813-release-v105-precise-base-building-persistent-bases-after-restart-updated-220915/#comment-118663
32 lines
867 B
Plaintext
32 lines
867 B
Plaintext
// KK_Functions
|
|
//
|
|
// by KillZoneKid (http://killzonekid.com/)
|
|
//
|
|
//
|
|
|
|
// Precise positioning functions.
|
|
|
|
KK_fnc_floatToString = {
|
|
private "_arr";
|
|
if (abs (_this - _this % 1) == 0) exitWith { str _this };
|
|
_arr = toArray str abs (_this % 1);
|
|
_arr set [0, 32];
|
|
toString (toArray str (
|
|
abs (_this - _this % 1) * _this / abs _this
|
|
) + _arr - [32])
|
|
};
|
|
|
|
KK_fnc_positionToString = {
|
|
format [
|
|
"[%1,%2,%3]",
|
|
_this select 0 call KK_fnc_floatToString,
|
|
_this select 1 call KK_fnc_floatToString,
|
|
_this select 2 call KK_fnc_floatToString
|
|
]
|
|
};
|
|
|
|
AN_fnc_formatWorldspace = {
|
|
private "_ws";
|
|
_ws = toArray str _this;
|
|
format ["[%1,%2%3]", _this select 0 call KK_fnc_floatToString, _this select 1 call KK_fnc_positionToString, toString ([_ws, (_ws find 93) + 1, count _ws - 2] call BIS_fnc_subSelect)]
|
|
}; |