# ---------死体処理
sub Death {
return unless $death;
my($i,$killingnum,@deaddata,@deadpeople,@deaditem);
	# 逝った人
# 0:殺害数 1:名前 2:役柄 3:死因 4:加害者 5:PASS
if($whodied eq 'you'){
	@deaddata = ($guest[6],$guest[0],$guestnum,$death,$num,$guest[1]);
	@deaditem = @guest[9..16];
	$lastone = $guestnum;
}else{
	@deaddata = ($status[6],$status[0],$num,$death,$guestnum,$status[1]);
	@deaditem = @status[9..16];
	$lastone = $num;
}

$deaddata[0] = sprintf("%03d",$deaddata[0]);
open(SCORE,">>$filescore") || &Error(1,'ハイスコア');
eval {flock(SCORE,2)};
print SCORE join(',',@deaddata)."\n";
eval {flock(SCORE,8)};
close(SCORE);

@rests = ();
@rests = (165,165); # ■この一行を加えるだけ！■

	# 遺品
foreach(@deaditem){
	$i = $_ % 100;
		if($_ < 100){next;
		}elsif(!$i || $i =~ /(53|58)/){next; # コイン,ロック解除
		}elsif($i == 60){push @rests,162; # 双眼鏡→Mac
		}else{push @rests,$_;
		}
}

if(rand(100) < $car_on){
	$i = (rand > .5) ? 951 : 952; # ライトバン,トラック
	push @rests,$i;
}

push @log, join(',',$deaddata[2],$deaddata[4],'death',$death,$status[3]);
$lasttime = $time;
$writemap = 1;

}
