-
-
Notifications
You must be signed in to change notification settings - Fork 110
Modify Ammo on impact #1687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Modify Ammo on impact #1687
Conversation
- Warheads can now modify ammo of the affected objects. In rulesmd.ini: [SOMEWARHEAD] ; Warhead AmmoModifier=0 ; integer
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks okay except for couple of small things.
|
What do you mean, reuse the tag name for the warhead tag? I don't remember if Ammo was used by someone else before in WH |
So does this mean that TransferTypes, and other attempts to make warheads modify ammo, were truly abandoned? |
TransferTypes have been lost in dev limbo even though they're much better than random one-off non-systematic modifiers. |
b429215
to
280b1c8
Compare
@@ -211,6 +212,9 @@ void WarheadTypeExt::ExtData::DetonateOnOneUnit(HouseClass* pHouse, TechnoClass* | |||
if (this->Crit_CurrentChance > 0.0 && (!this->Crit_SuppressWhenIntercepted || !bulletWasIntercepted)) | |||
this->ApplyCrit(pHouse, pTarget, pOwner); | |||
|
|||
if (this->AmmoModifier != 0) | |||
ApplyAmmoModifier(pTarget, pHouse, pBulletExt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this->ApplyAmmoModifier(...);
@@ -650,3 +654,12 @@ double WarheadTypeExt::ExtData::GetCritChance(TechnoClass* pFirer) const | |||
|
|||
return critChance + extraChance; | |||
} | |||
|
|||
void WarheadTypeExt::ExtData::ApplyAmmoModifier(TechnoClass* pTarget, HouseClass* pInvokerHouse, BulletExt::ExtData* pBulletExt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BulletExt::ExtData* pBulletExt
doesn't seem to have been used.
@@ -192,7 +193,7 @@ void WarheadTypeExt::ExtData::Detonate(TechnoClass* pOwner, HouseClass* pHouse, | |||
} | |||
} | |||
|
|||
void WarheadTypeExt::ExtData::DetonateOnOneUnit(HouseClass* pHouse, TechnoClass* pTarget, TechnoClass* pOwner, bool bulletWasIntercepted) | |||
void WarheadTypeExt::ExtData::DetonateOnOneUnit(HouseClass* pHouse, TechnoClass* pTarget, TechnoClass* pOwner, bool bulletWasIntercepted, BulletExt::ExtData* pBulletExt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it's the same here.
@@ -12,6 +12,7 @@ | |||
#include <Ext/Anim/Body.h> | |||
#include <Ext/Bullet/Body.h> | |||
#include <Ext/BulletType/Body.h> | |||
#include <Ext/WeaponType/Body.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also doesn't seem to be used.
In
rulesmd.ini
: