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

CS1.6 related changes for TAS Optimizer #50

Merged
merged 5 commits into from
Oct 8, 2022
Merged

Conversation

khanghugo
Copy link
Contributor

Hmmm, it doesn't look up to standard from my standard.

@khanghugo khanghugo marked this pull request as draft October 6, 2022 05:14
@khanghugo khanghugo marked this pull request as ready for review October 7, 2022 02:46
@khanghugo
Copy link
Contributor Author

khanghugo commented Oct 7, 2022

// Duck()
if state.player.ducking || (parameters.ducktap_slow && (state.player.in_duck_animation || input.duck)) {
state.wish_speed *= 0.333;

state.player.in_duck_animation condition does not work (as in doing nothing) for CS1.6 duck tap slow but I just want to keep it on parity with BunnymodXT. More or less, it is just a condition that does nothing but only input.duck is responsible for that. I am unaware if it does cause any problems.

There is an issue with lgagst being weird every 1/1000 bhop block where it refuses to jump with dbg/dbc and keeps on walking in duck unless lgagst is toggled off. It happens with prediction but second game simulator corrects it just fine. I am not sure if this could be the cause. When I encounter that occurrence, I might just try out and see and I hope that is isn't. I guess this is unrelated. And fixed.

Copy link
Owner

@YaLTeR YaLTeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but needs a few improvements.

bxt-strafe/src/lib.rs Outdated Show resolved Hide resolved
bxt-strafe/src/lib.rs Outdated Show resolved Hide resolved
bxt-strafe/src/lib.rs Outdated Show resolved Hide resolved
bxt-strafe/src/lib.rs Outdated Show resolved Hide resolved
bxt-strafe/src/steps.rs Outdated Show resolved Hide resolved
bxt-strafe/src/lib.rs Show resolved Hide resolved
src/modules/tas_optimizer/mod.rs Outdated Show resolved Hide resolved
src/modules/tas_optimizer/mod.rs Outdated Show resolved Hide resolved
src/modules/tas_optimizer/mod.rs Outdated Show resolved Hide resolved
src/modules/tas_optimizer/mod.rs Outdated Show resolved Hide resolved
@khanghugo
Copy link
Contributor Author

Thanks, this seems reasonable. Let me do that.

@khanghugo
Copy link
Contributor Author

This has all the changes except the unresolved one, not sure how it would proceed 👍

let max_speed = get_cvar_f32(marker, "sv_maxspeed").unwrap_or(320.);
let client_max_speed = engine::pmove
.get_opt(marker)
.map(|pmove| (**pmove).clientmaxspeed)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see BXT uses GetClientMaxspeed() for this. I'm not sure using pmove is equivalent, isn't it one frame off? Since pmove is only filled/updated later in the frame.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not aware of it being one frame off. It does sync well on my end. If it is one frame off then it would be one frame off the very first frame of the TAS as weapon speed would be the same the whole run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it is in the bind, so I just use whatever is there.

@YaLTeR YaLTeR merged commit 30551e5 into YaLTeR:master Oct 8, 2022
@YaLTeR
Copy link
Owner

YaLTeR commented Oct 8, 2022

Thanks!

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.

None yet

2 participants