mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Merge branch 'master' into ExtraMercs
This commit is contained in:
+14
-22
@@ -93,6 +93,9 @@ INT32 FindGridNoFromSweetSpot( SOLDIERTYPE *pSoldier, INT32 sSweetGridNo, INT8 u
|
||||
soldier.pathing.bLevel = 0;
|
||||
soldier.bTeam = 1;
|
||||
soldier.sGridNo = sSweetGridNo;
|
||||
soldier.sDragCorpseID = pSoldier->sDragCorpseID;
|
||||
soldier.sDragGridNo = pSoldier->sDragGridNo;
|
||||
soldier.usDragPersonID = pSoldier->usDragPersonID;
|
||||
|
||||
sTop = ubRadius;
|
||||
sBottom = -ubRadius;
|
||||
@@ -1365,11 +1368,9 @@ void InternalSoldierInSectorSleep( SOLDIERTYPE *pSoldier, INT32 sGridNo, BOOLEAN
|
||||
usAnim = STANDING;
|
||||
}
|
||||
|
||||
// OK, look for sutable placement....
|
||||
// OK, look for suitable placement....
|
||||
sGoodGridNo = FindGridNoFromSweetSpotWithStructData( pSoldier, usAnim, sGridNo, 5, &ubNewDirection, FALSE );
|
||||
|
||||
sWorldX = CenterX( sGoodGridNo );
|
||||
sWorldY = CenterY( sGoodGridNo );
|
||||
ConvertGridNoToCenterCellXY(sGoodGridNo, &sWorldX, &sWorldY);
|
||||
|
||||
pSoldier->EVENT_SetSoldierPosition( sWorldX, sWorldY );
|
||||
|
||||
@@ -1406,11 +1407,9 @@ void SoldierInSectorIncompaciated( SOLDIERTYPE *pSoldier, INT32 sGridNo )
|
||||
return;
|
||||
}
|
||||
|
||||
// OK, look for sutable placement....
|
||||
// OK, look for suitable placement....
|
||||
sGoodGridNo = FindGridNoFromSweetSpotWithStructData( pSoldier, STAND_FALLFORWARD_STOP, sGridNo, 5, &ubNewDirection, FALSE );
|
||||
|
||||
sWorldX = CenterX( sGoodGridNo );
|
||||
sWorldY = CenterY( sGoodGridNo );
|
||||
ConvertGridNoToCenterCellXY(sGoodGridNo, &sWorldX, &sWorldY);
|
||||
|
||||
pSoldier->EVENT_SetSoldierPosition( sWorldX, sWorldY );
|
||||
|
||||
@@ -1442,11 +1441,9 @@ void SoldierInSectorPatient( SOLDIERTYPE *pSoldier, INT32 sGridNo )
|
||||
return;
|
||||
}
|
||||
|
||||
// OK, look for sutable placement....
|
||||
// OK, look for suitable placement....
|
||||
sGoodGridNo = FindGridNoFromSweetSpotWithStructData( pSoldier, BEING_PATIENT, sGridNo, 5, &ubNewDirection, FALSE );
|
||||
|
||||
sWorldX = CenterX( sGoodGridNo );
|
||||
sWorldY = CenterY( sGoodGridNo );
|
||||
ConvertGridNoToCenterCellXY(sGoodGridNo, &sWorldX, &sWorldY);
|
||||
|
||||
pSoldier->EVENT_SetSoldierPosition( sWorldX, sWorldY );
|
||||
|
||||
@@ -1477,11 +1474,9 @@ void SoldierInSectorDoctor( SOLDIERTYPE *pSoldier, INT32 sGridNo )
|
||||
return;
|
||||
}
|
||||
|
||||
// OK, look for sutable placement....
|
||||
// OK, look for suitable placement....
|
||||
sGoodGridNo = FindGridNoFromSweetSpotWithStructData( pSoldier, BEING_DOCTOR, sGridNo, 5, &ubNewDirection, FALSE );
|
||||
|
||||
sWorldX = CenterX( sGoodGridNo );
|
||||
sWorldY = CenterY( sGoodGridNo );
|
||||
ConvertGridNoToCenterCellXY(sGoodGridNo, &sWorldX, &sWorldY);
|
||||
|
||||
pSoldier->EVENT_SetSoldierPosition( sWorldX, sWorldY );
|
||||
|
||||
@@ -1512,11 +1507,9 @@ void SoldierInSectorRepair( SOLDIERTYPE *pSoldier, INT32 sGridNo )
|
||||
return;
|
||||
}
|
||||
|
||||
// OK, look for sutable placement....
|
||||
// OK, look for suitable placement....
|
||||
sGoodGridNo = FindGridNoFromSweetSpotWithStructData( pSoldier, BEING_REPAIRMAN, sGridNo, 5, &ubNewDirection, FALSE );
|
||||
|
||||
sWorldX = CenterX( sGoodGridNo );
|
||||
sWorldY = CenterY( sGoodGridNo );
|
||||
ConvertGridNoToCenterCellXY(sGoodGridNo, &sWorldX, &sWorldY);
|
||||
|
||||
pSoldier->EVENT_SetSoldierPosition( sWorldX, sWorldY );
|
||||
|
||||
@@ -1548,8 +1541,7 @@ void AddSoldierToSectorGridNo( SOLDIERTYPE *pSoldier, INT32 sGridNo, UINT8 ubDir
|
||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("AddSoldierToSectorGridNo"));
|
||||
|
||||
// Add merc to gridno
|
||||
sWorldX = CenterX( sGridNo );
|
||||
sWorldY = CenterY( sGridNo );
|
||||
ConvertGridNoToCenterCellXY(sGridNo, &sWorldX, &sWorldY);
|
||||
|
||||
// Set reserved location!
|
||||
pSoldier->sReservedMovementGridNo = NOWHERE;
|
||||
|
||||
Reference in New Issue
Block a user