mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Fix: it was still possible to resolve random items in the map editor
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5625 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+9
-7
@@ -7661,13 +7661,10 @@ BOOLEAN CreateItem( UINT16 usItem, INT16 bStatus, OBJECTTYPE * pObj )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
// Flugente: random items - not while editing!
|
||||
if ( guiCurrentScreen != EDIT_SCREEN )
|
||||
{
|
||||
UINT16 newitemfromrandom = 0;
|
||||
if ( GetItemFromRandomItem(usItem, &newitemfromrandom) )
|
||||
usItem = newitemfromrandom;
|
||||
}
|
||||
// Flugente: random items
|
||||
UINT16 newitemfromrandom = 0;
|
||||
if ( GetItemFromRandomItem(usItem, &newitemfromrandom) )
|
||||
usItem = newitemfromrandom;
|
||||
|
||||
if (usItem == 0)
|
||||
{
|
||||
@@ -14762,6 +14759,11 @@ BOOLEAN GetItemFromRandomItem( UINT16 usRandomItem, UINT16* pusNewItem )
|
||||
{
|
||||
*pusNewItem = 0;
|
||||
|
||||
// no random item solving in the map editor
|
||||
#ifdef JA2EDITOR
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
// is this a random item?
|
||||
if ( Item[usRandomItem].randomitem > 0 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user