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

Investigate self-damage in TFC #98

Open
squeek502 opened this issue Dec 15, 2014 · 7 comments

Comments

@squeek502
Copy link
Member

commented Dec 15, 2014

See https://github.com/fortressforever/fortressforever/blob/beta/game_shared/ff/ff_gamerules.cpp#L1428-L1433:

    // In TFC players only do 2/3 damage to themselves
    // This also affects forces by the same amount
    if (pEntity == info.GetAttacker() && !pBuildable)
        flAdjustedDamage *= 0.66666f;

I'm skeptical of the accuracy of this comment after doing some testing. For example, handheld frag grenades seem to do ~110-120 damage to yourself (which would be ~75-80% damage, assuming the gren base damage is the same in FF (145) as it is in TFC).

Needs more investigation, though, and it seems like the AMX Mod X hook for TakeDamage is giving me somewhat incorrect numbers (it reports 135 damage when HHing a gren but you actually only take ~110-120 real damage).

So, yeah, just something to look into. Not sure how the early devs landed on the 66% value.

@AfterShockFF

This comment has been minimized.

Copy link
Member

commented Dec 15, 2014

Pretty sure FF grenades do less damage than TFC.

@squeek502

This comment has been minimized.

Copy link
Member Author

commented Dec 16, 2014

You seem to be correct. TFC grens seem to do ~160-180 damage. Still going to investigate this some more and get some hard numbers, though, as damage in TFC is really perplexing me (it seems to have some randomness to it).

@squeek502

This comment has been minimized.

Copy link
Member Author

commented Dec 20, 2014

Did a lot more investigation and created a repository for TFC data.

Two things:

EDIT: Noticed that damage while crouched is actually different than uncrouched, which means two things:

  • The numbers in the TFC data repo are slightly off (self-damage is uncrouched, so it's slightly lower than crouched, and the enemy damage is with the enemy crouched)
  • The code might be doing something like tracing to a semi-random point on the player's bounding box/hitbox and using that as the offset, which then causes the damage to seem random. Not sure how to test this, though.
@squeek502

This comment has been minimized.

Copy link
Member Author

commented Dec 20, 2014

Frag grenade damage at the origin of a crouched enemy does a consistent 162 damage. Frag grenade self-damage at your origin (while crouched) seems to range between 119-121.

That's ~75% damage.

I ain't know what's going on.

EDIT: Quick note: the numbers in my first two posts were skewed because it turns out killing blows do slightly more damage than usual (perhaps for gibbing purposes or something).

@squeek502

This comment has been minimized.

Copy link
Member Author

commented Mar 29, 2015

Further fuel to the fire: blue/grellow pipes do ~80 self-damage, and a consistent 108 damage to enemies. That is ~75% self-damage.

@AfterShockFF

This comment has been minimized.

Copy link
Member

commented Mar 29, 2015

Out of interest, if we find out that TFC was actually 75%, do we want to mirror that? Do we think that players should hurt themselves more in general?

@squeek502

This comment has been minimized.

Copy link
Member Author

commented Mar 29, 2015

The thing is is that damage and pushforce are directly linked; pushforce = damage * 8 (in TFC it seems to be more like 8.5 but close enough). So, if we up self-damage to 75%, we also increase the boost you receive. I think that might be a good thing, but I'm not sure.

There's also #3, which means that you have a bit more control over how much damage you do to yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.