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

Savelocs should store player explosives #1338

Closed
Gocnak opened this issue May 21, 2021 · 2 comments
Closed

Savelocs should store player explosives #1338

Gocnak opened this issue May 21, 2021 · 2 comments
Assignees
Labels
Outcome: Resolved This was resolved, and will be in a future update. Priority: Medium Something that should be tried to be done in this release, but not as important as High priority. Size: Medium Something that may take a few days or so to implement. Type: Enhancement This can improve a system/thing already in place. Where: Game This is something for the main game code.

Comments

@Gocnak
Copy link
Member

Gocnak commented May 21, 2021

What feature is your improvement idea related to? Please describe.
Savelocs being used on explosive-based modes like SJ, RJ, Conc, and Defrag.

Describe the solution you'd like
Savelocs should store explosive entities created by the player. If I throw a conc, or shoot a rocket, or shoot a sticky, I expect to see those explosives in the world after teleporting back to the saveloc.

Notes:

  • Store a m_iSavelocCreator int variable on the explosive to be able to remove them easily when teleporting to another saveloc
  • Teleporting to the same saveloc over and over should only keep showing the same explosives at that time; delete all explosives and only create the ones from that saveloc
  • Use m_vecExplosives to cycle through the player's explosives
  • Weapon attack delay is already saved inside savelocs, but weapon charge time is not (see Savelocs should store player weapon state #1339)

I have a feeling saveloc KV format will need to be figured out beforehand but this can be a separate block from the player weapon data (in #1339).

@Gocnak Gocnak added Type: Enhancement This can improve a system/thing already in place. Priority: Medium Something that should be tried to be done in this release, but not as important as High priority. Size: Medium Something that may take a few days or so to implement. Where: Game This is something for the main game code. labels May 21, 2021
@Gocnak Gocnak added this to To do in 0.9.2 Release via automation May 21, 2021
@braem braem self-assigned this Jun 13, 2021
@braem braem moved this from To do to In progress in 0.9.2 Release Jun 14, 2021
@braem
Copy link
Member

braem commented Jun 14, 2021

I have this working for all explosives (apart from stick trigger outputs currently). Here is an example of what the keyvalues look like:
savedlocs.txt

Those beginning with explosive_ are the fields from the base explosive, CMomExplosive, whereas the sticky_ ones are class specific, in this case stickybombs. There is an inheritance on the savestate that makes it possible, which will fail to create the explosive if the types don't match. It uses the current gamemode to figure out which explosive needs to be created.

Teleporting to other savelocs calls DestroyExplosives() so there doesn't need to be any deletion of explosives apart from that. They are always destroyed on start zone enter as well.

Still missing weapon stuff like charge times and conc timer sounds (oh boy). I don't believe there is a way currently to offset a sound. I hope I'm mistaken. Anyways those are weapon specific stuffs not explosives.

@Gocnak Gocnak removed this from In progress in 0.9.2 Release Jun 20, 2021
@Gocnak Gocnak added this to To Do in 0.9.0 Release via automation Jun 20, 2021
@Gocnak Gocnak moved this from To Do to In Progress in 0.9.0 Release Jun 20, 2021
@Gocnak Gocnak added the Blocked: Needs testing & verification Needs testing and verification if properly fixed. label Jun 20, 2021
@hexaflexahexagon
Copy link
Member

explosive state is properly stored now so this can be closed. weapon state is coming later #1339

0.9.0 Release automation moved this from In Progress to Done Jun 23, 2021
@hexaflexahexagon hexaflexahexagon added Outcome: Resolved This was resolved, and will be in a future update. and removed Blocked: Needs testing & verification Needs testing and verification if properly fixed. labels Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Outcome: Resolved This was resolved, and will be in a future update. Priority: Medium Something that should be tried to be done in this release, but not as important as High priority. Size: Medium Something that may take a few days or so to implement. Type: Enhancement This can improve a system/thing already in place. Where: Game This is something for the main game code.
Projects
No open projects
0.9.0 Release
  
Done
Development

No branches or pull requests

3 participants