Update fnc_isInsideBuilding

Made by @Victor-the-Cleaner

- If the player is inside a building but near a large open doorway or full height windows, or out on a balcony, they may be considered outside.
- The UI visual stealth icon will update accordingly, so the player will know if they need to step back from open doors or windows to regain stealth.
- dayz_inside global variable will now only affect player temperature, stealth vs zombies, and blizzard effects.
- The new dayz_insideBuilding global variable stores the building name the player is currently inside of, or null if player is outside. This may be used for modding purposes.
This commit is contained in:
A Man
2022-04-02 12:22:56 +02:00
parent 5a37ed6fec
commit e116caa815
5 changed files with 161 additions and 61 deletions

View File

@@ -491,4 +491,6 @@ if (!isDedicated) then {
["RightFoot","LeftFoot"],
["neck","pilot"]
];
dayz_insideBuilding = objNull; // building name the player is currently inside of, or objNull if player is outside
DZE_insideExceptions = ["Garage_Green_DZ","Garage_White_DZ","Garage_Brown_DZ","Garage_Grey_DZ","Wooden_shed_DZ","Wooden_shed2_DZ","WoodShack_DZ","WoodShack2_DZ","StorageShed_DZ","StorageShed2_DZ","Concrete_Bunker_DZ","Concrete_Bunker_Locked_DZ","SandNestLarge_DZ"]; // list of base-building objects that allow checking if player is inside (fnc_isInsideBuilding)
};