Trigger now has access to kart that triggered it
This commit is contained in:
@@ -243,6 +243,9 @@ public:
|
||||
/** Returns the type of this item. */
|
||||
ItemType getType() const { return m_type; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns the current event handler (kart) */
|
||||
const AbstractKart* getEventHandler() const { return m_event_handler;}
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns true if this item is currently collected. */
|
||||
bool wasCollected() const { return m_collected;}
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@@ -673,6 +673,7 @@ TrackObjectPresentationActionTrigger::TrackObjectPresentationActionTrigger(const
|
||||
|
||||
void TrackObjectPresentationActionTrigger::onTriggerItemApproached(Item* who)
|
||||
{
|
||||
const AbstractKart* kart = who->getEventHandler();
|
||||
if (!m_action_active) return;
|
||||
|
||||
if (m_action == "garage")
|
||||
|
||||
Reference in New Issue
Block a user