Waterfall actually uses the mat defined in the CreateWaterfall function

stable-5.3
Charles Spurrill 2012-11-06 16:37:19 -08:00
parent 974073b728
commit 8a2ac6091b
1 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ protected func Initialize()
global func CreateWaterfall(int x, int y, int strength, string mat)
{
var fall = CreateObject(Waterfall, x, y, NO_OWNER);
if(!mat) mat = "Water";
AddEffect("IntWaterfall", fall, 100, 1, fall, nil, x, y, strength, mat);
return fall;
}
@ -38,7 +39,7 @@ protected func FxIntWaterfallTimer(object target, proplist effect)
{
// Insert liquid at location every frame.
for (var i = 0; i < effect.Strength / 2; i++)
InsertMaterial(Material("Water"), AbsX(effect.X), AbsY(effect.Y), effect.XDir + Random(effect.XVar), effect.YDir + Random(effect.YVar));
InsertMaterial(Material(effect.Material), AbsX(effect.X), AbsY(effect.Y), effect.XDir + Random(effect.XVar), effect.YDir + Random(effect.YVar));
return 1;
}