File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1194,7 +1194,6 @@ self.onmessage = ({ data: msg }) => {
11941194 if ( Scratch . Cast . toString ( raw ) === '_myself_' ) {
11951195 const editingTarget = Scratch . vm . editingTarget ;
11961196 if ( editingTarget && ! editingTarget . isStage ) return editingTarget . sprite . name ;
1197- // fallback: use the current thread's target at runtime
11981197 return null ;
11991198 }
12001199 return Scratch . Cast . toString ( raw ) ;
@@ -1350,7 +1349,6 @@ self.onmessage = ({ data: msg }) => {
13501349 const li = this . lights [ lightId ] ;
13511350 if ( ! li ) return false ;
13521351
1353- // Resolve sprite name (handles "_myself_")
13541352 let spriteName = Scratch . Cast . toString ( args . SPRITE ) ;
13551353 if ( spriteName === '_myself_' ) {
13561354 const t = util && util . target ? util . target : Scratch . vm . editingTarget ;
@@ -1381,7 +1379,6 @@ self.onmessage = ({ data: msg }) => {
13811379 const dist = Math . sqrt ( dx * dx + dy * dy ) ;
13821380 if ( dist >= li . radius ) return false ;
13831381 const angle = Math . atan2 ( dy , dx ) ;
1384- // li.direction is Scratch degrees (0=up, clockwise), convert to math radians
13851382 const dirRad = ( 90 - li . direction ) * ( Math . PI / 180 ) ;
13861383 let delta = Math . abs ( ( ( angle - dirRad + Math . PI ) % ( 2 * Math . PI ) ) - Math . PI ) ;
13871384 return delta <= li . arc * ( Math . PI / 180 ) ;
You can’t perform that action at this time.
0 commit comments