Tell the AI to not gift free nitro cans when a switch is active
This commit is contained in:
parent
c7ea40df6c
commit
63a377cf0b
@ -135,6 +135,7 @@ public:
|
|||||||
void reset ();
|
void reset ();
|
||||||
virtual void collectedItem (Item *item, AbstractKart *kart);
|
virtual void collectedItem (Item *item, AbstractKart *kart);
|
||||||
void switchItems ();
|
void switchItems ();
|
||||||
|
bool areItemSwitched() { return (m_switch_ticks > 0); }
|
||||||
bool randomItemsForArena(const AlignedArray<btTransform>& pos);
|
bool randomItemsForArena(const AlignedArray<btTransform>& pos);
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
/** Only used in the NetworkItemManager. */
|
/** Only used in the NetworkItemManager. */
|
||||||
|
@ -1424,7 +1424,8 @@ void SkiddingAI::handleBubblegum(int item_skill, const std::vector<const Item *>
|
|||||||
if (abs_angle < 0.2f) straight_behind = true;
|
if (abs_angle < 0.2f) straight_behind = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_distance_behind < 8.0f && straight_behind )
|
if(m_distance_behind < 8.0f && straight_behind &&
|
||||||
|
(!ItemManager::get()->areItemSwitched() || item_skill < 4))
|
||||||
{
|
{
|
||||||
m_controls->setFire(true);
|
m_controls->setFire(true);
|
||||||
m_controls->setLookBack(true);
|
m_controls->setLookBack(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user