Skip to content
Permalink
Browse files

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

  • Loading branch information...
rmarquis committed May 13, 2019
1 parent 6f2c196 commit 6ff60b749d4cd0919020bd81b60e244c71ea33e6
Showing with 9 additions and 4 deletions.
  1. +9 −4 src/cgame/cg_predict.c
@@ -133,19 +133,24 @@ float CG_ClientHitboxMaxZ(entityState_t *hitEnt, float def)

if (hitEnt->eFlags & EF_DEAD)
{
return 4;
return DEAD_VIEWHEIGHT + DEAD_BODYHEIGHT_DELTA;
}
else if (hitEnt->eFlags & EF_PRONE)
{
return 4;
return PRONE_VIEWHEIGHT + PRONE_BODYHEIGHT_DELTA;
}
else if (hitEnt->eFlags & EF_CROUCHING &&
cg.predictedPlayerState.velocity[0] == 0.f && cg.predictedPlayerState.velocity[1] == 0.f)
{
return CROUCH_VIEWHEIGHT + CROUCH_IDLE_BODYHEIGHT_DELTA;
}
else if (hitEnt->eFlags & EF_CROUCHING)
{
return 24;
return CROUCH_VIEWHEIGHT + CROUCH_BODYHEIGHT_DELTA;
}
else
{
return 36;
return DEFAULT_VIEWHEIGHT + DEFAULT_BODYHEIGHT_DELTA;
}
}

0 comments on commit 6ff60b7

Please sign in to comment.
You can’t perform that action at this time.