mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Update keyboard eventhandler and add rules.sqf
See: https://github.com/EpochModTeam/DayZ-Epoch/pull/1673
This commit is contained in:
28
SQF/dayz_code/compile/fn_buildCamera.sqf
Normal file
28
SQF/dayz_code/compile/fn_buildCamera.sqf
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
if (0 != count Dayz_constructionContext) then {
|
||||
if (!(Dayz_constructionContext select 3)) then {
|
||||
_ghost = Dayz_constructionContext select 0;
|
||||
if (abs(([_ghost, player] call BIS_fnc_distance2D) - (1 + (sizeOf (typeOf _ghost)) * 0.5)) < 1) then {
|
||||
showCinemaBorder false;
|
||||
Dayz_BuildCamera = "camera" camCreate (player modeltoWorld [0,0,2]);
|
||||
0.2 fadeSound 0.1;
|
||||
Dayz_BuildCamera cameraeffect ["External", "TOP"];
|
||||
Dayz_BuildCamera camcommit 0;
|
||||
Dayz_BuildCamera camsettarget _ghost;
|
||||
Dayz_BuildCamera camsetFov 0.1;
|
||||
Dayz_BuildCamera camsetrelpos [-1,0,60];
|
||||
Dayz_BuildCamera camcommit 0;
|
||||
Dayz_constructionContext set [3, true];
|
||||
cutText [localize "str_buildCameraOn", "PLAIN DOWN"];
|
||||
};
|
||||
}
|
||||
else {
|
||||
Dayz_BuildCamera cameraeffect ["terminate", "TOP"];
|
||||
0.2 fadeSound 1;
|
||||
player switchCamera (Dayz_constructionContext select 2);
|
||||
camdestroy Dayz_BuildCamera;
|
||||
Dayz_constructionContext set [3, false];
|
||||
cutText [localize "str_buildCameraOff", "PLAIN DOWN"];
|
||||
};
|
||||
_handled = true; // used by keyboard.sqf
|
||||
};
|
||||
Reference in New Issue
Block a user