Bug #1120

cg_debugPlayerHitbox doesn't show all & correct hitboxes

Added by IR4T4 12 months ago. Updated 5 months ago.

Status:Fixed% Done:

100%

Priority:NormalSpent time:-
Assignee:-
Category:Mod CGAME
Target version:2.77
OS: Arch:

Description

1.) cg_debugPlayerHitbox 7 should draw head, client/body & legs hitboxes. Only client box is always drawn - legs and head are visible from time to time. Head is fully messed.

2.) hitboxes are not adjusted for dead players.


- adjust colors of boxes

2018-10-22-120849-oasis.jpg (209 KB) IR4T4, 22.10.2018 12:14

942

Related issues

Related to ET: Legacy Development - Feature #198: All new hitbox and bounding box system New 10.02.2013
Related to ET: Legacy Development - Feature #1174: Increase slightly the height of wounded player's hitbox Fixed 18.01.2019
Related to ET: Legacy Development - Bug #428: Rework/fix G_DebugHitBoxes (g_debugBullets 3) Fixed 22.12.2013

Associated revisions

Revision 1fccfc39
Added by Spyhawk 5 months ago

mod: fixed prone hitbox height and debug hitbox rework, refs #198 #1120

  • adjusted prone hitbox height (was twice as high as etpro)
  • added slightly lower hitbox when crouching without moving
  • adjusted height of client side hitboxes to be same as server side
  • added missing prone legs hitbox in server side debug hitbox mode
  • added headbox in client side debug hitbox code
  • adjusted debug hitbox colours

Revision 6ff60b74
Added by Spyhawk 5 months ago

cgame: adjusted client side predicted hiboxes height, refs #198 #1120

Revision b208525b
Added by Spyhawk 5 months ago

game: fixed legs debug hitbox not displayed, refs #198 #1120

Revision d447aabe
Added by Spyhawk 5 months ago

cgame: added client side head and legs debug hitboxes, refs #198 #1220

Note: readhead code is server side only

Revision fabe421f
Added by Spyhawk 5 months ago

cgame: display debug hitbox for current alive client only, refs #198 #1120

Revision 1a42738b
Added by Spyhawk 5 months ago

mod: small hitbox height optimization, refs #198 #1120

Revision 9952397d
Added by Spyhawk 5 months ago

game: fixed debug hitbox head ent reference, refs #198 #1120

Also minor comment cleanup

See 9b1339457c6679b7c0a56dd8ffe279b8711f3f68

History

#1 Updated by IR4T4 12 months ago

#2 Updated by IR4T4 12 months ago

  • Description updated (diff)

#3 Updated by Spyhawk 6 months ago

  • Related to Feature #198: All new hitbox and bounding box system added

#4 Updated by Spyhawk 6 months ago

  • Target version changed from 2.78 to 2.77
(from #198)
  • adjust cg_debugplayerHitboxes so it display the same hitboxes as predicted server side (doesn’t take ZMax into account atm) (done)
  • use better colors for cg_debugplayerHitboxes (blue in hardly visible) (done)
  • adjust g_debugPlayerHitboxes so it displays the legs hitbox server side too (done)
  • adjust cg_debugplayerHitboxes so it displays headbox in all position on the client side (done, though not realhead)
  • check if dead players have a legs hitbox (like prone) or if it is missing. (it’s missing. position seems inaccurate on the server side, and the client side has legs/head inverted) (fixed)
  • adjust crouch hotbox for idle/moving status (done)
  • fix bounding box height (prone position, maybe dead too?) (tracked in #503)
  • check prediction code (keep in mind realhead is only available server side) (done, but keep in mind realhead is server side only)
  • displaying client hitbox for all client on server is buggy (in fact, not possible). We should restrict its use to the actual client only. (done)
  • don’t display client hitbox if client is sent to limbo already
  • check client side cvar (server side should be okay with two possible bitflag values only) (done)
  • optimization (simplify hitbox delta and use direct body height instead)

Check hit regions and how the related to the current hitbox system. (done - they’re completely unrelated and only used to generate end of game stats).

#5 Updated by keMoN 6 months ago

Please document the changes also in the wiki section once done.
https://dev.etlegacy.com/projects/etlegacy/wiki/List_of_Cvars_(new)#cg_debugPlayerHitboxes

I noticed that in the code it says that 1 is for hitbox and 4 the position marker. Is that correct? The prone hitbox would be huge then!

#6 Updated by Spyhawk 6 months ago

Client-side hitboxes are very inaccurate, lack headbox but they do display legs hitbox. Server side hitboxes are more accurate but lack the legs hitbox. This require a complete overhaul.

#7 Updated by Spyhawk 5 months ago

  • % Done changed from 0 to 50

#8 Updated by Spyhawk 5 months ago

  • Related to Feature #1174: Increase slightly the height of wounded player's hitbox added

#9 Updated by Spyhawk 5 months ago

  • Status changed from New to Fixed
  • % Done changed from 50 to 100

There are still some mine issues left when enabling server hitboxes with multiple clients, but now the debug code has reached a point where it is actually display actual hitboxes and is thus usable.
Keep in mind client side hitbox doesn’t make use of realhead code, and legs/head hiboxes are approximate only (they’re fine server side).

Bounding box height issue is tracked in #503.
I’d thus consider this issue fixed.

#10 Updated by Spyhawk 5 months ago

  • Related to Bug #428: Rework/fix G_DebugHitBoxes (g_debugBullets 3) added

Also available in: Atom PDF