Skip to content

Commit dd8763b

Browse files
committed
OpenGL: fixed lights from anomalies, actor torch, campfires
1 parent 32d64c1 commit dd8763b

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

src/xrGame/CustomZone.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,7 @@ BOOL CCustomZone::net_Spawn(CSE_Abstract* DC)
311311
m_zone_flags.set(eUseOnOffTime, (m_TimeToDisable != 0) && (m_TimeToEnable != 0));
312312

313313
//добавить источники света
314-
bool br1 = (0 == psDeviceFlags.test(rsR2 | rsR3 | rsR4));
315-
314+
bool br1 = psDeviceFlags.test(rsR1);
316315
bool render_ver_allowed = !br1 || (br1 && m_zone_flags.test(eIdleLightR1));
317316

318317
if (m_zone_flags.test(eIdleLight) && render_ver_allowed)

src/xrGame/Torch.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,7 @@ BOOL CTorch::net_Spawn(CSE_Abstract* DC)
208208
if (!inherited::net_Spawn(DC))
209209
return (FALSE);
210210

211-
bool b_r2 = !!psDeviceFlags.test(rsR2);
212-
b_r2 |= !!psDeviceFlags.test(rsR3);
213-
b_r2 |= !!psDeviceFlags.test(rsR4);
211+
bool b_r2 = !psDeviceFlags.test(rsR1);
214212

215213
IKinematics* K = smart_cast<IKinematics*>(Visual());
216214
CInifile* pUserData = K->LL_UserData();

src/xrGame/ZoneCampfire.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void CZoneCampfire::GoDisabledState()
6565
#define OVL_TIME 3000
6666
void CZoneCampfire::turn_on_script()
6767
{
68-
if (psDeviceFlags.test(rsR2 | rsR3 | rsR4))
68+
if (!psDeviceFlags.test(rsR1))
6969
{
7070
m_turn_time = Device.dwTimeGlobal + OVL_TIME;
7171
m_turned_on = true;
@@ -75,7 +75,7 @@ void CZoneCampfire::turn_on_script()
7575

7676
void CZoneCampfire::turn_off_script()
7777
{
78-
if (psDeviceFlags.test(rsR2 | rsR3 | rsR4))
78+
if (!psDeviceFlags.test(rsR1))
7979
{
8080
m_turn_time = Device.dwTimeGlobal + OVL_TIME;
8181
m_turned_on = false;

0 commit comments

Comments
 (0)