Skip to content

Commit

Permalink
Fix chat processing and sol2 windows paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
nemerle committed Oct 13, 2017
1 parent b8dc46b commit 77e2c28
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 23 deletions.
2 changes: 1 addition & 1 deletion 3rd_party/ExternalProject_LUA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ ExternalProject_Add(
ADD_LIBRARY(lua_IMP STATIC IMPORTED GLOBAL)
add_dependencies(lua_IMP lua-${lua_RELEASE})
SET_PROPERTY(TARGET lua_IMP APPEND PROPERTY IMPORTED_LOCATION ${lua_LIBRARY_STATIC} )

set_property(TARGET lua_IMP PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ThirdParty_Install_Dir}/include)
#set_shared_lib_properties(ace)
10 changes: 5 additions & 5 deletions 3rd_party/lua_sol2/include/sol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1558,17 +1558,17 @@ namespace sol {
// beginning of sol/compatibility/version.hpp

#ifdef SOL_USING_CXX_LUA
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#include <lua/lua.h>
#include <lua/lualib.h>
#include <lua/lauxlib.h>
#ifdef SOL_USING_CXX_LUAJIT
#include <luajit.h>
#include <lua/luajit.h>
#endif // C++ LuaJIT ... whatever that means
#ifndef SOL_EXCEPTIONS_SAFE_PROPAGATION
#define SOL_EXCEPTIONS_SAFE_PROPAGATION
#endif // Exceptions can be propagated safely using C++-compiled Lua
#else
#include <lua.hpp>
#include <lua/lua.hpp>
#endif // C++ Mangling for Lua

#ifdef LUAJIT_VERSION
Expand Down
5 changes: 4 additions & 1 deletion Projects/CoX/Common/AuthProtocol/Events/LoginRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ class LoginRequest : public AuthLinkEvent
{
uint8_t packet_code;
buf.uGet(packet_code);
assert(packet_code==0);
if(packet_code!=0)
{
//assert(packet_code==0);
}
buf.uGetBytes((uint8_t *)login, sizeof(login));
buf.uGetBytes((uint8_t *)password, sizeof(password));
buf.uGet(unkval1);
Expand Down
32 changes: 17 additions & 15 deletions Projects/CoX/Servers/AuthServer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@
*/
//#define ACE_NTRACE 0
//#include "Auth.h"
#include "Servers/ServerManager.h"
#include "Servers/server_support.h"
#include "version.h"
//////////////////////////////////////////////////////////////////////////

#include "Servers/AdminServer/AdminServer.h"
#include "AuthServer.h"
#include "Servers/MapServer/MapServer.h"
#include "Servers/GameServer/GameServer.h"
//////////////////////////////////////////////////////////////////////////

#include <iostream>
#include <string>
#include <stdlib.h>
#include <memory>
#include <ace/ACE.h>
#include <ace/Get_Opt.h>
#include <ace/ACE.h>
Expand All @@ -31,17 +38,11 @@
#include <ace/Reactor.h>
#include <ace/OS_main.h> //Included to enable file logging
#include <ace/streams.h> //Included to enable file logging
//#include "Auth.h"
#include "Servers/ServerManager.h"
#include "Servers/server_support.h"
#include "version.h"
//////////////////////////////////////////////////////////////////////////

#include "Servers/AdminServer/AdminServer.h"
#include "AuthServer.h"
#include "Servers/MapServer/MapServer.h"
#include "Servers/GameServer/GameServer.h"
//////////////////////////////////////////////////////////////////////////
#include <QtCore/QCoreApplication>
#include <iostream>
#include <string>
#include <stdlib.h>
#include <memory>

/** \brief The LogCallback class
*/
Expand Down Expand Up @@ -145,6 +146,7 @@ class CommandLineContents
};
ACE_INT32 ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
QCoreApplication q_app(argc,argv);
ACE_Sig_Set interesting_signals;
interesting_signals.sig_add(SIGINT);
interesting_signals.sig_add(SIGHUP);
Expand Down
1 change: 1 addition & 0 deletions Projects/CoX/Servers/MapServer/Events/InputState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ void InputState::serializefrom(BitStream &bs)
bs.GetBitArray(command_stream.write_ptr(),command_bitcount);
command_stream.SetWritePos(command_bitcount);
assert(command_stream.GetReadableBits()==command_bitcount);
m_user_commands = command_stream;
#ifdef DEBUG_INPUT
fprintf(stderr,"\n");
#endif
Expand Down
2 changes: 1 addition & 1 deletion Projects/CoX/Servers/MapServer/MapInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ void MapInstance::on_console_command(ConsoleCommand * ev){
//TODO: restrict scripting access to GM's and such
if(ev->contents.midRef(2).startsWith("exec:{"))
{
QString code = ev->contents.mid(8,ev->contents.size()-1);
QString code = ev->contents.mid(8,ev->contents.size()-9);
m_scripting_interface->runScript(src,code,"user provided script");
return;
}
Expand Down

0 comments on commit 77e2c28

Please sign in to comment.