Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Log health to demo on change #293

Merged
merged 8 commits into from
May 25, 2022
Merged

Log health to demo on change #293

merged 8 commits into from
May 25, 2022

Conversation

SmileyAG
Copy link
Collaborator

0

@SmileyAG SmileyAG force-pushed the runtime-health branch 2 times, most recently from f3af76d to 617506c Compare May 21, 2022 03:05
@SmileyAG SmileyAG marked this pull request as draft May 21, 2022 03:21
@SmileyAG SmileyAG marked this pull request as ready for review May 21, 2022 13:35
@SmileyAG SmileyAG changed the title Log player.health value to demos Log player.health value to demos, always render a local player model when watching a POV demo with dem_forcehltv 1 May 22, 2022
@SmileyAG SmileyAG changed the title Log player.health value to demos, always render a local player model when watching a POV demo with dem_forcehltv 1 Log health to demo on change, always render a local player model when watching a POV demo with dem_forcehltv 1 May 22, 2022
…model when watching a POV demo with dem_forcehltv 1
@SmileyAG
Copy link
Collaborator Author

SmileyAG commented May 22, 2022

Merge? @YaLTeR

Reason why I added bxt_hud_health_override_in_demo, because at the moment there is no changes for parsing health data from current demo playback to in-game HUD

And, even it would be done later in which I hope, I can make suspicions that it would be works correctly only for playdemo & bxt_play_run, but not for viewdemo (cuz you can set any timestamp in it without watching frames at which health changes)

@YaLTeR
Copy link
Owner

YaLTeR commented May 22, 2022

Why does this remove bxt_show_player_in_hltv?

@SmileyAG
Copy link
Collaborator Author

SmileyAG commented May 22, 2022

Why does this remove bxt_show_player_in_hltv?

I don't think it's needs? Or at least I could return it back, but set value to 1 as default.

@YaLTeR
Copy link
Owner

YaLTeR commented May 22, 2022

Like, regardless, it's completely unrelated and should be a separate PR.

@SmileyAG SmileyAG changed the title Log health to demo on change, always render a local player model when watching a POV demo with dem_forcehltv 1 Log health to demo on change May 22, 2022
@SmileyAG
Copy link
Collaborator Author

Like, regardless, it's completely unrelated and should be a separate PR.

Can be merged now.

@SmileyAG
Copy link
Collaborator Author

@YaLTeR Now?

@@ -128,6 +128,7 @@ namespace CVars
CVarWrapper bxt_hud_health("bxt_hud_health", "0");
CVarWrapper bxt_hud_health_offset("bxt_hud_health_offset", "");
CVarWrapper bxt_hud_health_anchor("bxt_hud_health_anchor", "0.5 1");
CVarWrapper bxt_hud_health_override_in_demo("bxt_hud_health_override_in_demo", "0");
Copy link
Owner

Choose a reason for hiding this comment

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

The recording to demo part is good to merge, however this cvar I don't really like (passing the value through a cvar shouldn't be required here). Since it's not hooked up anyway (nothing sets it), maybe you could remove it from the PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if (ClientDLL::GetInstance().pEngfuncs->pDemoAPI->IsPlayingback() && CVars::bxt_hud_health_override_in_demo.GetInt() >= 1)
DrawNumber(CVars::bxt_hud_health_override_in_demo.GetInt(), x, y);
else
DrawNumber(static_cast<int>(player.health), x, y);

That should be a temporary solution for renders, before someone would implement the proper parsing of health from BXT demo data to bxt_hud_health (#294), so I don't want to remove that cvar at the moment.

Copy link
Owner

Choose a reason for hiding this comment

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

Is it really useful for renders? Like, it doesn't change the in-game HP, only the BXT HUD...

Copy link
Collaborator Author

@SmileyAG SmileyAG May 25, 2022

Choose a reason for hiding this comment

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

Because at the moment I could dump health from BXT Demo Data with special tool and then set that value to bxt_hud_health_override_in_demo command, so yeah, that useful.

That cvar might be removed when there is would be a implementation of parsing health to in-game from BXT Data while demo playback.

Copy link
Owner

Choose a reason for hiding this comment

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

Alright I suppose

@YaLTeR YaLTeR merged commit 74f12f9 into YaLTeR:master May 25, 2022
@SmileyAG SmileyAG deleted the runtime-health branch May 25, 2022 17:16
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants