mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- New background property: <snake_defense> alters snake defense chance
- New sector property: <numsnakes> sets maximum number of snakes per snake attack git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8277 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1106,7 +1106,7 @@ void AddSnakeAmim( INT32 sGridno, UINT8 usDirection )
|
||||
ANITILE_PARAMS AniParams;
|
||||
|
||||
memset( &AniParams, 0, sizeof(ANITILE_PARAMS) );
|
||||
|
||||
|
||||
AniParams.sGridNo = sGridno;
|
||||
AniParams.ubLevelID = ANI_OBJECT_LEVEL;
|
||||
AniParams.sDelay = 100;
|
||||
@@ -1131,8 +1131,9 @@ void HandleEnvironmentHazard( )
|
||||
|
||||
if ( gGameExternalOptions.gfAllowSnakes && !gbWorldSectorZ && Chance( SectorExternalData[sector][0].snakechance ) )
|
||||
{
|
||||
// there can be up to 3 attacks at the same time
|
||||
int actionstodo = 3;
|
||||
// the number of snake attacks is randomized
|
||||
int actionstodo = max(1, Random( SectorExternalData[sector][0].numsnakes ) );
|
||||
|
||||
BOOLEAN soundplayed = FALSE;
|
||||
|
||||
SOLDIERTYPE *pSoldier = NULL;
|
||||
|
||||
Reference in New Issue
Block a user