Light meter
This commit is contained in:
@@ -1105,8 +1105,10 @@ GameState.prototype.update_player_lightmeter = function() {
|
|||||||
if ( line.length > light.radius )
|
if ( line.length > light.radius )
|
||||||
return;
|
return;
|
||||||
var ll = line.length;
|
var ll = line.length;
|
||||||
if ( light.flicker == true )
|
if ( light.flicker == true ) {
|
||||||
|
// Because flickering lights are bigger than their radius
|
||||||
ll = ll + 10;
|
ll = ll + 10;
|
||||||
|
}
|
||||||
var lv = light.light_meter - (Number(ll) / light.radius);
|
var lv = light.light_meter - (Number(ll) / light.radius);
|
||||||
if ( lv > lightValue ) {
|
if ( lv > lightValue ) {
|
||||||
lightValue = lv;
|
lightValue = lv;
|
||||||
|
|||||||
Reference in New Issue
Block a user