-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ensure critters are loaded around explosion #79291
Conversation
@GuardianDll: In case you're not notified and are anxious to continue with your PR: The relevant change is the addition of a single line that you can hack into your code during the testing phase and then remove when done. That would let you continue while this PR goes through the test and acceptance process. |
Don't we generate some of the terrains (craters?) via explostions? Would that mean there would be fresh critter corpses in those now? Or do those already have the critters loaded since they are close enough? |
This should actually repair a partially broken functionality, as the explosions are triggered by the reality bubble covering the explosion location, or covering the near side of the OMT the explosion on the remote side of the OMT resides on. Speculations about what might be possible in the future: I think it might be possible to "age" corpses generated by blasts by setting the corpse generation time to the time at which the blast is supposed to have gone off to get them to decay very rapidly. It might also be possible to locate the OM generation code and have it trigger the corresponding explosions at that time, which would produce pre-aged corpses and (usually) provide time for injuries to heal on survivors as well as ready to rise zombies, at the cost of early generation of some of the OMTs. |
To me, this sounds like a wrong coordinates conversion was used. I would guess mortaring the place loaded the critters and the loading loads them at the wrong coordinates. Just a hunch. I haven't looked at the code. |
Please provide a draft PR, as there's currently nothing in the game that does what you do. The current functionality only triggers the explosion as it's loaded by the reality bubble activities, while you're actually causing it to explode at the impact point while far away from it. Oh, another question what may be generally useful: How do you make the zombies to stay put? They have the advantage over breathers in that they don't melt away, but rather leave corpses behind, which would be useful to try to track down the corpse teleportation issue. |
Here's the one: #79303
the test was performed using 60mm_shell_m768, which deals the damage similar to a grenade, and can't create a massive crater
I used quick setup, which gives a speed mutation, which increases your speed ten times, so even when i walk, zombies have no time to spread much |
Summary
None
Purpose of change
Correct issue mentioned in comment on #75567 after it was closed, i.e. creatures around far explosions are not (always) directly affected by it.
While looking at the code, it was cleaned up a little by making use of operation to get absolute critter positions. This operation didn't exist when the code was written, I think. That reduced the need to juggle with the reality bubble (there's still a need to determine whether player feedback should be printed).
Describe the solution
Add loading of critters on the explosion map before processing the explosion.
It was a bit tricky to track that one down, as the loading isn't performed by anything directly map related, but rather as a result of PC movement.
Describe alternatives you've considered
Testing
Created a test setup with breathers around a barrel bomb (breathers don't move from their locations). Saved it.
Activated the bomb and then walked well over 100 steps east and then returned.
Verified that some critters near the PC were injured, but those at the far side of the explosion weren't, and those around the barrel were injured only as a result of falling.
Made the changes and repeated the test.
Verified many breathers were gone, and all of the remaining ones were injured.
Also, as part of this test, a breakpoint was set in creature_tracker::remove to verify the "extra" critters placed into the creature tracker were removed properly. This was done by walking back towards the explosion, stop when the explosion happens and set the breakpoint, and then walk away again, verifying the number of loaded critters dropped to the "ambient" number before walking back to the explosion site.
Before:
After:
Additional context