-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Projectile subject to ground check before firing #1291
base: develop
Are you sure you want to change the base?
Projectile subject to ground check before firing #1291
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. |
src/Ext/Bullet/Hooks.Obstacles.cpp
Outdated
|
||
const int extraHeight = pTechno->GetHeight(); | ||
|
||
if (extraHeight > 200) |
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.
height for a cell is 208, which is used by vanilla as the condition of air and ground. This one should probably be changed as well
const int passengerIndex = -weaponIndex - 1; | ||
|
||
for (int i = 0; i < passengerIndex && currentPassenger; i++) | ||
currentPassenger = abstract_cast<FootClass*>(currentPassenger->NextObject); |
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.
for (int i = 0; i < passengerIndex && currentPassenger; i++)
{
currentPassenger = abstract_cast<FootClass*>(currentPassenger->NextObject);
}
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 think it's not necessary because it's only one line here and it's clear enough
docs/New-or-Enhanced-Logics.md
Outdated
@@ -683,6 +683,7 @@ Shrapnel.UseWeaponTargeting=false ; boolean | |||
|
|||
- It is now possible to make projectiles consider either land or water as obstacles that block their path by setting `SubjectToLand/Water` to true, respectively. Weapons firing such projectiles will consider targets blocked by such obstacles as out of range and will attempt to reposition themselves so they can fire without being blocked by the said obstacles before firing and if `SubjectToLand/Water.Detonate` is set to true, the projectiles will detonate if they somehow manage to collide with the said obstacles. | |||
- `Level=true` projectiles detonate on tiles belonging to non-water tilesets by default, but will not consider such tiles as true obstacles. This behaviour can be overridden by setting these keys. | |||
- As for `SubjectToGround`, if set it to true ,it will predict will predict the height of the connecting straight line from the bullet's source coordinates to target coordinates. If the predicted height is lower than the ground height of the current predicted position, the firer will also consider targets blocked by such obstacles as out of range and will attempt to reposition themselves. |
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.
duplicate 'will predict`
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.
Get this.
This is a feature split from #1261 .
It may have similarities with other parts.
If set
SubjectToGround
to true ,it will predict will predict the height of the connecting straight line from the bullet's source coordinates to target coordinates. If the predicted height is lower than the ground height of the current predicted position, the firer will also consider targets blocked by such obstacles as out of range and will attempt to reposition themselves.In
rulesmd.ini
: