… | |
… | |
1276 | use Coro::AIO; |
1276 | use Coro::AIO; |
1277 | |
1277 | |
1278 | =head3 cf::player |
1278 | =head3 cf::player |
1279 | |
1279 | |
1280 | =over 4 |
1280 | =over 4 |
|
|
1281 | |
|
|
1282 | =item cf::player::num_playing |
|
|
1283 | |
|
|
1284 | Returns the official number of playing players, as per the Crossfire metaserver rules. |
|
|
1285 | |
|
|
1286 | =cut |
|
|
1287 | |
|
|
1288 | sub num_playing { |
|
|
1289 | scalar grep |
|
|
1290 | $_->ob->map |
|
|
1291 | && !$_->hidden |
|
|
1292 | && !$_->ob->flag (cf::FLAG_WIZ), |
|
|
1293 | cf::player::list |
|
|
1294 | } |
1281 | |
1295 | |
1282 | =item cf::player::find $login |
1296 | =item cf::player::find $login |
1283 | |
1297 | |
1284 | Returns the given player object, loading it if necessary (might block). |
1298 | Returns the given player object, loading it if necessary (might block). |
1285 | |
1299 | |