Skip to content

Commit b969b39

Browse files
authored
Map - Update map lighting framework (#11246)
Update map docs for lighting
1 parent 498f298 commit b969b39

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

addons/map/functions/fnc_determineMapLight.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if (
2525
_vehicle != _unit
2626
&& {!isTurnedOut _unit}
2727
&& GVAR(vehicleLightCondition)
28-
&& {!((_unit call CBA_fnc_turretPath) in GVAR(vehicleExteriorTurrets))}
28+
&& {!((_vehicle unitTurret _unit) in GVAR(vehicleExteriorTurrets))}
2929
) exitWith {
3030
TRACE_1("Player in a enclosed vehicle",GVAR(vehicleLightColor));
3131
[GVAR(vehicleLightColor) isNotEqualTo [1,1,1,0], GVAR(vehicleLightColor)]

docs/wiki/framework/map-framework.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,20 @@ version:
1616

1717
### 1.1 Vehicle Interior Lighting
1818

19+
{% raw %}
1920
```cpp
2021
class CfgVehicles {
2122
class MyCar {
2223
// Sets color of light projected onto player's map
2324
ace_map_vehicleLightColor[] = {0,1,0,0.1};
2425

25-
// Lists turret indexes that are outside of the vehicle and would not receive interior lighting (e.g. riding on top of a tank)
26-
ace_map_vehicleExteriorTurrets[] = {12,13};
26+
// Lists turret indexes that are outside of the vehicle and would not receive interior lighting (e.g. riding on top of a tank)
27+
// Use {-1} for driver turret
28+
ace_map_vehicleExteriorTurrets[] = {{12},{13}};
2729

28-
// Condition for interior lights to be working (string that when compiled and call should return a bool, will be passed _vehicle)
30+
// Condition for interior lights to be working (string that when compiled and call should return a bool, will be passed _vehicle)
2931
ace_map_vehicleLightCondition[] = "(_vehicle animationSourcePhase 'cabinlights_hide') == 1";
3032
};
3133
};
3234
```
35+
{% endraw %}

0 commit comments

Comments
 (0)