-
Notifications
You must be signed in to change notification settings - Fork 39
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
Necromancing CS1.6 support from cs branch #322
Conversation
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.
Instead of just updating the HLStrafe submodule commit to your fork, you should PR the change into HLStrafe, and when that's merged, subsequently update the submodule to point at the commit in the main HLStrafe repo.
Thanks for the feedback. I didn't really intend to have these commits flooding over here. Let me see what I can do to clean them up. |
Here are all the changes here. As for hlstrafe changes, I can make some more CS1.6 specific changes involving movement speed to make it work a bit more. I will create another pull request when that comes and hope to get merged. |
BunnymodXT/hud_custom.cpp
Outdated
if (CVars::bxt_hud_stamina.GetBool()) | ||
{ | ||
int x, y; | ||
GetPosition(CVars::bxt_hud_stamina_offset, CVars::bxt_hud_stamina_anchor, &x, &y, -200, (si.iCharHeight * 16) + 4); |
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.
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.
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.
At this stage, it seems pretty good. Not sure how well it would work on Windows but all the stuffs are there. |
Here is a small TAS that can be used to verified on Windows. Made with the commit. |
Beside that, lots of things are still borked (maybe on my end because I cannot verify much). Eg: you cannot record demo or use other things like hud_useable. It needs some more work. |
BunnymodXT/modules/HwDLL.cpp
Outdated
@@ -4735,6 +4738,20 @@ HLStrafe::MovementVars HwDLL::GetMovementVars() | |||
vars.Bounce = CVars::sv_bounce.GetFloat(); | |||
vars.Bhopcap = CVars::bxt_bhopcap.GetBool(); | |||
|
|||
if (cl.DoesGameDirMatch("cstrike")) { |
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.
Please cache this with a static bool is_cstrike = cl.DoesGameDirMatch("cstrike");
so that we don't have a string comparison every frame. Also I guess when the maxspeed PR is merged (pending on a similar change) this should be rebased on top of that.
You should be able to rebase on top of master now to get Smiley's client maxspeed thing. |
Yep, rebase is here. If there is anything else, I can fix. Also, tested for any issues and none. |
Thanks! Finally, the CS 1.6 support is back! |
From master...cs
This was a feature long time ago that enables further TAS capability in CS1.6 but long remains unsupported. I just want it back.
One thing, Windows pattern is 7 years old but I've checked the instructions for client.dll and it looks reasonable enough to work.
Here are the bytes to patch (just using cl_yawspeed as an example)


And this is the result

The patch will push cl_yawspeed and cl_pitchspeed value onto top stack regardless of any branching involving comparison between itself and the two other limit values.
I then TAS it a bit and it works. The prediction closely matches the simulator, or it just is. Before, the yaw lock would not only prevent the script from strafing closer but also all the new fancy camera smoothing stuffs.
For attributions, I have never written a line of code in my entire life so most of things here are simply mirroring already existing code and mainly the one you had initially in the cs branch.