'From etoys2.3 of 2 December 2007 [latest update: #1881] on 29 January 2008 at 4:07:43 pm'! "Change Set: revealFix-sw Date: 26 February 2008 Author: Scott Wallace Fixes the bug that a reveal-player for a player whose costume is the World fell into a debugger."! !Player methodsFor: 'misc' stamp: 'sw 1/29/2008 16:06'! revealPlayerIn: aWorld "Reveal the receiver if at all possible in the world; once it's visible, flash its image for a bit, and leave it with its halo showing" | aMorph | (aMorph _ self costume) isInWorld ifTrue: [aMorph goHome. self indicateLocationOnScreen. aMorph owner ifNotNilDo: [:ownr | ownr layoutPolicy ifNil: [aMorph comeToFront]]. aMorph addHalo. ^ self]. "It's hidden somewhere; search for it" aWorld submorphs do: [:m | (m succeededInRevealing: self) ifTrue: "will have obtained halo already" [aWorld doOneCycle. self indicateLocationOnScreen. ^ self]]. "The morph is truly unreachable in this world at present. So extract it from hyperspace, and place it at center of screen, wearing a halo." aMorph isWorldMorph ifFalse: [aWorld addMorphFront: aMorph. aMorph position: aWorld bounds center. aMorph addHalo]! !