Skip to content

Commit

Permalink
fix shit
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaKeks committed Aug 4, 2024
1 parent eb465f3 commit 2698e2f
Show file tree
Hide file tree
Showing 11 changed files with 276 additions and 233 deletions.
14 changes: 7 additions & 7 deletions src/kz/global/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ static_function SCMD_CALLBACK(Command_KzProfile)

auto onError = [player](KZ::API::Error error)
{
player->languageService->PrintError(error);
player->globalService->ReportError(error);
};

const char *playerIdentifier = args->Arg(1);

if (playerIdentifier[0] == '\0')
{
KZGlobalService::FetchPlayer(player->GetSteamId64(), onSuccess, onError);
player->globalService->FetchPlayer(player->GetSteamId64(), onSuccess, onError);
}
else
{
KZGlobalService::FetchPlayer(playerIdentifier, onSuccess, onError);
player->globalService->FetchPlayer(playerIdentifier, onSuccess, onError);
}

return MRES_SUPERCEDE;
Expand All @@ -55,19 +55,19 @@ static_function SCMD_CALLBACK(Command_KzMapInfo)
return;
}

player->languageService->PrintMap(map.value());
player->globalService->DisplayMapInfo(map.value());
};

auto onError = [player](KZ::API::Error error)
{
player->languageService->PrintError(error);
player->globalService->ReportError(error);
};

KZGlobalService::FetchMap(mapIdentifier, onSuccess, onError);
player->globalService->FetchMap(mapIdentifier, onSuccess, onError);
}
else if (KZGlobalService::currentMap)
{
player->languageService->PrintMap(KZGlobalService::currentMap.value());
player->globalService->DisplayMapInfo(KZGlobalService::currentMap.value());
}
else
{
Expand Down
Loading

0 comments on commit 2698e2f

Please sign in to comment.