mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
SIDE_FACING_DIVISOR: allow this option to work for crouched target, but with lowered divisor.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9377 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+6
-1
@@ -9693,8 +9693,9 @@ void LimitImpactPointByFacing( SOLDIERTYPE *pShooter, SOLDIERTYPE *pTarget, FLOA
|
|||||||
// sevenfm: only allow this mechanics for standing human bodytype, as in other cases it may result in balance issues
|
// sevenfm: only allow this mechanics for standing human bodytype, as in other cases it may result in balance issues
|
||||||
if(!pShooter ||
|
if(!pShooter ||
|
||||||
!pTarget ||
|
!pTarget ||
|
||||||
|
gGameCTHConstants.SIDE_FACING_DIVISOR <= 1.0f ||
|
||||||
!IS_MERC_BODY_TYPE(pTarget) && !IS_CIV_BODY_TYPE(pTarget) ||
|
!IS_MERC_BODY_TYPE(pTarget) && !IS_CIV_BODY_TYPE(pTarget) ||
|
||||||
gAnimControl[pTarget->usAnimState].ubEndHeight < ANIM_STAND ||
|
gAnimControl[pTarget->usAnimState].ubEndHeight < ANIM_CROUCH ||
|
||||||
pShooter->bAimShotLocation == AIM_SHOT_HEAD)
|
pShooter->bAimShotLocation == AIM_SHOT_HEAD)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -9704,6 +9705,10 @@ void LimitImpactPointByFacing( SOLDIERTYPE *pShooter, SOLDIERTYPE *pTarget, FLOA
|
|||||||
UINT8 iTargetFacing = pTarget->ubDirection;
|
UINT8 iTargetFacing = pTarget->ubDirection;
|
||||||
FLOAT iDivisor = gGameCTHConstants.SIDE_FACING_DIVISOR;
|
FLOAT iDivisor = gGameCTHConstants.SIDE_FACING_DIVISOR;
|
||||||
|
|
||||||
|
// sevenfm: lower modifier for crouched
|
||||||
|
if (gAnimControl[pTarget->usAnimState].ubEndHeight == ANIM_CROUCH)
|
||||||
|
iDivisor = 1.0f + (iDivisor - 1.0f) / 2.0f;
|
||||||
|
|
||||||
switch (iTargetFacing)
|
switch (iTargetFacing)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user