mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-20 07:01:27 +02:00
improve find tool handling with GoL, can now find specific life elements
Reverts most of LBPHacker's previous commit, lol
This commit is contained in:
@@ -1422,7 +1422,8 @@ void Renderer::render_parts()
|
|||||||
|
|
||||||
if (findingElement)
|
if (findingElement)
|
||||||
{
|
{
|
||||||
if (findingElement == parts[i].type)
|
if (TYP(findingElement) == parts[i].type &&
|
||||||
|
(parts[i].type != PT_LIFE || (ID(findingElement) == parts[i].ctype)))
|
||||||
{
|
{
|
||||||
colr = firer = 255;
|
colr = firer = 255;
|
||||||
colg = fireg = colb = fireb = 0;
|
colg = fireg = colb = fireb = 0;
|
||||||
|
@@ -715,7 +715,7 @@ void GameView::NotifyActiveToolsChanged(GameModel * sender)
|
|||||||
if (!active->GetIdentifier().Contains("_PT_"))
|
if (!active->GetIdentifier().Contains("_PT_"))
|
||||||
ren->findingElement = 0;
|
ren->findingElement = 0;
|
||||||
else
|
else
|
||||||
ren->findingElement = sender->GetActiveTool(0)->GetToolID() & ((1 << PMAPBITS) - 1);
|
ren->findingElement = sender->GetActiveTool(0)->GetToolID();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1509,10 +1509,10 @@ void GameView::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl,
|
|||||||
if (ctrl)
|
if (ctrl)
|
||||||
{
|
{
|
||||||
Tool *active = c->GetActiveTool(0);
|
Tool *active = c->GetActiveTool(0);
|
||||||
if (!active->GetIdentifier().Contains("_PT_") || (ren->findingElement == (active->GetToolID() & ((1 << PMAPBITS) - 1))))
|
if (!active->GetIdentifier().Contains("_PT_") || (ren->findingElement == active->GetToolID()))
|
||||||
ren->findingElement = 0;
|
ren->findingElement = 0;
|
||||||
else
|
else
|
||||||
ren->findingElement = active->GetToolID() & ((1 << PMAPBITS) - 1);
|
ren->findingElement = active->GetToolID();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
c->FrameStep();
|
c->FrameStep();
|
||||||
|
Reference in New Issue
Block a user