()
| 3586 | } |
| 3587 | |
| 3588 | private static boolean PlayerConfig_ScanDirectories() { |
| 3589 | //char findname[1024]; |
| 3590 | String findname; |
| 3591 | //char scratch[1024]; |
| 3592 | String scratch; |
| 3593 | |
| 3594 | int ndirs = 0, npms = 0; |
| 3595 | int a, b, c; |
| 3596 | String dirnames[]; |
| 3597 | |
| 3598 | String path = null; |
| 3599 | |
| 3600 | int i; |
| 3601 | |
| 3602 | //extern String * FS_ListFiles(String , int *, unsigned, unsigned); |
| 3603 | |
| 3604 | s_numplayermodels = 0; |
| 3605 | |
| 3606 | /* |
| 3607 | * * get a list of directories |
| 3608 | */ |
| 3609 | do { |
| 3610 | path = FS.NextPath(path); |
| 3611 | findname = path + "/players/*.*"; |
| 3612 | |
| 3613 | if ((dirnames = FS.ListFiles(findname, 0, SFF_SUBDIR)) != null) { |
| 3614 | ndirs = dirnames.length; |
| 3615 | break; |
| 3616 | } |
| 3617 | } while (path != null); |
| 3618 | |
| 3619 | if (dirnames == null) |
| 3620 | return false; |
| 3621 | |
| 3622 | /* |
| 3623 | * * go through the subdirectories |
| 3624 | */ |
| 3625 | npms = ndirs; |
| 3626 | if (npms > MAX_PLAYERMODELS) |
| 3627 | npms = MAX_PLAYERMODELS; |
| 3628 | |
| 3629 | for (i = 0; i < npms; i++) { |
| 3630 | int k, s; |
| 3631 | //String a, b, c; |
| 3632 | String pcxnames[]; |
| 3633 | String skinnames[]; |
| 3634 | int npcxfiles; |
| 3635 | int nskins = 0; |
| 3636 | |
| 3637 | if (dirnames[i] == null) |
| 3638 | continue; |
| 3639 | |
| 3640 | // verify the existence of tris.md2 |
| 3641 | scratch = dirnames[i]; |
| 3642 | scratch += "/tris.md2"; |
| 3643 | if (Sys.FindFirst(scratch, 0, SFF_SUBDIR | SFF_HIDDEN | SFF_SYSTEM) == null) { |
| 3644 | //free(dirnames[i]); |
| 3645 | dirnames[i] = null; |
no test coverage detected