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

Autodemo #26

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Autodemo #26

wants to merge 3 commits into from

Conversation

kalhartt
Copy link

Working on #23

First this fixes the 0kb demo issue by checking if a file exists before renaming. This issue happens when dstart is called but record fails. The next dstop renames nothing to a demo.

Second, I introduce rs_autoDemoName, I haven't fixed the default name because we should discuss that first. Available tokens are playername, mapname, hour, min, sec, milli, random

This does not fix the issue with recording the very first run. When you join a server, dstart is called before you are actually ingame and record fails. Hardly a big issue since noone (except weqo?) ever recs their first attempt. We could look at delaying the first dstart call or putting players in spec when they join.

@QaleQ
Copy link

QaleQ commented Jan 24, 2014

about the choice of name: rs_autoDemoName, it'll be easier for people to find this command (and understand it) if we incorporated the full original command. so either rs_autoRaceDemo with rs_autoRaceDemoName or; rs_autoDemo with rs_autoDemoName. the latter is preferable imo, though, if changing the original command name will cause trouble somehow (like if servers needs to be updated for command to be updated etc) i suppose the first one will do.

also, "hour" is not really needed in demo name options, is it? can't we just keep it stacking minutes until it hits 100 and thus resets the counter anyway? and what is this "random" token?

this is a huge issue for tech maps and such.. trish and myself also get a good time the first time around pretty often, and a few oldtimers that statswhore tend to kill themselves right before finish to prevent bad skill, they could also suffer badly from first demo being broken. bring back spec @ connect even if it doens't fix issue plz. didn't turn out to be a very beneficial feature anyway.

@kalhartt
Copy link
Author

I like rs_autoDemo and rs_autoDemoName, I think rs with Race is redundant. I don't think servers use rs_autoRaceDemo explicitly, I'm pretty sure it's all suggested through dstart/dstop/dcancel.

As for the tokens, I don't see any harm in including hour or random, you don't have to use them. We could let minutes be the max time denomination, lets ask what people prefer. The random token was intended to avoid naming conflicts if you make an exactly tied record, again you don't have to use it. I was wondering if we should make the current date/time available as a token as well.

Settled then, I'll look into spec@connect and see if it helps.

@kalhartt
Copy link
Author

Can confirm that starting players as spectators fixes the first demo not recording problem.

@kalhartt
Copy link
Author

Looks like there are still bugs on windows side, I'll outline the current behavior (before the commits from this PR) here.

Join a server with empty demos folder

  • Automatically pushed into players
  • Open console, you'll see a message "You must be in a level to record."
  • Linux No demo is started recording
  • Windows currentrace.rec starts recording anyways, (maybe dstart is called a 2nd time?)

This issue is fixed on linux with d155941

Finish a map for the first time (assuming the demo started recording and is non-zero)

  • blank file is created at "demos//"
  • Linux blank file replaced with currentrace.rec

Seems like trap_FS_MoveFile fails the first time on windows, I have no idea why.

Subsequent records work as expected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants