Merge branch 'master' into HTTPSizeT
Conflicts: src/HTTPServer/EnvelopeParser.h src/HTTPServer/HTTPFormParser.h src/HTTPServer/MultipartParser.h
This commit is contained in:
commit
0075b2f72e
@ -90,4 +90,4 @@ private:
|
|||||||
|
|
||||||
std::string md5(const std::string & str);
|
std::string md5(const std::string & str);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "DeprecatedBindings.h"
|
#include "DeprecatedBindings.h"
|
||||||
|
#undef TOLUA_TEMPLATE_BIND
|
||||||
#include "tolua++/include/tolua++.h"
|
#include "tolua++/include/tolua++.h"
|
||||||
|
|
||||||
#include "Plugin.h"
|
#include "Plugin.h"
|
||||||
|
@ -11,6 +11,7 @@ extern "C"
|
|||||||
#include "lua/src/lualib.h"
|
#include "lua/src/lualib.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef TOLUA_TEMPLATE_BIND
|
||||||
#include "tolua++/include/tolua++.h"
|
#include "tolua++/include/tolua++.h"
|
||||||
#include "Bindings.h"
|
#include "Bindings.h"
|
||||||
#include "ManualBindings.h"
|
#include "ManualBindings.h"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "ManualBindings.h"
|
#include "ManualBindings.h"
|
||||||
|
#undef TOLUA_TEMPLATE_BIND
|
||||||
#include "tolua++/include/tolua++.h"
|
#include "tolua++/include/tolua++.h"
|
||||||
|
|
||||||
#include "Plugin.h"
|
#include "Plugin.h"
|
||||||
|
@ -5,4 +5,4 @@ class ManualBindings
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void Bind( lua_State* tolua_S );
|
static void Bind( lua_State* tolua_S );
|
||||||
};
|
};
|
||||||
|
@ -5,7 +5,11 @@
|
|||||||
|
|
||||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#define LUA_USE_MACOSX
|
||||||
|
#else
|
||||||
#define LUA_USE_POSIX
|
#define LUA_USE_POSIX
|
||||||
|
#endif
|
||||||
#include "PluginLua.h"
|
#include "PluginLua.h"
|
||||||
#include "../CommandOutput.h"
|
#include "../CommandOutput.h"
|
||||||
|
|
||||||
@ -14,6 +18,7 @@ extern "C"
|
|||||||
#include "lua/src/lualib.h"
|
#include "lua/src/lualib.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef TOLUA_TEMPLATE_BIND
|
||||||
#include "tolua++/include/tolua++.h"
|
#include "tolua++/include/tolua++.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,4 +110,4 @@ AString cWebPlugin::SafeString( const AString & a_String )
|
|||||||
RetVal.push_back( c );
|
RetVal.push_back( c );
|
||||||
}
|
}
|
||||||
return RetVal;
|
return RetVal;
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,9 @@ public:
|
|||||||
class cCallbacks abstract
|
class cCallbacks abstract
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// Force a virtual destructor in descendants:
|
||||||
|
virtual ~cCallbacks() {}
|
||||||
|
|
||||||
/** Called on each block encountered along the path, including the first block (path start)
|
/** Called on each block encountered along the path, including the first block (path start)
|
||||||
When this callback returns true, the tracing is aborted.
|
When this callback returns true, the tracing is aborted.
|
||||||
*/
|
*/
|
||||||
|
@ -122,5 +122,3 @@ void cBoat::HandleSpeedFromAttachee(float a_Forward, float a_Sideways)
|
|||||||
|
|
||||||
AddSpeed(ToAddSpeed);
|
AddSpeed(ToAddSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -27,4 +27,4 @@ enum ENUM_ENTITY_EFFECT
|
|||||||
E_EFFECT_ABSORPTION = 22,
|
E_EFFECT_ABSORPTION = 22,
|
||||||
E_EFFECT_SATURATION = 23,
|
E_EFFECT_SATURATION = 23,
|
||||||
} ;
|
} ;
|
||||||
// tolua_end
|
// tolua_end
|
||||||
|
@ -42,4 +42,4 @@ protected:
|
|||||||
|
|
||||||
/** The number of ticks that the entity has existed / timer between collect and destroy; in msec */
|
/** The number of ticks that the entity has existed / timer between collect and destroy; in msec */
|
||||||
float m_Timer;
|
float m_Timer;
|
||||||
} ; // tolua_export
|
} ; // tolua_export
|
||||||
|
@ -43,4 +43,4 @@ protected:
|
|||||||
// Entity IDs
|
// Entity IDs
|
||||||
int m_PlayerID;
|
int m_PlayerID;
|
||||||
int m_AttachedMobID;
|
int m_AttachedMobID;
|
||||||
} ; // tolua_export
|
} ; // tolua_export
|
||||||
|
@ -38,4 +38,4 @@ void cGroup::InheritFrom( cGroup* a_Group )
|
|||||||
void cGroup::ClearPermission()
|
void cGroup::ClearPermission()
|
||||||
{
|
{
|
||||||
m_Permissions.clear();
|
m_Permissions.clear();
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ public:
|
|||||||
class cCallbacks
|
class cCallbacks
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// Force a virtual destructor in descendants:
|
||||||
virtual ~cCallbacks() {}
|
virtual ~cCallbacks() {}
|
||||||
|
|
||||||
/** Called when a full header line is parsed */
|
/** Called when a full header line is parsed */
|
||||||
|
@ -36,8 +36,8 @@ public:
|
|||||||
class cCallbacks
|
class cCallbacks
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// Force a virtual destructor in descendants:
|
||||||
virtual ~cCallbacks() {};
|
virtual ~cCallbacks() {}
|
||||||
|
|
||||||
/// Called when a new file part is encountered in the form data
|
/// Called when a new file part is encountered in the form data
|
||||||
virtual void OnFileStart(cHTTPFormParser & a_Parser, const AString & a_FileName) = 0;
|
virtual void OnFileStart(cHTTPFormParser & a_Parser, const AString & a_FileName) = 0;
|
||||||
|
@ -22,6 +22,7 @@ public:
|
|||||||
class cCallbacks
|
class cCallbacks
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// Force a virtual destructor in descendants:
|
||||||
virtual ~cCallbacks() {}
|
virtual ~cCallbacks() {}
|
||||||
|
|
||||||
/** Called when a new part starts */
|
/** Called when a new part starts */
|
||||||
|
@ -39,12 +39,20 @@ public:
|
|||||||
public cBlockTracer::cCallbacks
|
public cBlockTracer::cCallbacks
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Vector3d Pos;
|
Vector3d m_Pos;
|
||||||
virtual bool OnNextBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, char a_EntryFace) override
|
bool m_HasFound;
|
||||||
|
|
||||||
|
cCallbacks(void) :
|
||||||
|
m_HasFound(false)
|
||||||
{
|
{
|
||||||
if (a_BlockType != E_BLOCK_AIR)
|
}
|
||||||
|
|
||||||
|
virtual bool OnNextBlock(int a_CBBlockX, int a_CBBlockY, int a_CBBlockZ, BLOCKTYPE a_CBBlockType, NIBBLETYPE a_CBBlockMeta, char a_CBEntryFace) override
|
||||||
|
{
|
||||||
|
if (a_CBBlockType != E_BLOCK_AIR)
|
||||||
{
|
{
|
||||||
Pos = Vector3d(a_BlockX, a_BlockY, a_BlockZ);
|
m_Pos.Set(a_CBBlockX, a_CBBlockY, a_CBBlockZ);
|
||||||
|
m_HasFound = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -57,15 +65,15 @@ public:
|
|||||||
|
|
||||||
Tracer.Trace(Start.x, Start.y, Start.z, End.x, End.y, End.z);
|
Tracer.Trace(Start.x, Start.y, Start.z, End.x, End.y, End.z);
|
||||||
|
|
||||||
double x = Callbacks.Pos.x;
|
if (!Callbacks.m_HasFound)
|
||||||
double y = Callbacks.Pos.y;
|
|
||||||
double z = Callbacks.Pos.z;
|
|
||||||
|
|
||||||
if ((x == 0) && (y == 0) && (z == 0))
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double x = Callbacks.m_Pos.x;
|
||||||
|
double y = Callbacks.m_Pos.y;
|
||||||
|
double z = Callbacks.m_Pos.z;
|
||||||
|
|
||||||
cBoat * Boat = new cBoat(x + 0.5, y + 1, z + 0.5);
|
cBoat * Boat = new cBoat(x + 0.5, y + 1, z + 0.5);
|
||||||
Boat->Initialize(a_World);
|
Boat->Initialize(a_World);
|
||||||
|
|
||||||
|
@ -53,4 +53,4 @@ void cBlaze::Attack(float a_Dt)
|
|||||||
m_AttackInterval = 0.0;
|
m_AttackInterval = 0.0;
|
||||||
// ToDo: Shoot 3 fireballs instead of 1.
|
// ToDo: Shoot 3 fireballs instead of 1.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,3 @@ public:
|
|||||||
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override;
|
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override;
|
||||||
virtual void Attack(float a_Dt) override;
|
virtual void Attack(float a_Dt) override;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -88,4 +88,4 @@ void cSkeleton::Attack(float a_Dt)
|
|||||||
m_World->BroadcastSpawnEntity(*Arrow);
|
m_World->BroadcastSpawnEntity(*Arrow);
|
||||||
m_AttackInterval = 0.0;
|
m_AttackInterval = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ AString GetOSErrorString( int a_ErrNo )
|
|||||||
|
|
||||||
// According to http://linux.die.net/man/3/strerror_r there are two versions of strerror_r():
|
// According to http://linux.die.net/man/3/strerror_r there are two versions of strerror_r():
|
||||||
|
|
||||||
#if ( _GNU_SOURCE ) && !defined(ANDROID_NDK) // GNU version of strerror_r()
|
#if !defined(__APPLE__) && ( _GNU_SOURCE ) && !defined(ANDROID_NDK) // GNU version of strerror_r()
|
||||||
|
|
||||||
char * res = strerror_r( errno, buffer, ARRAYCOUNT(buffer) );
|
char * res = strerror_r( errno, buffer, ARRAYCOUNT(buffer) );
|
||||||
if( res != NULL )
|
if( res != NULL )
|
||||||
|
@ -4,4 +4,4 @@ class cSleep
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void MilliSleep( unsigned int a_MilliSeconds );
|
static void MilliSleep( unsigned int a_MilliSeconds );
|
||||||
};
|
};
|
||||||
|
@ -23,4 +23,4 @@ private:
|
|||||||
cEvent* m_StopEvent;
|
cEvent* m_StopEvent;
|
||||||
|
|
||||||
AString m_ThreadName;
|
AString m_ThreadName;
|
||||||
};
|
};
|
||||||
|
@ -89,4 +89,4 @@ public:
|
|||||||
short m_FlightTimeInTicks;
|
short m_FlightTimeInTicks;
|
||||||
std::vector<int> m_Colours;
|
std::vector<int> m_Colours;
|
||||||
std::vector<int> m_FadeColours;
|
std::vector<int> m_FadeColours;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user