MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ChangePolyModelName

Function ChangePolyModelName

model/polymodel.cpp:2220–2225  ·  view source on GitHub ↗

gets the filename from a path

Source from the content-addressed store, hash-verified

2218
2219// gets the filename from a path
2220std::filesystem::path ChangePolyModelName(const std::filesystem::path &src) {
2221 // Make sure we don't go over our name length limit
2222 std::string dest = src.stem().string().substr(0, PAGENAME_LEN - 5);
2223 std::filesystem::path filename = std::filesystem::path(dest).replace_extension(src.extension());
2224 return filename;
2225}
2226
2227// Searches thru all polymodels for a specific name, returns -1 if not found
2228// or index of polymodel with name

Callers 3

LoadPolyModelFunction · 0.85
OnGenericAddNewMethod · 0.85
OnGenericChangeModelMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected