mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Address review feedback
This commit is contained in:
committed by
Asdow
parent
8b1c4effa0
commit
d4abc82488
@@ -12590,7 +12590,6 @@ UINT16 PickARandomLaunchable(UINT16 itemIndex)
|
||||
UINT16 usRandom = 0;
|
||||
UINT16 lowestCoolness = LowestLaunchableCoolness(itemIndex);
|
||||
|
||||
// Flugente: the above code is highly dubious.. why do we loop over all items 2 times, and why that obscure usRandom--; business? This can cause an underflow!
|
||||
BOOLEAN isnight = NightTime();
|
||||
UINT16 maxcoolness = max( HighestPlayerProgressPercentage() / 10, lowestCoolness );
|
||||
|
||||
|
||||
@@ -5296,6 +5296,8 @@ INT8 FireBulletGivenTarget( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY, FLOA
|
||||
dDeltaX = dEndX - dStartX;
|
||||
dDeltaY = dEndY - dStartY;
|
||||
dDeltaZ = dEndZ - dStartZ;
|
||||
/* see previous commit for historically interesting comment on the reason Distance2D instead
|
||||
of Distance3D is used here */
|
||||
d2DDistance = Distance2D( dDeltaX, dDeltaY );
|
||||
iDistance = (INT32) d2DDistance;
|
||||
|
||||
|
||||
@@ -800,7 +800,6 @@ int AStarPathfinder::GetPath(SOLDIERTYPE *s ,
|
||||
if (gfDisplayCoverValues && gfDrawPathPoints)
|
||||
{
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
// The RenderCoverDebugInfo call is now made by RenderWorld. So don't try to call it here
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -3919,8 +3919,6 @@ BOOLEAN SOLDIERTYPE::EVENT_InitNewSoldierAnim( UINT16 usNewState, UINT16 usStart
|
||||
|
||||
if ( !this->flags.fDontChargeAPsForStanceChange )
|
||||
{
|
||||
// CHRISL
|
||||
// SANDRO - APBPConstants[AP_CROUCH] changed to GetAPsCrouch()
|
||||
if ( UsingNewInventorySystem( ) )
|
||||
{
|
||||
if ( usNewState == KNEEL_UP || usNewState == BIGMERC_CROUCH_TRANS_OUTOF )
|
||||
@@ -3950,32 +3948,25 @@ BOOLEAN SOLDIERTYPE::EVENT_InitNewSoldierAnim( UINT16 usNewState, UINT16 usStart
|
||||
// ATE: If we are NOT waiting for prone down...
|
||||
if ( this->flags.bTurningFromPronePosition < TURNING_FROM_PRONE_START_UP_FROM_MOVE && !this->flags.fDontChargeAPsForStanceChange )
|
||||
{
|
||||
// silversurfer: of course we deduct points for stance changes!
|
||||
// ATE: Don't do this if we are still 'moving'....
|
||||
// SANDRO - APBPConstants[AP_PRONE] changed to GetAPsProne()
|
||||
//if ( this->sGridNo == this->pathing.sFinalDestination || this->pathing.usPathIndex == 0 )
|
||||
//{
|
||||
// CHRISL
|
||||
if ( UsingNewInventorySystem( ) )
|
||||
if ( UsingNewInventorySystem( ) )
|
||||
{
|
||||
if ( usNewState == PRONE_UP )
|
||||
{
|
||||
if ( usNewState == PRONE_UP )
|
||||
{
|
||||
sAPCost = GetAPsProne( this, TRUE * 2 );
|
||||
sBPCost = APBPConstants[BP_PRONE] + 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
sAPCost = GetAPsProne( this, TRUE );
|
||||
sBPCost = APBPConstants[BP_PRONE] + 1;
|
||||
}
|
||||
sAPCost = GetAPsProne( this, TRUE * 2 );
|
||||
sBPCost = APBPConstants[BP_PRONE] + 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
sAPCost = GetAPsProne( this, FALSE );
|
||||
sBPCost = APBPConstants[BP_PRONE];
|
||||
sAPCost = GetAPsProne( this, TRUE );
|
||||
sBPCost = APBPConstants[BP_PRONE] + 1;
|
||||
}
|
||||
DeductPoints( this, sAPCost, sBPCost );
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
sAPCost = GetAPsProne( this, FALSE );
|
||||
sBPCost = APBPConstants[BP_PRONE];
|
||||
}
|
||||
DeductPoints( this, sAPCost, sBPCost );
|
||||
}
|
||||
this->flags.fDontChargeAPsForStanceChange = FALSE;
|
||||
break;
|
||||
@@ -4311,8 +4302,6 @@ BOOLEAN SOLDIERTYPE::EVENT_InitNewSoldierAnim( UINT16 usNewState, UINT16 usStart
|
||||
// Reset some animation values
|
||||
this->flags.fForceShade = FALSE;
|
||||
|
||||
// CHECK IF WE ARE AT AN IDLE ACTION
|
||||
|
||||
// ATE; For some animations that could use some variations, do so....
|
||||
if ( usNewState == CHARIOTS_OF_FIRE || usNewState == BODYEXPLODING )
|
||||
{
|
||||
@@ -7114,7 +7103,6 @@ BOOLEAN SOLDIERTYPE::EVENT_InternalGetNewSoldierPath( INT32 sDestGridNo, UINT16
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
// we can use the soldier's level here because we don't have pathing across levels right now...
|
||||
{
|
||||
iDest = FindBestPath( this, sDestGridNo, this->pathing.bLevel, usMovementAnim, COPYROUTE, fFlags );
|
||||
fContinue = (iDest != 0);
|
||||
|
||||
@@ -355,9 +355,6 @@ INT8 TileIsClear( SOLDIERTYPE *pSoldier, INT8 bDirection, INT32 sGridNo, INT8 b
|
||||
pSoldier->flags.fBlockedByAnotherMerc = FALSE;
|
||||
return( MOVE_TILE_STATIONARY_BLOCKED );
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Unset flag for blocked by soldier...
|
||||
|
||||
@@ -1383,9 +1383,6 @@ INT16 DistanceVisible(SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir,
|
||||
// let tanks see and be seen further (at night)
|
||||
if ( (ARMED_VEHICLE( pSoldier ) && sDistVisible > 0) || (pSubject && ARMED_VEHICLE( pSubject )) )
|
||||
{
|
||||
// 0verhaul: This bit of code 1) seems to have no real reason to exist (MaxDistVisible just calls this function anyway),
|
||||
// and 2) causes infinite recursion because MaxDistVisible just calls this function, which comes right back here. Just
|
||||
// add 5 to sDistVisible and go on.
|
||||
sDistVisible = sDistVisible + 5;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user