Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
Panakotta00 committed Mar 18, 2020
2 parents c3b4ec6 + 54622af commit bd8dc07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/LightItUp/LampBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ void ALampBase::BeginPlay() {
void ALampBase::TickActor(float DeltaTime, ELevelTick TickType, FActorTickFunction & ThisTickFunction) {
if ((bLampOn != (mLastLampOn == 1)) || mLastLampOn == 2) {
mLastLampOn = bLampOn ? 1 : 0;
if (HasAuthority()) ForceNetUpdate();
auto lights = GetComponentsByClass(ULightComponent::StaticClass());
for (auto& light : lights) {
Cast<USceneComponent>(light)->SetVisibilitySML(bLampOn);
Expand Down Expand Up @@ -113,7 +114,6 @@ void ALampBase::Factory_Tick(float dt) {
bool hasPower = mPowerInfo->HasPower();
if (hasPower != bLampOn) {
bLampOn = hasPower;
ForceNetUpdate();
}
}
}
Expand Down

0 comments on commit bd8dc07

Please sign in to comment.