remove Flame graphics and clean up script

stable-6.1
Maikel de Vries 2015-03-24 21:36:37 +01:00
parent 39d6cc2c2c
commit d19f75a5b9
3 changed files with 25 additions and 15 deletions

View File

@ -8,7 +8,6 @@ Offset=-7,-10
Vertices=3 Vertices=3
VertexX=0,5,-5 VertexX=0,5,-5
VertexY=10,8,8 VertexY=10,8,8
VertexFriction=60, 60, 60 VertexFriction=60,60,60
NoGet=1 NoGet=1
StretchGrowth=1 StretchGrowth=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

View File

@ -1,32 +1,43 @@
local Name = "$Name$"; /**
local Description = "$Description$"; Flame
Spreads fire.
@author Maikel
*/
public func Initialize()
protected func Initialize()
{ {
Incinerate(); Incinerate();
AddTimer("Burning"); AddTimer("Burning");
return true; return;
} }
func Burning() public func Burning()
{ {
if(GetCon() > 50) // Split the flame if it is large enough.
if(!Random(3)) if (GetCon() > 50 && !Random(3))
{ {
var x = Random(15); var x = Random(15);
var o = CreateObjectAbove(GetID(), 0, 0, GetOwner()); var new_flame = CreateObjectAbove(GetID(), 0, 0, GetOwner());
o->SetSpeed(x, -7); new_flame->SetSpeed(x, -7);
o->SetCon(GetCon()/2); new_flame->SetCon(GetCon() / 2);
SetSpeed(-x, -7); SetSpeed(-x, -7);
SetCon(GetCon()/2); SetCon(GetCon() / 2);
} }
return;
} }
// Don't incinerate twice in saved scenarios // Don't incinerate twice in saved scenarios.
func SaveScenarioObject(props) func SaveScenarioObject(props)
{ {
if (!inherited(props, ...)) return false; if (!inherited(props, ...)) return false;
props->Remove("Fire"); props->Remove("Fire");
return true; return true;
} }
/*-- Properties --*/
local Name = "$Name$";
local Description = "$Description$";