Skip to content

Commit e91b380

Browse files
committed
fix: Renamed update map list function
1 parent 6a721d9 commit e91b380

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

commands.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static std::vector<std::string> mapList; // List of maps for the p2mm_map comman
4444
static std::vector<std::string> workshopMapList; // List of all workshop map for the p2mm_map auto complete.
4545

4646
// Update the map list available to p2mm_map by scanning for all map files in SearchPath.
47-
void UpdateMapsList()
47+
void UpdateMapList()
4848
{
4949
mapList.clear();
5050
CUtlVector<CUtlString> outList;
@@ -81,7 +81,7 @@ static int p2mm_map_CompletionFunc(const char* partial, char commands[COMMAND_CO
8181
{
8282
// If the map list is empty, generate it.
8383
if (mapList.empty())
84-
UpdateMapsList();
84+
UpdateMapList();
8585

8686
// Assemble together the current state of the inputted command.
8787
const auto conCommand = "p2mm_map ";
@@ -106,13 +106,13 @@ CON_COMMAND_F_COMPLETION(p2mm_map, "Starts up a P2:MM session with a requested m
106106
{
107107
// If the map list is empty, generate it.
108108
if (mapList.empty())
109-
UpdateMapsList();
109+
UpdateMapList();
110110

111111
// Make sure the CONCOMMAND was executed correctly.
112112
if (args.ArgC() < 2 || FStrEq(args.Arg(1), ""))
113113
{
114114
Log(WARNING, false, "p2mm_map called incorrectly! Usage: \"p2mm_map (map to start)\"");
115-
UpdateMapsList();
115+
UpdateMapList();
116116
return;
117117
}
118118

@@ -141,7 +141,7 @@ CON_COMMAND_F_COMPLETION(p2mm_map, "Starts up a P2:MM session with a requested m
141141
Log(WARNING, false, "p2mm_map was called with P2MM_LASTMAP, but p2mm_lastmap is empty or invalid!");
142142
engineClient->ExecuteClientCmd("disconnect \"There is no last map recorded or the map doesn't exist! Please start a play session with the other options first.\"");
143143
engineClient->ExecuteClientCmd(completePvCmd);
144-
UpdateMapsList();
144+
UpdateMapList();
145145
return;
146146
}
147147

@@ -162,7 +162,7 @@ CON_COMMAND_F_COMPLETION(p2mm_map, "Starts up a P2:MM session with a requested m
162162
if (!engineServer->IsMapValid(requestedMap))
163163
{
164164
Log(WARNING, false, "p2mm_map was given a non-valid map or one that doesn't exist! \"%s\"", requestedMap);
165-
UpdateMapsList();
165+
UpdateMapList();
166166
return;
167167
}
168168

@@ -181,7 +181,7 @@ CON_COMMAND_F_COMPLETION(p2mm_map, "Starts up a P2:MM session with a requested m
181181

182182
CON_COMMAND_F(p2mm_updatemaplist, "Manually updates the list of available maps that can be loaded with p2mm_map.", FCVAR_HIDDEN)
183183
{
184-
UpdateMapsList();
184+
UpdateMapList();
185185
}
186186

187187
CON_COMMAND_F(p2mm_maplist, "Lists available maps that can be loaded with p2mm_map.", FCVAR_HIDDEN)
@@ -254,8 +254,8 @@ CON_COMMAND_F(p2mm_helloworld, "Hello World!", FCVAR_HIDDEN)
254254
CON_COMMAND_F(p2mm_helloworld2, "Hello World 2: Electric Boogaloo!", FCVAR_HIDDEN)
255255
{
256256
HudMessageParams helloWorldParams;
257-
color32 RGB1 = { 0, 255, 100, 255 };
258-
color32 RGB2 = { 0, 50, 255, 255 };
257+
const color32 RGB1 = { 0, 255, 100, 255 };
258+
const color32 RGB2 = { 0, 50, 255, 255 };
259259
helloWorldParams.x = -1.f;
260260
helloWorldParams.y = -1.f;
261261
helloWorldParams.effect = 2;

p2mm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,15 +1130,15 @@ void CP2MMServerPlugin::GameFrame(const bool simulating)
11301130
g_pScriptVM->Call<bool>(gfFunc, nullptr, false, nullptr, simulating);
11311131
}
11321132

1133-
extern void UpdateMapsList();
1133+
extern void UpdateMapList();
11341134
//---------------------------------------------------------------------------------
11351135
// Purpose: Called when the map is changing to another map, or the server is shutting down.
11361136
//---------------------------------------------------------------------------------
11371137
void CP2MMServerPlugin::LevelShutdown(void)
11381138
{
11391139
Log(INFO, true, "Level Shutdown! Map: %s", CUR_MAPFILE_NAME);
11401140
p2mm_loop.SetValue("0"); //! REMOVE THIS at some point...
1141-
UpdateMapsList(); // Update the maps list for p2mm_map.
1141+
UpdateMapList(); // Update the maps list for p2mm_map.
11421142
// Update Discord RPC to update the level information or to say the host is on the main menu.
11431143
CDiscordIntegration::UpdateDiscordRPC();
11441144
}

0 commit comments

Comments
 (0)