Skip to content
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

Consider applying armor to all damage #1804

Open
sprunk opened this issue Dec 8, 2024 · 0 comments
Open

Consider applying armor to all damage #1804

sprunk opened this issue Dec 8, 2024 · 0 comments
Labels
game compat Requires a look into how existing games do something or send them a patch

Comments

@sprunk
Copy link
Collaborator

sprunk commented Dec 8, 2024

Right now armor is not applied to collision damage. This leads to surprising behaviour where units can still get damaged despite setting the multiplier to 0. I don't expect any game would mind since collision damage is very rare (ZK involves lots but we override it in a gadget anyway) but it would be good to ask beforehand.

spring/rts/Sim/Units/Unit.cpp

Lines 1298 to 1306 in 7363dbc

if (!isCollision && baseDamage > 0.0f) {
if (attacker != nullptr) {
SetLastAttacker(attacker);
// FIXME -- not the impulse direction?
baseDamage *= GetFlankingDamageBonus((attacker->pos - pos).SafeNormalize());
}
baseDamage *= curArmorMultiple;

@sprunk sprunk added the game compat Requires a look into how existing games do something or send them a patch label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
game compat Requires a look into how existing games do something or send them a patch
Projects
None yet
Development

No branches or pull requests

1 participant