Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SourceMod 1.12 Migration #164

Merged
merged 6 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove g_szOutputSeparator now that spcomp allows string args
  • Loading branch information
Alienmario committed Oct 28, 2024
commit 699f855292fcb15c6c051691b4b0fca1dcec297e
4 changes: 2 additions & 2 deletions scripting/include/srccoop.inc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#if defined SRCCOOP_HL2DM

#define CHECK_ENGINE "HL2DM"; if (GetEngineVersion() != Engine_HL2DM)
#define OUTPUT_SEPARATOR ','
#define OUTPUT_SEPARATOR ","
#define INTRO_TIMER_HUDTEXT

#define ENTPATCH_CUSTOM_NPC_MODELS
Expand Down Expand Up @@ -60,7 +60,7 @@
#define SRCCOOP_BLACKMESA
#endif
#define CHECK_ENGINE "Black Mesa"; if (GetEngineVersion() != Engine_BlackMesa)
#define OUTPUT_SEPARATOR '\27'
#define OUTPUT_SEPARATOR "\27"

#define ENTPATCH_CUSTOM_NPC_MODELS
#define ENTPATCH_UPDATE_ENEMY_MEMORY
Expand Down
16 changes: 5 additions & 11 deletions scripting/include/srccoop/levellump.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
#pragma newdecls required
#pragma semicolon 1

// Output data seperator, varies per game
static char g_szOutputSeparator[2];

// Temporary brush entity model placeholders to be identified and fixed up at entity spawn
#define BRUSH_FIXUP_MDL "models/error.mdl" /* actual model that will be set on fixed up ents */
#define BRUSH_FIXUP_IDENT "$BRUSHFIXUP$" /* identifier that the entities with customized brush models will have their "model" property start with */
Expand Down Expand Up @@ -38,7 +35,7 @@ enum struct CEntityOutputLump
bool LoadFromEntityKeyLump(const CEntityKeyLump pEntityKeyLump)
{
char buffers[5][MAX_VALUE];
if (sizeof(buffers) != ExplodeString(pEntityKeyLump.m_szValue, g_szOutputSeparator, buffers, sizeof(buffers), sizeof(buffers[])))
if (sizeof(buffers) != ExplodeString(pEntityKeyLump.m_szValue, OUTPUT_SEPARATOR, buffers, sizeof(buffers), sizeof(buffers[])))
{
return false;
}
Expand All @@ -59,10 +56,10 @@ enum struct CEntityOutputLump
void SaveToEntityKeyLump(CEntityKeyLump pEntityKeyLump)
{
FormatEx(pEntityKeyLump.m_szValue, sizeof(pEntityKeyLump.m_szValue), "%s%s%s%s%s%s%.2f%s%d",
this.m_szTargetEntity, g_szOutputSeparator,
this.m_szInputName, g_szOutputSeparator,
this.m_szParameter, g_szOutputSeparator,
this.m_flDelay, g_szOutputSeparator,
this.m_szTargetEntity, OUTPUT_SEPARATOR,
this.m_szInputName, OUTPUT_SEPARATOR,
this.m_szParameter, OUTPUT_SEPARATOR,
this.m_flDelay, OUTPUT_SEPARATOR,
this.m_iTimesToFire);
}

Expand Down Expand Up @@ -452,9 +449,6 @@ enum struct CGlobalLevelLump
this.m_pClientCvarList = new CClientConsoleCommandList();
this.m_pOutputHookList = new COutputHookList();
this.m_EdtDefinesMap = new StringMap();

g_szOutputSeparator[0] = OUTPUT_SEPARATOR;
g_szOutputSeparator[1] = 0;
}

void Clear()
Expand Down