… | |
… | |
249 | return cf::override 0 unless $ob->type == cf::PLAYER; |
249 | return cf::override 0 unless $ob->type == cf::PLAYER; |
250 | |
250 | |
251 | # update respawn position |
251 | # update respawn position |
252 | $ob->contr->savebed ($bed->map->path, $bed->x, $bed->y); |
252 | $ob->contr->savebed ($bed->map->path, $bed->x, $bed->y); |
253 | |
253 | |
254 | #TODO? |
|
|
255 | #strcpy (pl->contr->killer, "left"); |
254 | $ob->contr->killer ("left"); |
256 | #check_score (pl); /* Always check score */ |
255 | $ob->check_score; |
257 | |
256 | |
258 | $ob->reply (undef, "In the future, you will wake up here when you die."); |
257 | $ob->reply (undef, "In the future, you will wake up here when you die."); |
259 | $ob->contr->save (); |
258 | $ob->contr->save; |
260 | |
259 | |
261 | $ob->contr->ns->query (cf::CS_QUERY_SINGLECHAR, "Do you want to continue playing (y/n)?", sub { |
260 | $ob->contr->ns->query (cf::CS_QUERY_SINGLECHAR, "Do you want to continue playing (y/n)?", sub { |
262 | if ($_[0] !~ /^[yY]/) { |
261 | if ($_[0] !~ /^[yY]/) { |
263 | $ob->contr->save (1); |
262 | $ob->contr->save (1); |
264 | $ob->contr->ns->destroy (); |
263 | $ob->contr->ns->destroy; |
265 | } |
264 | } |
266 | }); |
265 | }); |
267 | }, |
266 | }, |
268 | ); |
267 | ); |
269 | |
268 | |