-my @player;
-push @player, unpackhash("x11Z25", shift @playdata, qw/name/) for 0 .. 11;
+my (@player, @slot);
+for (0 .. 11) {
+ my $number = shift @playdata;
+ defined $player[$number] and warn "Player #$number redefined";
+ my ($data) = unpackhash("VcccZ25", shift @playdata, qw(
+ slot type race unknown name
+ ));
+ defined $race[$_] ? ($data->{race} = $race[$_]) :
+ warn "Unknown race #$_ for player $number"
+ for $data->{race};
+ $slot[$data->{slot}] = $number if $data->{slot} < 16;
+ $player[$number] = $data;
+}