From 36b8b81914827bf40d04c740ccb1d58255761187 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Mon, 5 Aug 2013 12:06:04 -0400 Subject: [PATCH] Ep1 compile fixes. --- core/ChatTriggers.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/ChatTriggers.cpp b/core/ChatTriggers.cpp index c4c08754..367b4786 100644 --- a/core/ChatTriggers.cpp +++ b/core/ChatTriggers.cpp @@ -136,7 +136,7 @@ void ChatTriggers::OnSourceModGameInitialized() } #if SOURCE_ENGINE == SE_EPISODEONE - m_bIsINS = (strncmp(g_SourceMod.GetGameFolderName(), "insurgency") == 0); + m_bIsINS = (strcmp(g_SourceMod.GetGameFolderName(), "insurgency") == 0); if (m_bIsINS) { @@ -258,7 +258,7 @@ void ChatTriggers::OnSayCommand_Pre() const char * pCommandName = command.Arg(0); #if SOURCE_ENGINE == SE_EPISODEONE - if (m_bIsINS && strncmp(pCommandName, "say2") && strlen(args) >= 4) + if (m_bIsINS && strcmp(pCommandName, "say2") == 0 && strlen(args) >= 4) { args += 4; } @@ -321,12 +321,15 @@ void ChatTriggers::OnSayCommand_Pre() #if SOURCE_ENGINE == SE_DOTA void ChatTriggers::OnSayCommand_Post(const CCommandContext &context, const CCommand &command) +{ #elif SOURCE_ENGINE >= SE_ORANGEBOX void ChatTriggers::OnSayCommand_Post(const CCommand &command) +{ #else void ChatTriggers::OnSayCommand_Post() -#endif { + CCommand command; +#endif int client = g_ConCmds.GetCommandClient(); if (m_bWillProcessInPost)