diff options
Diffstat (limited to 'src/game/Tool.cpp')
| -rw-r--r-- | src/game/Tool.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/game/Tool.cpp b/src/game/Tool.cpp index 10b7b0d..763fc82 100644 --- a/src/game/Tool.cpp +++ b/src/game/Tool.cpp @@ -166,13 +166,17 @@ void WindTool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) {} void Element_LIGH_Tool::Draw(Simulation * sim, Brush * brush, ui::Point position) { - int p = sim->create_part(-2, position.X, position.Y, toolID); - if (p != -1) + if(sim->currentTick >= nextUse) { - sim->parts[p].life = brush->GetRadius().X+brush->GetRadius().Y; - if (sim->parts[p].life > 55) - sim->parts[p].life = 55; - sim->parts[p].temp = sim->parts[p].life*150; // temperature of the lighting shows the power of the lighting + int p = sim->create_part(-2, position.X, position.Y, toolID); + if (p != -1) + { + sim->parts[p].life = brush->GetRadius().X+brush->GetRadius().Y; + if (sim->parts[p].life > 55) + sim->parts[p].life = 55; + sim->parts[p].temp = sim->parts[p].life*150; // temperature of the lighting shows the power of the lighting + nextUse = sim->currentTick+sim->parts[p].life/4; + } } } |
