… | |
… | |
3591 | if ($anim && @$anim) { |
3591 | if ($anim && @$anim) { |
3592 | delete $self->{wait_face}; |
3592 | delete $self->{wait_face}; |
3593 | $self->{face} = $anim->[ $self->{frame} % @$anim ]; |
3593 | $self->{face} = $anim->[ $self->{frame} % @$anim ]; |
3594 | if (my $tex = $self->{tex} = $::CONN->{texture}[ $::CONN->{faceid}[$self->{face}] ]) { |
3594 | if (my $tex = $self->{tex} = $::CONN->{texture}[ $::CONN->{faceid}[$self->{face}] ]) { |
3595 | unless ($tex->{name} || $tex->{loading}) { |
3595 | unless ($tex->{name} || $tex->{loading}) { |
3596 | $tex->upload; |
3596 | $tex->upload (sub { $self->reconfigure }); |
3597 | } |
3597 | } |
3598 | } |
3598 | } |
3599 | } |
3599 | } |
3600 | } |
3600 | } |
3601 | } |
3601 | } |
… | |
… | |
3607 | if (my $faceid = $::CONN->{faceid}[$self->{face}]) { |
3607 | if (my $faceid = $::CONN->{faceid}[$self->{face}]) { |
3608 | if (my $tex = $self->{tex} = $::CONN->{texture}[$faceid]) { |
3608 | if (my $tex = $self->{tex} = $::CONN->{texture}[$faceid]) { |
3609 | if ($tex->{name}) { |
3609 | if ($tex->{name}) { |
3610 | return ($self->{size_w} || $tex->{w}, $self->{size_h} || $tex->{h}); |
3610 | return ($self->{size_w} || $tex->{w}, $self->{size_h} || $tex->{h}); |
3611 | } elsif (!$tex->{loading}) { |
3611 | } elsif (!$tex->{loading}) { |
3612 | $tex->upload; |
3612 | $tex->upload (sub { $self->reconfigure }); |
3613 | } |
3613 | } |
3614 | } else { |
3614 | } else { |
3615 | $self->{wait_face} ||= $::CONN->connect_face_update ($faceid, sub { |
3615 | $self->{wait_face} ||= $::CONN->connect_face_update ($faceid, sub { |
3616 | $self->realloc; |
3616 | $self->reconfigure; |
3617 | }); |
3617 | }); |
3618 | } |
3618 | } |
3619 | } |
3619 | } |
3620 | } |
3620 | } |
3621 | |
3621 | |