Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing verblibm.h

MoveFloatingObjects (lines 687-715)

0687  #ENDIF;
0688   
0689  ! ----------------------------------------------------------------------------
0690  !   A cunning routine (which could have been a daemon, but isn't, for the
0691  !   sake of efficiency) to move objects which could be in many rooms about
0692  !   so that the player never catches one not in place
0693  ! ----------------------------------------------------------------------------
0694   
0695  [ MoveFloatingObjects i k l m address flag;
0696    objectloop (i)
0697    {   address=i.&found_in;
0698        if (address~=0 && i hasnt absent)
0699        {   if (ZRegion(address-->0)==2)
0700            {   if (i.found_in() ~= 0) move i to location; else remove i;
0701            }
0702            else
0703            {   k=i.#found_in;
0704                for (l=0: l<k/2: l++)
0705                {   m=address-->l;
0706                    if (m==location || m in location)
0707                    {   if (i notin location) move i to location;
0708                        flag = true;
0709                    }
0710                }
0711                if (flag == false) { if (parent(i)) remove i; }
0712            }
0713        }
0714    }
0715  ];


Last updated 27 February 2004. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.