MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / UpdateObjectLight

Function UpdateObjectLight

Source/objects.cpp:1577–1592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1575}
1576
1577void UpdateObjectLight(Object &light, int lightRadius)
1578{
1579 if (light._oVar1 == -1) {
1580 return;
1581 }
1582
1583 if (IsLightVisible(light, lightRadius)) {
1584 if (light._oVar1 == 0)
1585 light._olid = AddLight(light.position, lightRadius);
1586 light._oVar1 = 1;
1587 } else {
1588 if (light._oVar1 == 1)
1589 AddUnLight(light._olid);
1590 light._oVar1 = 0;
1591 }
1592}
1593
1594void UpdateCircle(Object &circle)
1595{

Callers 1

ProcessObjectsFunction · 0.85

Calls 3

IsLightVisibleFunction · 0.85
AddLightFunction · 0.85
AddUnLightFunction · 0.85

Tested by

no test coverage detected