avm1: Use `resolve_target_display_object` in `Color`

Fixes the boss damage blinking in Alien Hominid. Target was a path
string.
This commit is contained in:
Mike Welsh 2020-01-27 23:06:23 -08:00
parent 69f19f03c4
commit 7532e89aff
1 changed files with 2 additions and 4 deletions

View File

@ -78,10 +78,8 @@ fn target<'gc>(
context: &mut UpdateContext<'_, 'gc, '_>, context: &mut UpdateContext<'_, 'gc, '_>,
this: Object<'gc>, this: Object<'gc>,
) -> Result<Option<DisplayObject<'gc>>, Error> { ) -> Result<Option<DisplayObject<'gc>>, Error> {
this.get("target", avm, context)? let target = this.get("target", avm, context)?.resolve(avm, context)?;
.resolve(avm, context)? avm.resolve_target_display_object(context, target)
.as_object()
.map(|o| o.as_display_object())
} }
fn get_rgb<'gc>( fn get_rgb<'gc>(