mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
improved the way how marbles works, now it will work already when reaching the gridno where marbles are, not just when trying to exit it
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9036 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2884,6 +2884,26 @@ BOOLEAN HandleAtNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving )
|
|||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pSoldier->pathing.bLevel == 0 && pSoldier->aiData.ubPendingAction != MERC_PICKUPITEM && (pSoldier->bOverTerrainType == FLAT_FLOOR || pSoldier->bOverTerrainType == PAVED_ROAD))
|
||||||
|
{
|
||||||
|
INT32 iMarblesIndex;
|
||||||
|
if (MarblesExistAtLocation(pSoldier->sGridNo, 0, &iMarblesIndex))
|
||||||
|
{
|
||||||
|
// Slip on marbles!
|
||||||
|
pSoldier->DoMercBattleSound(BATTLE_SOUND_CURSE1);
|
||||||
|
if (pSoldier->bTeam == gbPlayerNum)
|
||||||
|
{
|
||||||
|
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_UI_FEEDBACK, Message[STR_SLIPPED_MARBLES], pSoldier->name);
|
||||||
|
}
|
||||||
|
RemoveItemFromPool(pSoldier->sGridNo, iMarblesIndex, 0);
|
||||||
|
SoldierCollapse(pSoldier);
|
||||||
|
if (pSoldier->bActionPoints > 0)
|
||||||
|
{
|
||||||
|
pSoldier->bActionPoints -= (INT8)(Random(pSoldier->bActionPoints) + 1);
|
||||||
|
}
|
||||||
|
return(FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set "interrupt occurred" flag to false so that we will know whether *this
|
// Set "interrupt occurred" flag to false so that we will know whether *this
|
||||||
// particular call* to HandleSight caused an interrupt
|
// particular call* to HandleSight caused an interrupt
|
||||||
|
|||||||
Reference in New Issue
Block a user