mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Goggles - Cache Surface Dust
This commit is contained in:
parent
3a4a02e524
commit
236ae767b5
@ -47,6 +47,8 @@ GVAR(DustHandler) = -1;
|
|||||||
GVAR(RainDrops) = objNull;
|
GVAR(RainDrops) = objNull;
|
||||||
GVAR(RainActive) = false;
|
GVAR(RainActive) = false;
|
||||||
GVAR(RainLastLevel) = 0;
|
GVAR(RainLastLevel) = 0;
|
||||||
|
GVAR(surfaceCache) = "";
|
||||||
|
GVAR(surfaceCacheIsDust) = false;
|
||||||
|
|
||||||
FUNC(CheckGlasses) = {
|
FUNC(CheckGlasses) = {
|
||||||
if (GVAR(Current) != (goggles ace_player)) then {
|
if (GVAR(Current) != (goggles ace_player)) then {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_bullets", "_position", "_surface", "_found", "_weapon", "_cloudType", "_unit"];
|
private ["_bullets", "_position", "_surface", "_weapon", "_cloudType", "_unit"];
|
||||||
EXPLODE_2_PVT(_this,_unit,_weapon);
|
EXPLODE_2_PVT(_this,_unit,_weapon);
|
||||||
if (_unit != ace_player) exitWith {true};
|
if (_unit != ace_player) exitWith {true};
|
||||||
_cloudType = "";
|
_cloudType = "";
|
||||||
@ -39,12 +39,14 @@ if (surfaceIsWater _position) exitWith {};
|
|||||||
if ((_position select 2) > 0.2) exitWith {};
|
if ((_position select 2) > 0.2) exitWith {};
|
||||||
|
|
||||||
_surface = surfaceType _position;
|
_surface = surfaceType _position;
|
||||||
|
|
||||||
|
if (_surface != GVAR(surfaceCache)) then {
|
||||||
|
GVAR(surfaceCache) = _surface;
|
||||||
_surface = ([_surface, "#"] call CBA_fnc_split) select 1;
|
_surface = ([_surface, "#"] call CBA_fnc_split) select 1;
|
||||||
_found = false;
|
GVAR(surfaceCacheIsDust) = getNumber (ConfigFile >> "CfgSurfaces" >> _surface >> "dust") >= 0.1;
|
||||||
|
};
|
||||||
|
|
||||||
_found = getNumber (ConfigFile >> "CfgSurfaces" >> _surface >> "dust") >= 0.1;
|
if (!GVAR(surfaceCacheIsDust)) exitWith {};
|
||||||
|
|
||||||
if (!_found) exitWith {};
|
|
||||||
|
|
||||||
_bullets = GETDUSTT(DBULLETS);
|
_bullets = GETDUSTT(DBULLETS);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user