Skip to content

Commit 7242db1

Browse files
committed
V3B24 Release
Performance fixes
1 parent e8e474a commit 7242db1

File tree

12 files changed

+4674
-4588
lines changed

12 files changed

+4674
-4588
lines changed

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,20 @@
3232
*.app
3333
Release/*
3434
debug.log
35+
.vs/PodBot_mm/v16/.suo
36+
.vs/PodBot_mm/v16/Browse.VC.db
37+
.vs/PodBot_mm/v16/Browse.VC.opendb
38+
.vs/PodBot_mm/v16/ipch/AutoPCH/19081f8ccd2d21f5/BOT_CHAT.ipch
39+
.vs/PodBot_mm/v16/ipch/AutoPCH/6784f576f6df118c/BOT_NAVIGATE.ipch
40+
.vs/PodBot_mm/v16/ipch/AutoPCH/9b597c03e8c2e555/BOT_COMBAT.ipch
41+
.vs/PodBot_mm/v16/ipch/AutoPCH/9c13cbfa39f12ff9/UTIL.ipch
42+
.vs/PodBot_mm/v16/ipch/AutoPCH/b0aba82d569acc54/BOT.ipch
43+
.vs/PodBot_mm/v16/ipch/AutoPCH/b87471a5647a6bfe/WAYPOINT.ipch
44+
.vs/PodBot_mm/v16/ipch/AutoPCH/b0aba82d569acc54/BOT.ipch
45+
.vs/PodBot_mm/v16/ipch/AutoPCH/6784f576f6df118c/BOT_NAVIGATE.ipch
46+
.vs/PodBot_mm/v16/Browse.VC.db
47+
.vs/PodBot_mm/v16/.suo
48+
.vs/PodBot_mm/v16/ipch/AutoPCH/b0aba82d569acc54/BOT.ipch
49+
.vs/PodBot_mm/v16/ipch/AutoPCH/6784f576f6df118c/BOT_NAVIGATE.ipch
50+
.vs/PodBot_mm/v16/Browse.VC.db
51+
.vs/PodBot_mm/v16/.suo

.vs/PodBot_mm/v16/.suo

9 KB
Binary file not shown.

.vs/PodBot_mm/v16/Browse.VC.db

944 KB
Binary file not shown.
Binary file not shown.
64 KB
Binary file not shown.

PodBot_mm.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<ClCompile>
6767
<AdditionalOptions>/D_CRT_SECURE_NO_DEPRECATE %(AdditionalOptions)</AdditionalOptions>
6868
<Optimization>Disabled</Optimization>
69-
<AdditionalIncludeDirectories>..\metamod-p-37\metamod\;..\hlsdk-2.3-p4\multiplayer\engine\;..\hlsdk-2.3-p4\multiplayer\common\;..\hlsdk-2.3-p4\multiplayer\pm_shared\;..\hlsdk-2.3-p4\multiplayer\dlls\;..\hlsdk-2.3-p4\multiplayer;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
69+
<AdditionalIncludeDirectories>..\metamod-p\metamod\;..\hlsdk-2.3-p4\multiplayer\engine\;..\hlsdk-2.3-p4\multiplayer\common\;..\hlsdk-2.3-p4\multiplayer\pm_shared\;..\hlsdk-2.3-p4\multiplayer\dlls\;..\hlsdk-2.3-p4\multiplayer;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
7070
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PODBOT_MM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
7171
<MinimalRebuild>true</MinimalRebuild>
7272
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -113,7 +113,7 @@
113113
<Optimization>MaxSpeed</Optimization>
114114
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
115115
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
116-
<AdditionalIncludeDirectories>..\metamod-p-37\metamod\;..\hlsdk-2.3-p4\multiplayer\engine\;..\hlsdk-2.3-p4\multiplayer\common\;..\hlsdk-2.3-p4\multiplayer\pm_shared\;..\hlsdk-2.3-p4\multiplayer\dlls\;..\hlsdk-2.3-p4\multiplayer;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
116+
<AdditionalIncludeDirectories>..\metamod-p\metamod\;..\hlsdk-2.3-p4\multiplayer\engine\;..\hlsdk-2.3-p4\multiplayer\common\;..\hlsdk-2.3-p4\multiplayer\pm_shared\;..\hlsdk-2.3-p4\multiplayer\dlls\;..\hlsdk-2.3-p4\multiplayer;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
117117
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PODBOT_MM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
118118
<StringPooling>true</StringPooling>
119119
<ExceptionHandling>Sync</ExceptionHandling>

bot.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ void BotCreate (int bot_skill, int bot_personality, int bot_team, int bot_class,
483483
}
484484
else // KWo - 07.07.2008
485485
{
486-
if ((strstr (bot_name, "(") != NULL) && (strstr (bot_name, ")") != NULL)) // the bot already had a sufix
486+
if ((strchr (bot_name, '(') != NULL) && (strchr (bot_name, ')') != NULL)) // the bot already had a sufix
487487
{
488488
if ((g_i_cv_detailnames == 1) || (g_i_cv_detailnames == 2)) // use prefix and eventually existing sufix
489489
{
@@ -520,7 +520,7 @@ void BotCreate (int bot_skill, int bot_personality, int bot_team, int bot_class,
520520
}
521521
else // use sufix only
522522
{
523-
if ((strstr (bot_name, "(") == NULL) || (strstr (bot_name, ")") == NULL)) // KWo - 07.07.2008 the bot didn't have yet a sufix
523+
if ((strchr (bot_name, '(') == NULL) || (strchr (bot_name, ')') == NULL)) // KWo - 07.07.2008 the bot didn't have yet a sufix
524524
snprintf (c_name, sizeof (c_name), "%s (%d)", bot_name, skill);
525525
else
526526
snprintf (c_name, sizeof (c_name), "%s", bot_name);
@@ -772,7 +772,7 @@ int BotInFieldOfView (bot_t *pBot, Vector dest)
772772
}
773773

774774

775-
bool BotItemIsVisible (bot_t *pBot, Vector vecDest, char *pszItemName, bool bBomb)
775+
bool BotItemIsVisible (bot_t *pBot, Vector &vecDest, char *pszItemName, bool bBomb)
776776
{
777777
TraceResult tr;
778778

@@ -9478,23 +9478,23 @@ void BotFreeAllMemory (void)
94789478
}
94799479

94809480
if (pBotExperienceData != NULL)
9481-
delete [](pBotExperienceData);
9481+
// delete [](pBotExperienceData);
94829482
pBotExperienceData = NULL;
94839483

94849484
if (g_pFloydDistanceMatrix != NULL)
9485-
delete [](g_pFloydDistanceMatrix);
9485+
// delete [](g_pFloydDistanceMatrix);
94869486
g_pFloydDistanceMatrix = NULL;
94879487

94889488
if (g_pFloydPathMatrix != NULL)
9489-
delete [](g_pFloydPathMatrix);
9489+
// delete [](g_pFloydPathMatrix);
94909490
g_pFloydPathMatrix = NULL;
94919491

94929492
if (g_pWithHostageDistMatrix != NULL)
9493-
delete [](g_pWithHostageDistMatrix);
9493+
// delete [](g_pWithHostageDistMatrix);
94949494
g_pWithHostageDistMatrix = NULL;
94959495

94969496
if (g_pWithHostagePathMatrix != NULL)
9497-
delete [](g_pWithHostagePathMatrix);
9497+
// delete [](g_pWithHostagePathMatrix);
94989498
g_pWithHostagePathMatrix = NULL;
94999499

95009500
// Delete all Textnodes/strings
@@ -9517,7 +9517,7 @@ void BotFreeAllMemory (void)
95179517

95189518
// Delete all Bot Names
95199519
if (g_pszBotNames != NULL)
9520-
delete [] g_pszBotNames;
9520+
// delete [] g_pszBotNames;
95219521
g_pszBotNames = NULL;
95229522

95239523
return; // KABLAM! everything is nuked, wiped, cleaned, memory stick is shining like a coin =)

bot.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#include <assert.h>
2222

23-
#define PBMM_VERSION_STRING "V3B23" // KWo - 18.04.2016
23+
#define PBMM_VERSION_STRING "V3B24" // KWo - 18.04.2016
2424

2525

2626
typedef struct bottask_s

bot_chat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void BotPrepareChatMessage (bot_t *pBot, char *pszText)
112112
while (pszPattern)
113113
{
114114
// all replacement placeholders start with a %
115-
pszPattern = strstr (pszTextStart, "%");
115+
pszPattern = strchr (pszTextStart, '%');
116116

117117
if (pszPattern)
118118
{
@@ -288,7 +288,7 @@ bool BotCheckKeywords(bot_t *pBot, char *pszMessage, char *pszReply)
288288

289289
while (pszCurrKeyword)
290290
{
291-
pszKeywordEnd = strstr (pszCurrKeyword, "@");
291+
pszKeywordEnd = strchr (pszCurrKeyword, '@');
292292

293293
if (pszKeywordEnd)
294294
{

makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ EXTRA_LIBDIRS_WIN32 = -Lextra/lib_win32
1717

1818
SDKTOP=../hlsdk-2.3-p4
1919
SDKSRC=$(SDKTOP)/multiplayer
20-
METADIR=../metamod-p-37/metamod
20+
METADIR=../metamod-p/metamod
2121
SRCDIR=.
2222

2323
OBJDIR_LINUX=obj.linux

0 commit comments

Comments
 (0)