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;
|
||||
homingIncr = 0;
|
||||
dieOnHit = 1;
|
||||
dieOnKill = false;
|
||||
hitEnts = 1;
|
||||
wallHitRadius = 0;
|
||||
rotateToVel = 1;
|
||||
|
@ -241,6 +242,8 @@ void ShotData::bankLoad(const std::string &file, const std::string &path)
|
|||
inf >> dieOnHit;
|
||||
else if (token == "IgnoreShield")
|
||||
inf >> ignoreShield;
|
||||
else if (token == "DieOnKill")
|
||||
inf >> dieOnKill;
|
||||
else
|
||||
{
|
||||
// if having weirdness, check for these
|
||||
|
@ -595,7 +598,7 @@ void Shot::hitEntity(Entity *e, Bone *b, bool isValid)
|
|||
|
||||
if (e->isEntityDead())
|
||||
{
|
||||
die = false;
|
||||
die = shotData ? shotData->dieOnKill : false;
|
||||
}
|
||||
|
||||
if (firer)
|
||||
|
|
|
@ -43,6 +43,7 @@ struct ShotData
|
|||
Vector scale;
|
||||
|
||||
bool ignoreShield;
|
||||
bool dieOnKill;
|
||||
|
||||
float effectTime;
|
||||
|
||||
|
|
Loading…
Reference in a new issue