mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
************************************************************
* Merged Source Code from Development Trunk: Revision 4063 * ************************************************************ - Source Code is merged from: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP - This will be the Source for the Beta 2011 Test git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4064 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+19
-13
@@ -369,9 +369,9 @@ void RemoveAllPhysicsObjects( )
|
||||
void SimulateObject( REAL_OBJECT *pObject, real deltaT )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"SimulateObject");
|
||||
|
||||
if ( !PhysicsUpdateLife( pObject, (float)deltaT ) )
|
||||
{
|
||||
// DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"SimulateObject: don't update life, returning");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -486,10 +486,15 @@ BOOLEAN PhysicsUpdateLife( REAL_OBJECT *pObject, real DeltaTime )
|
||||
|
||||
}
|
||||
|
||||
// End life if we are out of bounds....
|
||||
if ( !GridNoOnVisibleWorldTile( pObject->sGridNo ) )
|
||||
// WANNE.BMP: Only do this check on normal maps.
|
||||
// When we do this check on Big Maps it always returns false and we got wrong physics when trowing items!
|
||||
if (WORLD_COLS <= 160 && WORLD_ROWS <= 160)
|
||||
{
|
||||
pObject->fAlive = FALSE;
|
||||
// End life if we are out of bounds....
|
||||
if ( !GridNoOnVisibleWorldTile( pObject->sGridNo ) )
|
||||
{
|
||||
pObject->fAlive = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !pObject->fAlive )
|
||||
@@ -1496,9 +1501,7 @@ vector_3 FindBestForceForTrajectory( INT32 sSrcGridNo, INT32 sGridNo,INT16 sStar
|
||||
dRange = (float)GetRangeInCellCoordsFromGridNoDiff( sGridNo, sSrcGridNo );
|
||||
|
||||
//calculate force needed
|
||||
{
|
||||
dForce = (float)( 12.0 * ( sqrt( ( GRAVITY * dRange ) / sin( 2.0 * dzDegrees ) ) ) );
|
||||
}
|
||||
dForce = (float)( 12.0 * ( sqrt( ( GRAVITY * dRange ) / sin( 2.0 * dzDegrees ) ) ) );
|
||||
|
||||
do
|
||||
{
|
||||
@@ -1537,12 +1540,6 @@ vector_3 FindBestForceForTrajectory( INT32 sSrcGridNo, INT32 sGridNo,INT16 sStar
|
||||
|
||||
} while( TRUE );
|
||||
|
||||
// OK, we have our force, calculate change to get through without collide
|
||||
//if ( ChanceToGetThroughObjectTrajectory( sEndZ, pItem, &vPosition, &vForce, NULL ) == 0 )
|
||||
{
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Chance to get through throw is 0." );
|
||||
}
|
||||
|
||||
if ( pdMagForce )
|
||||
{
|
||||
(*pdMagForce) = dForce;
|
||||
@@ -2152,6 +2149,9 @@ FLOAT CalculateForceFromRange( INT16 sRange, FLOAT dDegrees )
|
||||
|
||||
FindBestForceForTrajectory( sSrcGridNo, sDestGridNo, GET_SOLDIER_THROW_HEIGHT( 0 ), 0, dDegrees, &gTempObject, &sFinalGridNo, &dMagForce );
|
||||
|
||||
// WANNE: Problem is the FORCE!!
|
||||
// dMagForce = 460.00;
|
||||
|
||||
return( dMagForce );
|
||||
}
|
||||
|
||||
@@ -2204,6 +2204,12 @@ void CalculateLaunchItemParamsForThrow( SOLDIERTYPE *pSoldier, INT32 sGridNo, UI
|
||||
{
|
||||
// then we hit!
|
||||
bMissBy = 0;
|
||||
|
||||
// SANDRO - new merc records
|
||||
if( pSoldier->bTeam == 0 && pSoldier->ubProfile != NO_PROFILE )
|
||||
{
|
||||
gMercProfiles[ pSoldier->ubProfile ].records.usShotsHit++;
|
||||
}
|
||||
}
|
||||
|
||||
//if ( 0 )
|
||||
|
||||
Reference in New Issue
Block a user