-
-
Notifications
You must be signed in to change notification settings - Fork 115
Attack and damage technos under ground #1859
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?
Conversation
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. |
According to our test, only This is a hardcoded thing so it's fine to keep it as it is, but it should be noted in the doc. |
d279620
to
ae5144e
Compare
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.
LGTM
``` | ||
|
||
```{note} | ||
Only vanilla projectiles with `Inviso=yes` set or [Phobos projectiles](#projectile-trajectories) with `SubjectToGround=yes` enabled can go beneath the ground. Otherwise, the projectile will be forced to detonate upon hitting the ground. |
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.
Besides Inviso
, maybe only Straight
with Trajectory.Straight.SubjectToGround=false
and Bombard
with Trajectory.Bombard.SubjectToGround=false
can hit.
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.
I thought you were planning to add SubjectToGround
for other types of trajectories?
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.
Not very accurate. Even after the update, SubjectToGround
still only affects the selection of attacking area. Just in Straight
and Bombard
, because their judgment criteria are simple, allowing them to penetrate the ground will not cause any problems.
src/Ext/Techno/Body.cpp
Outdated
if (TechnoExt::ExtMap.Find(pItem)->UndergroundTracked) | ||
ScenarioExt::Global()->UndergroundTracker.Remove(pItem); | ||
|
||
if (TechnoExt::ExtMap.Find(pItem)->SpecialTracked) | ||
ScenarioExt::Global()->SpecialTracker.Remove(pItem); | ||
|
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.
You can place these in TechnoExt::ExtData::~ExtData()
if (this->UndergroundTracked)
ScenarioExt::Global()->UndergroundTracker.Remove(pThis);
if (this->SpecialTracked)
ScenarioExt::Global()->SpecialTracker.Remove(pThis);
Attack technos underground
In
rulesmd.ini
:Damage technos underground
[SOMEWARHEAD] -> PlayAnimUnderground=false
to prevent the warhead animation from playing when the projectile detonates underground.[SOMEWARHEAD] -> PlayAnimAboveSurface=true
to make the warhead animation play on the ground directly above when the projectile detonates underground.In
rulesmd.ini
: