dynamic_pointer_cast -> std::dynamic_pointer_cast
This commit is contained in:
@@ -56,7 +56,7 @@ int Pig::getMaxHealth()
|
||||
|
||||
bool Pig::canBeControlledByRider()
|
||||
{
|
||||
std::shared_ptr<ItemInstance> item = dynamic_pointer_cast<Player>(rider.lock())->getCarriedItem();
|
||||
std::shared_ptr<ItemInstance> item = std::dynamic_pointer_cast<Player>(rider.lock())->getCarriedItem();
|
||||
|
||||
return item != NULL && item->id == Item::carrotOnAStick_Id;
|
||||
}
|
||||
@@ -162,9 +162,9 @@ void Pig::thunderHit(const LightningBolt *lightningBolt)
|
||||
void Pig::causeFallDamage(float distance)
|
||||
{
|
||||
Animal::causeFallDamage(distance);
|
||||
if (distance > 5 && dynamic_pointer_cast<Player>( rider.lock() ) != NULL)
|
||||
if (distance > 5 && std::dynamic_pointer_cast<Player>( rider.lock() ) != NULL)
|
||||
{
|
||||
(dynamic_pointer_cast<Player>(rider.lock()))->awardStat(GenericStats::flyPig(),GenericStats::param_flyPig());
|
||||
(std::dynamic_pointer_cast<Player>(rider.lock()))->awardStat(GenericStats::flyPig(),GenericStats::param_flyPig());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user