Added new isLocalPlayerKart() function to controller, which is used

to detect when sfx and graphical effects should be shown. The isPlayerKart
funtion is used to detect a (local or remote) player, e.g. for rubber-banding
the AI, or finding the Xth player kart.
This commit is contained in:
hiker
2015-12-10 17:35:31 +11:00
parent 1969ee0b1f
commit e0b3de17f6
22 changed files with 67 additions and 62 deletions

View File

@@ -131,7 +131,7 @@ void addAttachment(Attachment::AttachmentType type)
for (unsigned int i = 0; i < world->getNumKarts(); i++)
{
AbstractKart *kart = world->getKart(i);
if (!kart->getController()->isPlayerController())
if (!kart->getController()->isLocalPlayerController())
continue;
if (type == Attachment::ATTACH_ANVIL)
{