Revert "Replace ItemCallbacks with lambdas (#3948)"
This reverts commit 496c337cdf.
This commit is contained in:
committed by
Alexander Harkness
parent
700bbdabf5
commit
49c443896d
@@ -39,7 +39,26 @@ public:
|
||||
|
||||
if (Type == E_BLOCK_TRIPWIRE)
|
||||
{
|
||||
if (!a_World.ForEachEntityInBox(cBoundingBox(Vector3d(0.5, 0, 0.5) + Position, 0.5, 0.5), [](cEntity &) { return true; }))
|
||||
class cTripwireCallback :
|
||||
public cEntityCallback
|
||||
{
|
||||
public:
|
||||
cTripwireCallback(void) :
|
||||
m_NumberOfEntities(0),
|
||||
m_FoundPlayer(false)
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool Item(cEntity * a_Entity) override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned int m_NumberOfEntities;
|
||||
bool m_FoundPlayer;
|
||||
} TripwireCallback;
|
||||
|
||||
if (!a_World.ForEachEntityInBox(cBoundingBox(Vector3d(0.5, 0, 0.5) + Position, 0.5, 0.5), TripwireCallback))
|
||||
{
|
||||
FoundActivated = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user