Skip to content

Commit

Permalink
OpenGL: fixed lights from anomalies, actor torch, campfires
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyLoaderr committed Oct 29, 2018
1 parent 32d64c1 commit dd8763b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/xrGame/CustomZone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,7 @@ BOOL CCustomZone::net_Spawn(CSE_Abstract* DC)
m_zone_flags.set(eUseOnOffTime, (m_TimeToDisable != 0) && (m_TimeToEnable != 0));

//добавить источники света
bool br1 = (0 == psDeviceFlags.test(rsR2 | rsR3 | rsR4));

bool br1 = psDeviceFlags.test(rsR1);
bool render_ver_allowed = !br1 || (br1 && m_zone_flags.test(eIdleLightR1));

if (m_zone_flags.test(eIdleLight) && render_ver_allowed)
Expand Down
4 changes: 1 addition & 3 deletions src/xrGame/Torch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,7 @@ BOOL CTorch::net_Spawn(CSE_Abstract* DC)
if (!inherited::net_Spawn(DC))
return (FALSE);

bool b_r2 = !!psDeviceFlags.test(rsR2);
b_r2 |= !!psDeviceFlags.test(rsR3);
b_r2 |= !!psDeviceFlags.test(rsR4);
bool b_r2 = !psDeviceFlags.test(rsR1);

IKinematics* K = smart_cast<IKinematics*>(Visual());
CInifile* pUserData = K->LL_UserData();
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/ZoneCampfire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void CZoneCampfire::GoDisabledState()
#define OVL_TIME 3000
void CZoneCampfire::turn_on_script()
{
if (psDeviceFlags.test(rsR2 | rsR3 | rsR4))
if (!psDeviceFlags.test(rsR1))
{
m_turn_time = Device.dwTimeGlobal + OVL_TIME;
m_turned_on = true;
Expand All @@ -75,7 +75,7 @@ void CZoneCampfire::turn_on_script()

void CZoneCampfire::turn_off_script()
{
if (psDeviceFlags.test(rsR2 | rsR3 | rsR4))
if (!psDeviceFlags.test(rsR1))
{
m_turn_time = Device.dwTimeGlobal + OVL_TIME;
m_turned_on = false;
Expand Down

0 comments on commit dd8763b

Please sign in to comment.