diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-07 20:11:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-07 20:44:11 +0300 |
commit | 8ec4e8575001e50ac2917b0a1599d2a6223aa337 (patch) | |
tree | 376a7cc5ec7cb1debd6a13694c8717268325a93f /src/being/being.cpp | |
parent | f4fa1d27c333e0b75e787eb03a2280afe7bcce6c (diff) | |
download | manaverse-8ec4e8575001e50ac2917b0a1599d2a6223aa337.tar.gz manaverse-8ec4e8575001e50ac2917b0a1599d2a6223aa337.tar.bz2 manaverse-8ec4e8575001e50ac2917b0a1599d2a6223aa337.tar.xz manaverse-8ec4e8575001e50ac2917b0a1599d2a6223aa337.zip |
Add additional attributes to missile particle in items.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 19 |
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") } |