diff --git a/data/models/bubblegum_shield.b3d b/data/models/bubblegum_shield.b3d
index 3a1a4c01e..00b3d5d42 100644
Binary files a/data/models/bubblegum_shield.b3d and b/data/models/bubblegum_shield.b3d differ
diff --git a/data/models/bubblegum_shield_nolok.b3d b/data/models/bubblegum_shield_nolok.b3d
new file mode 100644
index 000000000..a498e97f0
Binary files /dev/null and b/data/models/bubblegum_shield_nolok.b3d differ
diff --git a/data/models/bubblegum_shield_nolok.png b/data/models/bubblegum_shield_nolok.png
new file mode 100644
index 000000000..1dde72a9d
Binary files /dev/null and b/data/models/bubblegum_shield_nolok.png differ
diff --git a/data/models/materials.xml b/data/models/materials.xml
index 39e9021e4..ef23c4c63 100644
--- a/data/models/materials.xml
+++ b/data/models/materials.xml
@@ -11,7 +11,8 @@
-
+
+
diff --git a/src/items/attachment.cpp b/src/items/attachment.cpp
index 1ddab5f84..f9ae8fb59 100644
--- a/src/items/attachment.cpp
+++ b/src/items/attachment.cpp
@@ -222,7 +222,8 @@ void Attachment::clear()
void Attachment::hitBanana(Item *item, int new_attachment)
{
//Bubble gum shield effect:
- if(m_type == ATTACH_BUBBLEGUM_SHIELD)
+ if(m_type == ATTACH_BUBBLEGUM_SHIELD ||
+ m_type == ATTACH_NOLOK_BUBBLEGUM_SHIELD)
{
m_time_left = 0.0f;
return;
@@ -387,8 +388,9 @@ void Attachment::update(float dt)
if(m_type==ATTACH_NOTHING) return;
m_time_left -=dt;
- float m_wanted_node_scale = m_type==ATTACH_BUBBLEGUM_SHIELD ?
- std::max(1.0f, m_kart->getHighestPoint()*1.1f) : 1.0f;
+
+ bool is_shield = (m_type == ATTACH_BUBBLEGUM_SHIELD|| m_type == ATTACH_NOLOK_BUBBLEGUM_SHIELD);
+ float m_wanted_node_scale = is_shield ? std::max(1.0f, m_kart->getHighestPoint()*1.1f) : 1.0f;
if (m_node_scale < m_wanted_node_scale)
{
@@ -459,6 +461,7 @@ void Attachment::update(float dt)
// Nothing to do for tinytux, this is all handled in EmergencyAnimation
break;
case ATTACH_BUBBLEGUM_SHIELD:
+ case ATTACH_NOLOK_BUBBLEGUM_SHIELD:
if (m_time_left < 0)
{
m_time_left = 0.0f;
diff --git a/src/items/attachment.hpp b/src/items/attachment.hpp
index baa2faa17..222e91dbf 100644
--- a/src/items/attachment.hpp
+++ b/src/items/attachment.hpp
@@ -60,6 +60,7 @@ public:
ATTACH_NOLOKS_SWATTER,
ATTACH_TINYTUX,
ATTACH_BUBBLEGUM_SHIELD,
+ ATTACH_NOLOK_BUBBLEGUM_SHIELD,
ATTACH_MAX,
ATTACH_NOTHING
};
diff --git a/src/items/attachment_manager.cpp b/src/items/attachment_manager.cpp
index 61fc031b0..dec965696 100644
--- a/src/items/attachment_manager.cpp
+++ b/src/items/attachment_manager.cpp
@@ -54,6 +54,7 @@ static const initAttachmentType iat[]=
{Attachment::ATTACH_NOLOKS_SWATTER, "swatter_nolok.b3d", "swatter-icon.png" },
{Attachment::ATTACH_TINYTUX, "reset-button.b3d", "reset-attach-icon.png" },
{Attachment::ATTACH_BUBBLEGUM_SHIELD, "bubblegum_shield.b3d", "shield-icon.png" },
+ {Attachment::ATTACH_NOLOK_BUBBLEGUM_SHIELD, "bubblegum_shield_nolok.b3d", "shield-icon.png" },
{Attachment::ATTACH_MAX, "", "" },
};
diff --git a/src/items/powerup.cpp b/src/items/powerup.cpp
index a19ade9e0..c82f88c60 100644
--- a/src/items/powerup.cpp
+++ b/src/items/powerup.cpp
@@ -302,13 +302,29 @@ void Powerup::use()
if(!m_owner->isShielded()) //if the previous shield had been used up.
{
- m_owner->getAttachment()->set(Attachment::ATTACH_BUBBLEGUM_SHIELD,
- stk_config->m_bubblegum_shield_time);
+ if (m_owner->getIdent() == "nolok")
+ {
+ m_owner->getAttachment()->set(Attachment::ATTACH_NOLOK_BUBBLEGUM_SHIELD,
+ stk_config->m_bubblegum_shield_time);
+ }
+ else
+ {
+ m_owner->getAttachment()->set(Attachment::ATTACH_BUBBLEGUM_SHIELD,
+ stk_config->m_bubblegum_shield_time);
+ }
}
else // using a bubble gum while still having a shield
{
- m_owner->getAttachment()->set(Attachment::ATTACH_BUBBLEGUM_SHIELD,
- stk_config->m_bubblegum_shield_time + m_owner->getShieldTime());
+ if (m_owner->getIdent() == "nolok")
+ {
+ m_owner->getAttachment()->set(Attachment::ATTACH_NOLOK_BUBBLEGUM_SHIELD,
+ stk_config->m_bubblegum_shield_time + m_owner->getShieldTime());
+ }
+ else
+ {
+ m_owner->getAttachment()->set(Attachment::ATTACH_BUBBLEGUM_SHIELD,
+ stk_config->m_bubblegum_shield_time + m_owner->getShieldTime());
+ }
}
m_sound_use = sfx_manager->createSoundSource("inflate");//Extraordinary. Usually sounds are set in Powerup::set()
diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp
index 64c33ed14..f74f6cdca 100644
--- a/src/karts/kart.cpp
+++ b/src/karts/kart.cpp
@@ -984,9 +984,15 @@ void Kart::setShieldTime(float t)
bool Kart::isShielded() const
{
if(getAttachment() != NULL)
- return getAttachment()->getType() == Attachment::ATTACH_BUBBLEGUM_SHIELD;
+ {
+ Attachment::AttachmentType type = getAttachment()->getType();
+ return type == Attachment::ATTACH_BUBBLEGUM_SHIELD ||
+ type == Attachment::ATTACH_NOLOK_BUBBLEGUM_SHIELD;
+ }
else
+ {
return false;
+ }
} // isShielded
// ------------------------------------------------------------------------