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

Restored 'give' command for CS 1.6 #353

Merged
merged 2 commits into from Oct 28, 2022

Conversation

SmileyAG
Copy link
Collaborator

@SmileyAG SmileyAG commented Oct 15, 2022

0

@khanghugo
Copy link
Contributor

Very good addition.

Starting a game with deathmatch 1 would also initialize a listen server, which takes some extra time during playback and lots of time for second game simulator to catch up. This would also help with TAS optimizer multi-game simulation as everything is just instantly faster. The set up for a TAS would be minimally sv_cheats 1 for give.

@SmileyAG SmileyAG force-pushed the restore-give-command-cs16 branch 2 times, most recently from 463b22a to 45e0e06 Compare October 16, 2022 09:23
@@ -2220,37 +2237,39 @@ HOOK_DEF_1(ServerDLL, void, __cdecl, CTriggerVolume__Spawn_Linux, void*, thisptr

HOOK_DEF_1(ServerDLL, void, __cdecl, ClientCommand, edict_t*, pEntity)
{
#ifdef _WIN32
if (!ORIG_CBasePlayer__ForceClientDllUpdate) {
if (!pEngfuncs || !pEntity->pvPrivateData) {
Copy link
Owner

Choose a reason for hiding this comment

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

Why does this check pEntity->pvPrivateData when it's never used below?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Otherwise it would crash game and that check used in original ClientCommand as well: https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/dlls/client.cpp#L507-L508

@YaLTeR YaLTeR merged commit f149019 into YaLTeR:master Oct 28, 2022
@YaLTeR
Copy link
Owner

YaLTeR commented Oct 28, 2022

Thanks

@SmileyAG SmileyAG deleted the restore-give-command-cs16 branch October 31, 2022 11:44
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

3 participants