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

Method ConMapbug

src/game/server/gamecontext.cpp:3250–3274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3248}
3249
3250void CGameContext::ConMapbug(IConsole::IResult *pResult, void *pUserData)
3251{
3252 CGameContext *pSelf = (CGameContext *)pUserData;
3253
3254 if(pSelf->m_pController)
3255 {
3256 log_info("mapbugs", "can't add map bugs after the game started");
3257 return;
3258 }
3259
3260 const char *pMapBugName = pResult->GetString(0);
3261 switch(pSelf->m_MapBugs.Update(pMapBugName))
3262 {
3263 case EMapBugUpdate::OK:
3264 break;
3265 case EMapBugUpdate::OVERRIDDEN:
3266 log_info("mapbugs", "map-internal setting overridden by database");
3267 break;
3268 case EMapBugUpdate::NOTFOUND:
3269 log_info("mapbugs", "unknown map bug '%s', ignoring", pMapBugName);
3270 break;
3271 default:
3272 dbg_assert_failed("unreachable");
3273 }
3274}
3275
3276void CGameContext::ConSwitchOpen(IConsole::IResult *pResult, void *pUserData)
3277{

Callers

nothing calls this directly

Calls 2

GetStringMethod · 0.45
UpdateMethod · 0.45

Tested by

no test coverage detected