| 67 | } |
| 68 | |
| 69 | CLocalExtension::CLocalExtension(const char *filename, bool bRequired) |
| 70 | { |
| 71 | m_PlId = 0; |
| 72 | m_pLib = NULL; |
| 73 | |
| 74 | char path[PLATFORM_MAX_PATH]; |
| 75 | |
| 76 | /* Special case for new bintools binary */ |
| 77 | if (strcmp(filename, "bintools.ext") == 0) |
| 78 | { |
| 79 | g_pSM->BuildPath(Path_SM, |
| 80 | path, |
| 81 | PLATFORM_MAX_PATH, |
| 82 | "extensions/" PLATFORM_ARCH_FOLDER "%s." PLATFORM_LIB_EXT, |
| 83 | filename); |
| 84 | } |
| 85 | else |
| 86 | { |
| 87 | /* Zeroth, see if there is an engine specific build in the new place. */ |
| 88 | g_pSM->BuildPath(Path_SM, |
| 89 | path, |
| 90 | PLATFORM_MAX_PATH, |
| 91 | "extensions/" PLATFORM_ARCH_FOLDER "%s.%s." PLATFORM_LIB_EXT, |
| 92 | filename, |
| 93 | bridge->gamesuffix); |
| 94 | |
| 95 | if (!libsys->IsPathFile(path)) |
| 96 | { |
| 97 | /* COMPAT HACK: One-halfth, if ep2v, see if there is an engine specific build in the new place with old naming */ |
| 98 | if (strcmp(bridge->gamesuffix, "2.tf2") == 0 |
| 99 | || strcmp(bridge->gamesuffix, "2.dods") == 0 |
| 100 | || strcmp(bridge->gamesuffix, "2.hl2dm") == 0 |
| 101 | ) |
| 102 | { |
| 103 | g_pSM->BuildPath(Path_SM, |
| 104 | path, |
| 105 | PLATFORM_MAX_PATH, |
| 106 | "extensions/" PLATFORM_ARCH_FOLDER "%s.2.ep2v." PLATFORM_LIB_EXT, |
| 107 | filename); |
| 108 | } |
| 109 | else if (strcmp(bridge->gamesuffix, "2.nd") == 0) |
| 110 | { |
| 111 | g_pSM->BuildPath(Path_SM, |
| 112 | path, |
| 113 | PLATFORM_MAX_PATH, |
| 114 | "extensions/" PLATFORM_ARCH_FOLDER "%s.2.l4d2." PLATFORM_LIB_EXT, |
| 115 | filename); |
| 116 | } |
| 117 | |
| 118 | //Try further |
| 119 | if (!libsys->IsPathFile(path)) |
| 120 | { |
| 121 | /* First see if there is an engine specific build! */ |
| 122 | g_pSM->BuildPath(Path_SM, |
| 123 | path, |
| 124 | PLATFORM_MAX_PATH, |
| 125 | "extensions/" PLATFORM_ARCH_FOLDER "auto.%s/%s." PLATFORM_LIB_EXT, |
| 126 | filename, |
nothing calls this directly
no test coverage detected