mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
New option NEW_RANDOM (default TRUE) enables new code for random number generation.
Fixed PreRandom(1) bug in AddPlacementToWorld. AddPossiblePendingEnemiesToBattle: use Random(4) instead of GetRndNum(3) for random insertion code. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8747 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -680,9 +680,10 @@ BOOLEAN AddPlacementToWorld( SOLDIERINITNODE *curr, GROUP *pGroup = NULL )
|
||||
if (tempDetailedPlacement.ubProfile == NO_PROFILE)
|
||||
{//dnl!!!
|
||||
// these guys should be guarding Tony!
|
||||
// sevenfm: PreRandom(1) always returns 0, use PreRandom(2) instead
|
||||
tempDetailedPlacement.sInsertionGridNo = gModSettings.iPornShopEntranceGridNo +
|
||||
(INT16) ( PreRandom( 8 ) * ( PreRandom( 1 ) ? -1 : 1)
|
||||
+ PreRandom( 8 ) * ( PreRandom( 1 ) ? -1 : 1) * WORLD_ROWS );
|
||||
//(INT16)(PreRandom(8) * (PreRandom(1) ? -1 : 1) + PreRandom(8) * (PreRandom(1) ? -1 : 1) * WORLD_ROWS);
|
||||
(INT16)(PreRandom(8) * (PreRandom(2) ? -1 : 1) + PreRandom(8) * (PreRandom(2) ? -1 : 1) * WORLD_ROWS);
|
||||
|
||||
switch( PreRandom( 3 ) )
|
||||
{
|
||||
@@ -701,9 +702,10 @@ BOOLEAN AddPlacementToWorld( SOLDIERINITNODE *curr, GROUP *pGroup = NULL )
|
||||
else if (tempDetailedPlacement.ubProfile == BILLY )
|
||||
{//dnl!!!
|
||||
// billy should now be able to roam around
|
||||
// sevenfm: PreRandom(1) always returns 0, use PreRandom(2) instead
|
||||
tempDetailedPlacement.sInsertionGridNo = gModSettings.iPornShopEntranceGridNo +
|
||||
(INT16) ( PreRandom( 30 ) * ( PreRandom( 1 ) ? -1 : 1)
|
||||
+ PreRandom( 30 ) * ( PreRandom( 1 ) ? -1 : 1) * WORLD_ROWS );
|
||||
//(INT16)(PreRandom(30) * (PreRandom(1) ? -1 : 1) + PreRandom(30) * (PreRandom(1) ? -1 : 1) * WORLD_ROWS);
|
||||
(INT16)(PreRandom(30) * (PreRandom(2) ? -1 : 1) + PreRandom(30) * (PreRandom(2) ? -1 : 1) * WORLD_ROWS);
|
||||
tempDetailedPlacement.bOrders = SEEKENEMY;
|
||||
}
|
||||
else if ( tempDetailedPlacement.ubProfile == MADAME )
|
||||
|
||||
Reference in New Issue
Block a user