-
Notifications
You must be signed in to change notification settings - Fork 9
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
capture: Add bxt_cap_start_segment #58
Conversation
Maybe instead of a new cvar it should be a new |
Alrighty then. I got your permission. |
744af74
to
9d415a6
Compare
So this will output all of the demos in a directory instead. Some stuffs still need adding on. First is first demo will not have its name saved anywhere, even in the game because I don't really know why. So it just needs the |
This state should be good. Take a look at this one first before you get to the other one because I add some changes of this one to another so it looks very messy... |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not review everything yet
src/hooks/engine.rs
Outdated
// demo_playback::CURRENT_DEMO should be reset here too | ||
// but there are some stuffs with first demo so no. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you clarify this comment please, my mind reading is pretty rusty lately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might miss something but here is what I recall vaguely happens when bxt_play_run/folder
do things:
- Things set up and happen then
demo_playback::set_next_demo
is called. The name of the first demo is in thecls.demos
array. - Prepend the command "demos".
- "demos" calls
Host_NextDemo
. demo_playback::set_next_demo
is called again. The name of the second demo is now in the array instead.- The first demo is played, but
cls.demos
stores the name of next demo.
So, if I reset the name of currently playing demo name in that hooked function, the name of the first demo will not be known. CL_Disconnect
is called along with the Host_NextDemo
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To add on, CL_Disconnect
is called before setting the next demo. So clearing the current demo name on disconnect will not make the name of the current demo known.
So it is better to use "bxt_cap_start_segment" with "bxt_play_run/folder". I hope no one would try to do something not intended, haha.
This all happens because of the first demo specifically. If first demo name is known then ig. But I guess this would means some changes to how "bxt_play_run/folder" works.
6aae134
to
5429162
Compare
I reworked this how I think it should be implemented and work. I renamed the command to |
Thanks khanghugo for doing most of the initial work.
5429162
to
4b4a31f
Compare
Thanks. |
Closes #56
Still WIP but it works. There are some details worth discussing and a bug looking bit too much to fix.Right now, it couples with "bxt_play_run/folder" and it will ignore "bxt_cap_start" argument. Not sure what the argument should mean but in the mentioned issue, I propose to have it as the prefix for the file name ("prefix_demoname.mp4" as a result). But that route needs #57 to be properly addressed. Otherwise, I think the argument could mean THE file name and following split will have number trailing ("filename_number.mp4"). That is what I can come up with to still have "bxt_cap_start" around.
If we go with the prefix, the demo name of the first demo seems a bit too much to get. I look around the source and getting the demo file name is really tricky.
demo_playback.rs
module does help getting the name but it still does not show the name of the first demo. Maybe I need to get good or go dirty.For the time being, I don't think this would be useful for live TAS recording so I don't think it needs to be here.