Changeset 361

Show
Ignore:
Timestamp:
07/19/07 15:42:25 (1 year ago)
Author:
ajps
Message:

Don't count hidden squelchable objects when deciding where to place things in monster drops (or whatever). This should stop drops from killing a monster appearing miles away from that monster with nothing appearing in between (i.e. closes #254.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/angband-3.0.8/src/object2.c

    r262 r361  
    31393139void drop_near(object_type *j_ptr, int chance, int y, int x) 
    31403140{ 
    3141         int i, k, d, s; 
     3141        int i, k, n, d, s; 
    31423142 
    31433143        int bs, bn; 
     
    32163216                        /* No objects */ 
    32173217                        k = 0; 
     3218                        n = 0; 
    32183219 
    32193220                        /* Scan objects in that grid */ 
     
    32243225 
    32253226                                /* Count objects */ 
    3226                                 k++; 
     3227                                if (!squelch_hide_item(o_ptr)) 
     3228                                        k++; 
     3229                                else 
     3230                                        n++; 
    32273231                        } 
    32283232 
     
    32333237                        if (adult_no_stacking && (k > 1)) continue; 
    32343238                         
    3235                         /* Paranoia */ 
    3236                         if (k > MAX_FLOOR_STACK) continue; 
     3239                        /* Paranoia? */ 
     3240                        if ((k + n) > MAX_FLOOR_STACK) continue; 
    32373241 
    32383242                        /* Calculate score */