the-infocom-files / starcross

Starcross
5 stars 3 forks source link

Bug when objects fall from inside the globe onto a disk #64

Open eriktorbjorn opened 5 years ago

eriktorbjorn commented 5 years ago
>PUT RED DISK UNDER GLOBE
The red disk drops to the ground. There is an almost inaudible click as it comes
to rest.
The red disk slides under the globe.

>PUT BLUE DISK ON GLOBE
The blue disk is now on the globe.

>SET DIAL TO 3
The globe flickers out for an instant and then reappears, expanded. The silvery
globe is the size of a beachball.
You hear something fall inside the sphere.

>SET DIAL TO 2
The globe flickers out for an instant and then reappears, shrunken. The silvery
globe is the size of a basketball.
When the sphere shrinks, the blue disk falls. Dropped.

>

This appears to be handled by JUNK-OUTSIDE:

<ROUTINE JUNK-OUTSIDE (NEW OLD "AUX" R)
     <COND (<SET R <ROB <GET ,FF-TABLE <- .OLD 1>> ,FF-ROOM>>
        <TELL
,SPHERE-SHRINKS D .R " falls to the new surface and then
slides to the floor." CR>)>
     <COND (<SET R <ROB <GET ,FF-FALLS <- .OLD 1>> ,FF-ROOM>>
        <TELL
,SPHERE-SHRINKS D .R " falls">
        <COND (<EQUAL? ,UNDER-GLOBE ,RED-DISK ,BLUE-DISK>
               <TELL ". "> 
               <MOVE .R ,WINNER> ;"Kludge: make DROP work"
               <PERFORM ,V?DROP .R ,UNDER-GLOBE>)
              (ELSE
               <TELL " onto the floor.">)>
        <CRLF>)>
     <RTRUE>>

I guess the idea here is that if an object (not just the disk that I used in this experiment) falls from inside the globe, and there is a disk underneath, it should land on the disk. If I change it to <PERFORM ,V?PUT-ON .R ,UNDER-GLOBE> I get this instead:

>SET DIAL TO 2
The globe flickers out for an instant and then reappears, shrunken. The silvery
globe is the size of a basketball.
When the sphere shrinks, the blue disk falls. The red disk activates as the blue
disk touches it. It disappears for a fraction of a second, then a flash of light
fills the room as both disks explode!

>

Which is much better, even if there's still an extra blank line afterwards. That should be easy enough to fix. And of course, the comment should be updated to say "Kludge: make PUT ON work" instead.