BugfixedHL icon indicating copy to clipboard operation
BugfixedHL copied to clipboard

Add hud speedometer

Open rtxa opened this issue 6 years ago • 5 comments

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

rtxa avatar Feb 11 '19 23:02 rtxa

Why did you remove gEngfuncs.IsSpectateOnly() in 0cf31a87860f954031f00e7ceb5091f4c4e8dc40? 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 avatar Feb 18 '19 09:02 tmp64

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

tmp64 avatar Feb 18 '19 09:02 tmp64

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)

rtxa avatar Feb 18 '19 13:02 rtxa

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.

tmp64 avatar Feb 18 '19 14:02 tmp64

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.

rtxa avatar Feb 18 '19 14:02 rtxa