mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-15 22:19:07 +00:00
Add new setting for shots: DieOnKill (default: off)
This commit is contained in:
parent
b95dfee4c6
commit
04ce34afa2
2 changed files with 5 additions and 1 deletions
|
@ -59,6 +59,7 @@ ShotData::ShotData()
|
||||||
homingMax = 0;
|
homingMax = 0;
|
||||||
homingIncr = 0;
|
homingIncr = 0;
|
||||||
dieOnHit = 1;
|
dieOnHit = 1;
|
||||||
|
dieOnKill = false;
|
||||||
hitEnts = 1;
|
hitEnts = 1;
|
||||||
wallHitRadius = 0;
|
wallHitRadius = 0;
|
||||||
rotateToVel = 1;
|
rotateToVel = 1;
|
||||||
|
@ -241,6 +242,8 @@ void ShotData::bankLoad(const std::string &file, const std::string &path)
|
||||||
inf >> dieOnHit;
|
inf >> dieOnHit;
|
||||||
else if (token == "IgnoreShield")
|
else if (token == "IgnoreShield")
|
||||||
inf >> ignoreShield;
|
inf >> ignoreShield;
|
||||||
|
else if (token == "DieOnKill")
|
||||||
|
inf >> dieOnKill;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// if having weirdness, check for these
|
// if having weirdness, check for these
|
||||||
|
@ -595,7 +598,7 @@ void Shot::hitEntity(Entity *e, Bone *b, bool isValid)
|
||||||
|
|
||||||
if (e->isEntityDead())
|
if (e->isEntityDead())
|
||||||
{
|
{
|
||||||
die = false;
|
die = shotData ? shotData->dieOnKill : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (firer)
|
if (firer)
|
||||||
|
|
|
@ -43,6 +43,7 @@ struct ShotData
|
||||||
Vector scale;
|
Vector scale;
|
||||||
|
|
||||||
bool ignoreShield;
|
bool ignoreShield;
|
||||||
|
bool dieOnKill;
|
||||||
|
|
||||||
float effectTime;
|
float effectTime;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue