Fix the sound bug when clicking on lights. (#155)
It was updating lights when there was nothing to be updated, which caused the sound to play.
This commit is contained in:
committed by
Pieter-Jan Briers
parent
dcd74e8305
commit
03856b79b4
@@ -62,13 +62,10 @@ namespace Content.Server.GameObjects.Components.Power
|
|||||||
UpdateLight();
|
UpdateLight();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!user.TryGetComponent(out DamageableComponent damageableComponent)) return false;
|
|
||||||
damageableComponent.TakeDamage(DamageType.Heat, 20);
|
|
||||||
}
|
|
||||||
|
|
||||||
UpdateLight();
|
if (!user.TryGetComponent(out DamageableComponent damageableComponent)) return false;
|
||||||
|
damageableComponent.TakeDamage(DamageType.Heat, 20);
|
||||||
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user