Skip to content

Commit

Permalink
Version 0001
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillerDragon committed Aug 1, 2019
1 parent ecfc137 commit 4fc9071
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/engine/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,9 @@ void CClient::Run()
GameClient()->OnInit();

char aBuf[256];
str_format(aBuf, sizeof(aBuf), "version %s", GameClient()->NetVersion());
str_format(aBuf, sizeof(aBuf), "teeworlds version %s", GameClient()->NetVersion());
m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "client", aBuf);
str_format(aBuf, sizeof(aBuf), "chillerbot-h7 version %s", CHILLERBOT_VERSION);
m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "client", aBuf);
if(str_comp(GameClient()->NetVersionHashUsed(), GameClient()->NetVersionHashReal()))
{
Expand Down
21 changes: 21 additions & 0 deletions src/game/client/components/chat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include <game/client/components/scoreboard.h>
#include <game/client/components/sounds.h>
#include <game/version.h>

#include "chat.h"
#include "binds.h"
Expand Down Expand Up @@ -230,12 +231,32 @@ void CChat::ClearInput()
m_pCommands->Reset();
}

void CChat::ChillerbotMessage(const char *pMsg)
{
if(str_find_nocase(pMsg, "bot?") ||
str_find_nocase(pMsg, "info();") ||
str_find_nocase(pMsg, "version();") ||
str_find_nocase(pMsg, "help();") ||
str_find_nocase(pMsg, "!help") ||
str_find_nocase(pMsg, "!info"))
{
char aBuf[128];
str_format(aBuf, sizeof(aBuf), "[chillerbot-h7] chillerbot.png headless (v%s)", CHILLERBOT_VERSION);
Say(CHAT_ALL, aBuf);
}
else if(str_find_nocase(pMsg, "I was a faithful friend from the start. The best friend? No. But I was a faithful friend. From map to map, I helped jao get across hard barriers. We talked and talked, about the future, what teeworlds could hold. We had wonderful moments together, ..."))
{
Say(CHAT_ALL, "... memories that would last a lifetime. Whenever I would see him on a server, a new journey would spark up as we explored the wonders of each map. And now? he won't fucking transfer my points");
}
}

void CChat::OnMessage(int MsgType, void *pRawMsg)
{
if(MsgType == NETMSGTYPE_SV_CHAT)
{
CNetMsg_Sv_Chat *pMsg = (CNetMsg_Sv_Chat *)pRawMsg;
AddLine(pMsg->m_ClientID, pMsg->m_Mode, pMsg->m_pMessage, pMsg->m_TargetID);
ChillerbotMessage(pMsg->m_pMessage);
}
}

Expand Down
1 change: 1 addition & 0 deletions src/game/client/components/chat.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,6 @@ class CChat : public CComponent
virtual void OnRelease();
virtual void OnMessage(int MsgType, void *pRawMsg);
virtual bool OnInput(IInput::CEvent Event);
void ChillerbotMessage(const char *pMsg);
};
#endif
1 change: 1 addition & 0 deletions src/game/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
#define GAME_NETVERSION_HASH_FORCED "802f1be60a05665f"
#define GAME_NETVERSION "0.7 " GAME_NETVERSION_HASH_FORCED
#define CLIENT_VERSION 0x0703
#define CHILLERBOT_VERSION "0001"
static const char GAME_RELEASE_VERSION[8] = "0.7.3.1";
#endif

0 comments on commit 4fc9071

Please sign in to comment.