MCPcopy Create free account
hub / github.com/ddnet/ddnet / ChangeEntitiesPath

Method ChangeEntitiesPath

src/game/client/components/mapimages.cpp:355–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355void CMapImages::ChangeEntitiesPath(const char *pPath)
356{
357 if(str_comp(pPath, "default") == 0)
358 str_copy(m_aEntitiesPath, "editor/entities_clear");
359 else
360 {
361 str_format(m_aEntitiesPath, sizeof(m_aEntitiesPath), "assets/entities/%s", pPath);
362 }
363
364 for(int ModType = 0; ModType < MAP_IMAGE_MOD_TYPE_COUNT * 2; ++ModType)
365 {
366 if(m_aEntitiesIsLoaded[ModType])
367 {
368 for(int LayerType = 0; LayerType < MAP_IMAGE_ENTITY_LAYER_TYPE_COUNT; ++LayerType)
369 {
370 Graphics()->UnloadTexture(&m_aaEntitiesTextures[ModType][LayerType]);
371 }
372 m_aEntitiesIsLoaded[ModType] = false;
373 }
374 }
375}
376
377void CMapImages::ConchainClTextEntitiesSize(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
378{

Callers 3

ClearCustomItemsMethod · 0.80
RenderSettingsCustomMethod · 0.80

Calls 5

str_compFunction · 0.85
str_formatFunction · 0.85
GraphicsFunction · 0.85
UnloadTextureMethod · 0.80
str_copyFunction · 0.50

Tested by

no test coverage detected