Skip to content

Commit 9c2926b

Browse files
committed
Some minor corrections
1 parent 3f0636e commit 9c2926b

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

globals.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
//---------------------------------------------------------------------------------
2020
void Log(const LogLevel level, const bool dev, const char* pMsgFormat, ...)
2121
{
22-
if (dev && !p2mm_developer.GetBool() && level != ERRORR) return; // Stop developer messages when p2mm_developer isn't enabled.
22+
if (dev && !p2mm_developer.GetBool() && level != ERRORR)
23+
return; // Stop developer messages when p2mm_developer isn't enabled.
2324

2425
// Take our log message and format any arguments it has into the message.
2526
va_list argPtr;

p2mm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ void CP2MMServerPlugin::GameFrame(const bool simulating)
11001100
{
11011101
if (const HSCRIPT loopFunc = g_pScriptVM->LookupFunction("P2MMLoop"); p2mm_loop.GetBool())
11021102
g_pScriptVM->Call(loopFunc, nullptr, false, nullptr);
1103-
1103+
11041104
// Handle VScript game event function
11051105
if (const HSCRIPT gfFunc = g_pScriptVM->LookupFunction("GEGameFrame"))
11061106
g_pScriptVM->Call<bool>(gfFunc, nullptr, false, nullptr, simulating);

p2mm.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
#include "globals.hpp"
1111

12-
#define P2MM_PLUGIN_VERSION "2.2.0" // Update this when a new version of the plugin is released
13-
#define P2MM_VERSION "2.3.0" // Update this for whatever P2:MM version the plugin is released with
12+
#define P2MM_PLUGIN_VERSION "2.3.0" // Update this when a new version of the plugin is released
13+
#define P2MM_VERSION "3.0.0" // Update this for whatever P2:MM version the plugin is released with
1414

1515
//---------------------------------------------------------------------------------
1616
// Purpose: Portal 2: Multiplayer Mod server plugin class

vscript.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@
1717
//---------------------------------------------------------------------------------
1818
static void printlP2MM(const int level, const bool dev, const char* pMsgFormat)
1919
{
20-
if (dev && !p2mm_developer.GetBool()) return;
20+
if (dev && !p2mm_developer.GetBool())
21+
return;
2122

22-
va_list argptr;
23+
va_list argPtr;
2324
char szFormattedText[1024] = { 0 };
24-
va_start(argptr, pMsgFormat);
25-
V_vsnprintf(szFormattedText, sizeof(szFormattedText), pMsgFormat, argptr);
26-
va_end(argptr);
25+
va_start(argPtr, pMsgFormat);
26+
V_vsnprintf(szFormattedText, sizeof(szFormattedText), pMsgFormat, argPtr);
27+
va_end(argPtr);
2728

2829
char completeMsg[1024];
2930
V_snprintf(completeMsg, sizeof(completeMsg), "(P2:MM VSCRIPT): %s\n", szFormattedText);
@@ -69,7 +70,7 @@ static bool IsDedicatedServer()
6970

7071
//---------------------------------------------------------------------------------
7172
// Purpose: Initializes, spawns, then activates an entity in the map.
72-
// Create a entity using CreateByClassname, then use this function on its handle.
73+
// Create a entity using CreateByClassname in VScript, then use this function on its handle.
7374
// Note: Not all entities will work even after being initialized with this function.
7475
//---------------------------------------------------------------------------------
7576
static void InitializeEntity(const HSCRIPT ent)
@@ -91,7 +92,8 @@ static void InitializeEntity(const HSCRIPT ent)
9192
//---------------------------------------------------------------------------------
9293
static void SendToChat(const int playerIndex, const char* msg)
9394
{
94-
if (!msg) return;
95+
if (!msg)
96+
return;
9597

9698
if (!playerIndex)
9799
{

0 commit comments

Comments
 (0)