Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upFragmentation armor fix #24836
Conversation
kevingranade
force-pushed the
kevingranade:fragmentation-armor-fix
branch
Aug 15, 2018
This comment has been minimized.
This comment has been minimized.
|
Well that was super not fun, it was quite a pain to generate these messages. |
kevingranade
force-pushed the
kevingranade:fragmentation-armor-fix
branch
Aug 16, 2018
narc0tiq
reviewed
Aug 16, 2018
| // Target, Number of impacts, total amount of damage, proportion of deflected fragments. | ||
| std::map<int, std::string> impact_count_descriptions = { | ||
| { 1, _( "a" ) }, { 2, _( "several" ) }, { 5, _( "many" ) }, | ||
| { 20, _( "a large number" ) }, { 100, _( "a huge number" ) } |
This comment has been minimized.
This comment has been minimized.
narc0tiq
Aug 16, 2018
Contributor
As this will be used in, e.g., "[You are/NPC is/The Monster is] hit by %s bomb fragments", I think you want "a [large/huge] number of".
kevingranade
force-pushed the
kevingranade:fragmentation-armor-fix
branch
2 times, most recently
Aug 17, 2018
This comment has been minimized.
This comment has been minimized.
|
Next up is building some scenarios and testing them. Similarly, I don't expect a hand grenade to take down a wall, even adjacent. Let me know if you have any other tests that need to happen. |
kevingranade
changed the title
[WIP] Fragmentation armor fix
Fragmentation armor fix
Aug 17, 2018
ZhilkinSerg
added
[C++]
<Bugfix>
labels
Aug 18, 2018
ZhilkinSerg
self-assigned this
Aug 23, 2018
This comment has been minimized.
This comment has been minimized.
|
Game hangs when you explode grenade in your inventory while wearing decent armor (full winter survivor suit with hood, gloves, boots, and mask). |
ZhilkinSerg
added
the
(P2 - High)
label
Aug 23, 2018
This comment has been minimized.
This comment has been minimized.
|
hrm, that is a rather large number of projectiles to handle, I wonder if I can shortcut that by comparing the potential damage vs the armor and skipping all the special effects if it has no possibility of dealing damage. Also I'll just profile it, should be pretty straightforward to reproduce, there might be something dumb happening in there... ooh, like an animation delay. |
kevingranade
added some commits
Aug 10, 2018
kevingranade
force-pushed the
kevingranade:fragmentation-armor-fix
branch
to
f34f2b2
Aug 24, 2018
This comment has been minimized.
This comment has been minimized.
|
Final commit should adress the hang, player::deal_damage was drawing thousands of hitboxes for all the non-damaging fragment hits, and waiting for thousands of animation delay-length ticks. |
This comment has been minimized.
This comment has been minimized.
|
Performance is much better now - still noticeable "Hang on a bit" message sometimes, but game doesn't hang. Grenade explosions seems to be a little underpowered as I couldn't shatter car windshields from a single explosion, but it looks the same in I guess it is good to be merged now. |
ZhilkinSerg
merged commit bea5321
into
CleverRaven:master
Aug 24, 2018
ZhilkinSerg
removed their assignment
Aug 24, 2018
This comment has been minimized.
This comment has been minimized.
|
That's working as expected, fragment shouldn't hard targets, but the blast
itself would, and blasts haven't been fixed.
|
narc0tiq
reviewed
Aug 24, 2018
| m.bash( target, damage / 10, true ); | ||
| add_msg( ngettext( "The %s is hit by %s bomb fragment, %s.", | ||
| "The %s is hit by %s bomb fragments, %s.", total_hits ), | ||
| critter->disp_name().c_str(), impact_count, damage_description ); |
This comment has been minimized.
This comment has been minimized.
narc0tiq
Aug 24, 2018
Contributor
I just noticed this creates lines like "The the zombie is hit..." and "The the crawling zombie....". I think you wanted critter->get_name() instead?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
CoroNaut
commented
Aug 27, 2018
|
I ran over a landmine by accident going 60kph in my bike and all it did was damage my stethoscope i was wearing by 1 point, didn't even damage the vehicle any. Is this intentional or did I get extremely lucky to not have 2 bikes with 1 wheel each? |
kevingranade commentedAug 14, 2018
•
edited
Fixes #24796
Fixes #24863
Drops fragment damage a bit overall, and also decreases fragment size.
The result is there are about 10x as many fragments flying around, but they deal about 1/20th the damage they did previously, so they dont defeat armor.
This is built on top of the perf fix.