New global const FIRE_LIGHT_COLOR. Added fire light color to various objects.

shapetextures
Clonkonaut 2015-10-07 23:26:03 +02:00
parent 002ad7563c
commit acec73dd51
6 changed files with 6 additions and 1 deletions

View File

@ -16,6 +16,7 @@ protected func Construction() {
SetProperty("MeshTransformation", Trans_Mul(Trans_Rotate(RandomX(-35,35),0,10), Trans_Scale(30)));
objShine = CreateObjectAbove(EnvPack_Candle_Shine, x, y + 10, -1);
SetLightRange(80, 60);
SetLightColor(FIRE_LIGHT_COLOR);
}
private func Shining()

View File

@ -12,6 +12,7 @@ protected func Initialize()
AddEffect("IntEvaporate", this, 100, 1, this);
// Add light to the chunk.
SetLightRange(60, 40);
SetLightColor(FIRE_LIGHT_COLOR);
// Lava chunk is on fire.
//Incinerate(); // TODO: Wait for decent graphics
return;

View File

@ -167,6 +167,7 @@ private func FxIntBurningStart(object target, effect fx, int temporary)
};
// Set the light range for this torch.
SetLightRange(80, 60);
SetLightColor(FIRE_LIGHT_COLOR);
return 1;
}

View File

@ -62,6 +62,7 @@ public func FxIntBurningTimer(object target, proplist effect, int time)
CreateParticle("Smoke", PV_Random(x - 1, x + 1), PV_Random(y - 1, y + 1), PV_Random(-2, 2), PV_Random(-2, 2), 40 + Random(20), particle_smoke, burn_level / 30);
// Light level.
SetLightRange(burn_level / 3, burn_level / 3);
SetLightColor(FIRE_LIGHT_COLOR);
return 1;
}

View File

@ -27,7 +27,7 @@ public func GetLampFadeRange() { return 160; }
/** Lamp property: Which color it shines in.
*/
public func GetLampColor() { return 0xffa000; }
public func GetLampColor() { return FIRE_LIGHT_COLOR; }
/** Overload as needed to define a custom offset by the lamp.
*/

View File

@ -7,6 +7,7 @@
Functions to be used as documented in the docs.
--*/
static const FIRE_LIGHT_COLOR = 0xc86400;
// fire drawing modes
static const C4Fx_FireMode_Default = 0; // determine mode by category