summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-07 20:11:00 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-07 20:44:11 +0300
commit8ec4e8575001e50ac2917b0a1599d2a6223aa337 (patch)
tree376a7cc5ec7cb1debd6a13694c8717268325a93f /src/being/being.cpp
parentf4fa1d27c333e0b75e787eb03a2280afe7bcce6c (diff)
downloadmanaplus-8ec4e8575001e50ac2917b0a1599d2a6223aa337.tar.gz
manaplus-8ec4e8575001e50ac2917b0a1599d2a6223aa337.tar.bz2
manaplus-8ec4e8575001e50ac2917b0a1599d2a6223aa337.tar.xz
manaplus-8ec4e8575001e50ac2917b0a1599d2a6223aa337.zip
Add additional attributes to missile particle in items.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 36badf728..9e3104c5f 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -1329,11 +1329,16 @@ void Being::setGuild(Guild *restrict const guild) restrict2
void Being::fireMissile(Being *restrict const victim,
const std::string &restrict particle) const restrict2
{
- if ((victim == nullptr) || particle.empty() || (particleEngine == nullptr))
- return;
-
BLOCK_START("Being::fireMissile")
+ if (victim == nullptr ||
+ particle.empty() ||
+ particleEngine == nullptr)
+ {
+ BLOCK_END("Being::fireMissile")
+ return;
+ }
+
Particle *restrict const target = particleEngine->createChild();
if (target == nullptr)
@@ -1350,12 +1355,12 @@ void Being::fireMissile(Being *restrict const victim,
if (missile != nullptr)
{
target->moveBy(Vector(0.0F, 0.0F, 32.0F));
- target->setLifetime(1000);
+ target->setLifetime(10000);
victim->controlAutoParticle(target);
- missile->setDestination(target, 7, 0);
- missile->setDieDistance(8);
- missile->setLifetime(900);
+ missile->setDestination(target, 1.0F, 0.0F);
+ missile->setDieDistance(1);
+ missile->setLifetime(9000);
}
BLOCK_END("Being::fireMissile")
}