Skip to content

Add hud speedometer#18

Open
rtxa wants to merge 6 commits intoLevShisterov:masterfrom
rtxa:add-hud-speedometer
Open

Add hud speedometer#18
rtxa wants to merge 6 commits intoLevShisterov:masterfrom
rtxa:add-hud-speedometer

Conversation

@rtxa
Copy link
Copy Markdown
Contributor

@rtxa rtxa commented Feb 11, 2019

Useful when you are trying to improve your bhop skills. Thanks to Yalter, part of this code is from his OpenAG client.
By default is off, to turn it on, type hud_speedometer 1 in console.
How it looks in game:
Screenshot Speedometer

@tmp64
Copy link
Copy Markdown

tmp64 commented Feb 18, 2019

Why did you remove gEngfuncs.IsSpectateOnly() in 0cf31a8? If I'm not mistaken, it returns true if the client is connected to a HLTV proxy. g_IsSpectator is set in a server message so g_IsSpectator is probaly always 0 on HLTV.

@tmp64
Copy link
Copy Markdown

tmp64 commented Feb 18, 2019

Although, I'm not sure if V_CalcRefdef is called or not on HLTV.

@rtxa
Copy link
Copy Markdown
Contributor Author

rtxa commented Feb 18, 2019

Why did you remove gEngfuncs.IsSpectateOnly() in 0cf31a8? If I'm not mistaken, it returns true if the client is connected to a HLTV proxy. g_IsSpectator is set in a server message so g_IsSpectator is probaly always 0 on HLTV.

In my HL, IsSpectateOnly() is returning false even when you are spectating (any mode), maybe is an engine issue from an specific build, do you have tested?

Also, I think speedometer isn't going to show if server doesn't send Spectator msg when you go out from spectator (bugged hl.inc), maybe I will be better to check if he is in spectator mode with g_iUser1 and g_iUser2.

PD: Well, I have tested IsSpectateOnly() and it doesn't work at least in builds 7960 (Steam) and 3248 (NGHL)

@tmp64
Copy link
Copy Markdown

tmp64 commented Feb 18, 2019

I've just tested and it does return true if you are connected to HLTV proxy.

By HLTV proxy I mean hltv.exe in game's directory. It works like this:

  1. you start it;
  2. in HLTV console: connect <server address>;
  3. in client console: connect <HLTV address>
  4. gEngFuncs.IsSpectator() returns true.

@rtxa
Copy link
Copy Markdown
Contributor Author

rtxa commented Feb 18, 2019

I've just tested and it does return true if you are connected to HLTV proxy.

By HLTV proxy I mean hltv.exe in game's directory. It works like this:

1. you start it;

2. in HLTV console: connect ;

3. in client console: connect

4. gEngFuncs.IsSpectator() returns true.

Okay, that means that it only works when you are using HLTV, not when you are playing normally.

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