From 76cf61ce66e741d034422462ce454960d64201f1 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 18 Aug 2013 10:51:21 +0200 Subject: Disabled Lua virtual hooks. This technology was used for old-style plugins and is no longer supported nor needed. Fixes #78. --- source/Bindings.cpp | 2377 ++++----------------------------------- source/Bindings.h | 2 +- source/virtual_method_hooks.lua | 2 +- 3 files changed, 221 insertions(+), 2160 deletions(-) (limited to 'source') diff --git a/source/Bindings.cpp b/source/Bindings.cpp index 30c5e8e34..6a5ff3e32 100644 --- a/source/Bindings.cpp +++ b/source/Bindings.cpp @@ -1,6 +1,6 @@ /* ** Lua binding: AllToLua -** Generated automatically by tolua++-1.0.92 on 08/17/13 23:54:30. +** Generated automatically by tolua++-1.0.92 on 08/18/13 10:47:30. */ #ifndef __cplusplus @@ -203,12 +203,8 @@ static int tolua_collect_Vector3d (lua_State* tolua_S) static void tolua_reg_types (lua_State* tolua_S) { tolua_usertype(tolua_S,"TakeDamageInfo"); - tolua_usertype(tolua_S,"cPlugin_NewLua"); - tolua_usertype(tolua_S,"cMonster"); - tolua_usertype(tolua_S,"cCraftingGrid"); tolua_usertype(tolua_S,"cCraftingRecipe"); tolua_usertype(tolua_S,"cPlugin"); - tolua_usertype(tolua_S,"cWindow"); tolua_usertype(tolua_S,"cStringMap"); tolua_usertype(tolua_S,"cItemGrid"); tolua_usertype(tolua_S,"cBlockArea"); @@ -216,38 +212,38 @@ static void tolua_reg_types (lua_State* tolua_S) tolua_usertype(tolua_S,"cLuaWindow"); tolua_usertype(tolua_S,"cInventory"); tolua_usertype(tolua_S,"cRoot"); - tolua_usertype(tolua_S,"cCuboid"); + tolua_usertype(tolua_S,"cDropperEntity"); tolua_usertype(tolua_S,"std::vector"); - tolua_usertype(tolua_S,"cGroup"); + tolua_usertype(tolua_S,"cMonster"); tolua_usertype(tolua_S,"cPickup"); tolua_usertype(tolua_S,"std::vector"); - tolua_usertype(tolua_S,"cTracer"); + tolua_usertype(tolua_S,"cWindow"); tolua_usertype(tolua_S,"cClientHandle"); tolua_usertype(tolua_S,"cChunkDesc"); tolua_usertype(tolua_S,"cFurnaceRecipe"); - tolua_usertype(tolua_S,"Vector3i"); + tolua_usertype(tolua_S,"cCraftingGrid"); tolua_usertype(tolua_S,"cChatColor"); - tolua_usertype(tolua_S,"cWorld"); - tolua_usertype(tolua_S,"Lua__cPickup"); - tolua_usertype(tolua_S,"Lua__cWebPlugin"); - tolua_usertype(tolua_S,"cCraftingRecipes"); - tolua_usertype(tolua_S,"cEntity"); + tolua_usertype(tolua_S,"cGroup"); + tolua_usertype(tolua_S,"cTracer"); + tolua_usertype(tolua_S,"cCuboid"); + tolua_usertype(tolua_S,"Vector3i"); + tolua_usertype(tolua_S,"cPlugin_NewLua"); tolua_usertype(tolua_S,"cItem"); tolua_usertype(tolua_S,"Vector3f"); - tolua_usertype(tolua_S,"cWebPlugin"); + tolua_usertype(tolua_S,"cCraftingRecipes"); tolua_usertype(tolua_S,"cDropSpenserEntity"); - tolua_usertype(tolua_S,"Lua__cPlayer"); - tolua_usertype(tolua_S,"cWebAdmin"); + tolua_usertype(tolua_S,"cWorld"); + tolua_usertype(tolua_S,"cWebPlugin"); tolua_usertype(tolua_S,"cChestEntity"); tolua_usertype(tolua_S,"cDispenserEntity"); - tolua_usertype(tolua_S,"sWebAdminPage"); + tolua_usertype(tolua_S,"cWebAdmin"); tolua_usertype(tolua_S,"cBlockEntity"); tolua_usertype(tolua_S,"cCriticalSection"); tolua_usertype(tolua_S,"HTTPTemplateRequest"); + tolua_usertype(tolua_S,"sWebAdminPage"); tolua_usertype(tolua_S,"HTTPRequest"); tolua_usertype(tolua_S,"HTTPFormData"); tolua_usertype(tolua_S,"cFurnaceEntity"); - tolua_usertype(tolua_S,"cDropperEntity"); tolua_usertype(tolua_S,"cLineBlockTracer"); tolua_usertype(tolua_S,"cPluginManager"); tolua_usertype(tolua_S,"cIniFile"); @@ -257,10 +253,10 @@ static void tolua_reg_types (lua_State* tolua_S) tolua_usertype(tolua_S,"cPlayer"); tolua_usertype(tolua_S,"cGroupManager"); tolua_usertype(tolua_S,"cBlockEntityWindowOwner"); + tolua_usertype(tolua_S,"cEntity"); tolua_usertype(tolua_S,"cItemGrid::cListener"); tolua_usertype(tolua_S,"cServer"); tolua_usertype(tolua_S,"cItems"); - tolua_usertype(tolua_S,"Lua__cEntity"); tolua_usertype(tolua_S,"Vector3d"); } @@ -7273,1401 +7269,437 @@ static int tolua_AllToLua_cEntity_IsRclking00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE - class Lua__cEntity : public cEntity, public ToluaBase { -public: - bool IsA( const char* a_ClassName)const { - if (push_method("IsA", tolua_AllToLua_cEntity_IsA00)) { - tolua_pushstring(lua_state, (const char*)a_ClassName); - ToluaBase::dbcall(lua_state, 2, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cEntity:: IsA(a_ClassName); - }; - }; - const char* GetClass( void )const { - if (push_method("GetClass", tolua_AllToLua_cEntity_GetClass00)) { - ToluaBase::dbcall(lua_state, 1, 1); - const char* tolua_ret = ( const char* )tolua_tostring(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( const char* ) cEntity:: GetClass(); - }; - }; - const char* GetParentClass( void )const { - if (push_method("GetParentClass", tolua_AllToLua_cEntity_GetParentClass00)) { - ToluaBase::dbcall(lua_state, 1, 1); - const char* tolua_ret = ( const char* )tolua_tostring(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( const char* ) cEntity:: GetParentClass(); - }; - }; - int GetRawDamageAgainst( const cEntity& a_Receiver) { - if (push_method("GetRawDamageAgainst", tolua_AllToLua_cEntity_GetRawDamageAgainst00)) { - tolua_pushusertype(lua_state, (void*)&a_Receiver, "const cEntity"); - ToluaBase::dbcall(lua_state, 2, 1); - int tolua_ret = ( int )tolua_tonumber(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( int ) cEntity:: GetRawDamageAgainst(a_Receiver); - }; - }; - int GetArmorCoverAgainst( const cEntity* a_Attacker, eDamageType a_DamageType, int a_RawDamage) { - if (push_method("GetArmorCoverAgainst", tolua_AllToLua_cEntity_GetArmorCoverAgainst00)) { - tolua_pushusertype(lua_state, (void*)a_Attacker, "const cEntity"); - tolua_pushnumber(lua_state, (lua_Number)a_DamageType); - tolua_pushnumber(lua_state, (lua_Number)a_RawDamage); - ToluaBase::dbcall(lua_state, 4, 1); - int tolua_ret = ( int )tolua_tonumber(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( int ) cEntity:: GetArmorCoverAgainst(a_Attacker,a_DamageType,a_RawDamage); - }; - }; - double GetKnockbackAmountAgainst( const cEntity& a_Receiver) { - if (push_method("GetKnockbackAmountAgainst", tolua_AllToLua_cEntity_GetKnockbackAmountAgainst00)) { - tolua_pushusertype(lua_state, (void*)&a_Receiver, "const cEntity"); - ToluaBase::dbcall(lua_state, 2, 1); - double tolua_ret = ( double )tolua_tonumber(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( double ) cEntity:: GetKnockbackAmountAgainst(a_Receiver); - }; - }; - cItem GetEquippedWeapon( void )const { - if (push_method("GetEquippedWeapon", tolua_AllToLua_cEntity_GetEquippedWeapon00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cEntity:: GetEquippedWeapon(); - }; - }; - cItem GetEquippedHelmet( void )const { - if (push_method("GetEquippedHelmet", tolua_AllToLua_cEntity_GetEquippedHelmet00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cEntity:: GetEquippedHelmet(); - }; - }; - cItem GetEquippedChestplate( void )const { - if (push_method("GetEquippedChestplate", tolua_AllToLua_cEntity_GetEquippedChestplate00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cEntity:: GetEquippedChestplate(); - }; - }; - cItem GetEquippedLeggings( void )const { - if (push_method("GetEquippedLeggings", tolua_AllToLua_cEntity_GetEquippedLeggings00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cEntity:: GetEquippedLeggings(); - }; - }; - cItem GetEquippedBoots( void )const { - if (push_method("GetEquippedBoots", tolua_AllToLua_cEntity_GetEquippedBoots00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cEntity:: GetEquippedBoots(); - }; - }; - void KilledBy( cEntity* a_Killer) { - if (push_method("KilledBy", tolua_AllToLua_cEntity_KilledBy00)) { - tolua_pushusertype(lua_state, (void*)a_Killer, "cEntity"); - ToluaBase::dbcall(lua_state, 2, 0); - } else { - return ( void ) cEntity:: KilledBy(a_Killer); - }; - }; - void TeleportToEntity( cEntity& a_Entity) { - if (push_method("TeleportToEntity", tolua_AllToLua_cEntity_TeleportToEntity00)) { - tolua_pushusertype(lua_state, (void*)&a_Entity, "cEntity"); - ToluaBase::dbcall(lua_state, 2, 0); - } else { - return ( void ) cEntity:: TeleportToEntity(a_Entity); - }; - }; - void TeleportToCoords( double a_PosX, double a_PosY, double a_PosZ) { - if (push_method("TeleportToCoords", tolua_AllToLua_cEntity_TeleportToCoords00)) { - tolua_pushnumber(lua_state, (lua_Number)a_PosX); - tolua_pushnumber(lua_state, (lua_Number)a_PosY); - tolua_pushnumber(lua_state, (lua_Number)a_PosZ); - ToluaBase::dbcall(lua_state, 4, 0); - } else { - return ( void ) cEntity:: TeleportToCoords(a_PosX,a_PosY,a_PosZ); - }; - }; - bool IsOnFire( void )const { - if (push_method("IsOnFire", tolua_AllToLua_cEntity_IsOnFire00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cEntity:: IsOnFire(); - }; - }; - bool IsCrouched( void )const { - if (push_method("IsCrouched", tolua_AllToLua_cEntity_IsCrouched00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cEntity:: IsCrouched(); - }; - }; - bool IsRiding( void )const { - if (push_method("IsRiding", tolua_AllToLua_cEntity_IsRiding00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cEntity:: IsRiding(); - }; - }; - bool IsSprinting( void )const { - if (push_method("IsSprinting", tolua_AllToLua_cEntity_IsSprinting00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cEntity:: IsSprinting(); - }; - }; - bool IsRclking( void )const { - if (push_method("IsRclking", tolua_AllToLua_cEntity_IsRclking00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cEntity:: IsRclking(); - }; - }; - - bool cEntity__IsA( const char* a_ClassName) { - return ( bool )cEntity::IsA(a_ClassName); - }; - const char* cEntity__GetClass( void ) { - return ( const char* )cEntity::GetClass(); - }; - const char* cEntity__GetParentClass( void ) { - return ( const char* )cEntity::GetParentClass(); - }; - int cEntity__GetRawDamageAgainst( const cEntity& a_Receiver) { - return ( int )cEntity::GetRawDamageAgainst(a_Receiver); - }; - int cEntity__GetArmorCoverAgainst( const cEntity* a_Attacker, eDamageType a_DamageType, int a_RawDamage) { - return ( int )cEntity::GetArmorCoverAgainst(a_Attacker,a_DamageType,a_RawDamage); - }; - double cEntity__GetKnockbackAmountAgainst( const cEntity& a_Receiver) { - return ( double )cEntity::GetKnockbackAmountAgainst(a_Receiver); - }; - cItem cEntity__GetEquippedWeapon( void ) { - return ( cItem )cEntity::GetEquippedWeapon(); - }; - cItem cEntity__GetEquippedHelmet( void ) { - return ( cItem )cEntity::GetEquippedHelmet(); - }; - cItem cEntity__GetEquippedChestplate( void ) { - return ( cItem )cEntity::GetEquippedChestplate(); - }; - cItem cEntity__GetEquippedLeggings( void ) { - return ( cItem )cEntity::GetEquippedLeggings(); - }; - cItem cEntity__GetEquippedBoots( void ) { - return ( cItem )cEntity::GetEquippedBoots(); - }; - void cEntity__KilledBy( cEntity* a_Killer) { - return ( void )cEntity::KilledBy(a_Killer); - }; - void cEntity__TeleportToEntity( cEntity& a_Entity) { - return ( void )cEntity::TeleportToEntity(a_Entity); - }; - void cEntity__TeleportToCoords( double a_PosX, double a_PosY, double a_PosZ) { - return ( void )cEntity::TeleportToCoords(a_PosX,a_PosY,a_PosZ); - }; - bool cEntity__IsOnFire( void ) { - return ( bool )cEntity::IsOnFire(); - }; - bool cEntity__IsCrouched( void ) { - return ( bool )cEntity::IsCrouched(); - }; - bool cEntity__IsRiding( void ) { - return ( bool )cEntity::IsRiding(); - }; - bool cEntity__IsSprinting( void ) { - return ( bool )cEntity::IsSprinting(); - }; - bool cEntity__IsRclking( void ) { - return ( bool )cEntity::IsRclking(); - }; -}; - -/* method: tolua__set_instance of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_tolua__set_instance00 -static int tolua_AllToLua_Lua__cEntity_tolua__set_instance00(lua_State* tolua_S) +/* method: GetEyeHeight of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetEyeHeight00 +static int tolua_AllToLua_cPlayer_GetEyeHeight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); - lua_State* L = tolua_S; - lua_Object lo = ((lua_Object) tolua_tovalue(tolua_S,2,0)); + const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'tolua__set_instance'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEyeHeight'", NULL); #endif { - self->tolua__set_instance(L,lo); + double tolua_ret = (double) self->GetEyeHeight(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'tolua__set_instance'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetEyeHeight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cEntity__IsA of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__IsA00 -static int tolua_AllToLua_Lua__cEntity_cEntity__IsA00(lua_State* tolua_S) +/* method: GetEyePosition of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetEyePosition00 +static int tolua_AllToLua_cPlayer_GetEyePosition00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || - !tolua_isstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); - const char* a_ClassName = ((const char*) tolua_tostring(tolua_S,2,0)); + const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__IsA'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEyePosition'", NULL); #endif { - bool tolua_ret = (bool) self->cEntity__IsA(a_ClassName); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + Vector3d tolua_ret = (Vector3d) self->GetEyePosition(); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3d)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3d"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3d)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3d"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__IsA'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetEyePosition'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cEntity__GetClass of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__GetClass00 -static int tolua_AllToLua_Lua__cEntity_cEntity__GetClass00(lua_State* tolua_S) +/* method: IsOnGround of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_IsOnGround00 +static int tolua_AllToLua_cPlayer_IsOnGround00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); + const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__GetClass'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsOnGround'", NULL); #endif { - const char* tolua_ret = (const char*) self->cEntity__GetClass(); - tolua_pushstring(tolua_S,(const char*)tolua_ret); + bool tolua_ret = (bool) self->IsOnGround(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__GetClass'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsOnGround'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cEntity__GetParentClass of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__GetParentClass00 -static int tolua_AllToLua_Lua__cEntity_cEntity__GetParentClass00(lua_State* tolua_S) +/* method: GetStance of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetStance00 +static int tolua_AllToLua_cPlayer_GetStance00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); + const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__GetParentClass'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetStance'", NULL); #endif { - const char* tolua_ret = (const char*) self->cEntity__GetParentClass(); - tolua_pushstring(tolua_S,(const char*)tolua_ret); + const double tolua_ret = (const double) self->GetStance(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__GetParentClass'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetStance'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cEntity__GetRawDamageAgainst of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__GetRawDamageAgainst00 -static int tolua_AllToLua_Lua__cEntity_cEntity__GetRawDamageAgainst00(lua_State* tolua_S) +/* method: GetInventory of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetInventory00 +static int tolua_AllToLua_cPlayer_GetInventory00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cEntity",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); - const cEntity* a_Receiver = ((const cEntity*) tolua_tousertype(tolua_S,2,0)); + cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__GetRawDamageAgainst'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetInventory'", NULL); #endif { - int tolua_ret = (int) self->cEntity__GetRawDamageAgainst(*a_Receiver); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + cInventory& tolua_ret = (cInventory&) self->GetInventory(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cInventory"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__GetRawDamageAgainst'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetInventory'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cEntity__GetArmorCoverAgainst of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__GetArmorCoverAgainst00 -static int tolua_AllToLua_Lua__cEntity_cEntity__GetArmorCoverAgainst00(lua_State* tolua_S) +/* method: GetEquippedItem of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetEquippedItem00 +static int tolua_AllToLua_cPlayer_GetEquippedItem00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || - !tolua_isusertype(tolua_S,2,"const cEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); - const cEntity* a_Attacker = ((const cEntity*) tolua_tousertype(tolua_S,2,0)); - eDamageType a_DamageType = ((eDamageType) (int) tolua_tonumber(tolua_S,3,0)); - int a_RawDamage = ((int) tolua_tonumber(tolua_S,4,0)); + const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__GetArmorCoverAgainst'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedItem'", NULL); #endif { - int tolua_ret = (int) self->cEntity__GetArmorCoverAgainst(a_Attacker,a_DamageType,a_RawDamage); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + const cItem& tolua_ret = (const cItem&) self->GetEquippedItem(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__GetArmorCoverAgainst'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetEquippedItem'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cEntity__GetKnockbackAmountAgainst of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__GetKnockbackAmountAgainst00 -static int tolua_AllToLua_Lua__cEntity_cEntity__GetKnockbackAmountAgainst00(lua_State* tolua_S) +/* method: GetGameMode of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetGameMode00 +static int tolua_AllToLua_cPlayer_GetGameMode00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cEntity",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); - const cEntity* a_Receiver = ((const cEntity*) tolua_tousertype(tolua_S,2,0)); + const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__GetKnockbackAmountAgainst'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetGameMode'", NULL); #endif { - double tolua_ret = (double) self->cEntity__GetKnockbackAmountAgainst(*a_Receiver); + eGameMode tolua_ret = (eGameMode) self->GetGameMode(); tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__GetKnockbackAmountAgainst'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetGameMode'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cEntity__GetEquippedWeapon of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedWeapon00 -static int tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedWeapon00(lua_State* tolua_S) +/* method: SetGameMode of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_SetGameMode00 +static int tolua_AllToLua_cPlayer_SetGameMode00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); + cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); + eGameMode a_GameMode = ((eGameMode) (int) tolua_tonumber(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__GetEquippedWeapon'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetGameMode'", NULL); #endif { - cItem tolua_ret = (cItem) self->cEntity__GetEquippedWeapon(); - { -#ifdef __cplusplus - void* tolua_obj = Mtolua_new((cItem)(tolua_ret)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#else - void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(cItem)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#endif - } + self->SetGameMode(a_GameMode); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__GetEquippedWeapon'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetGameMode'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cEntity__GetEquippedHelmet of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedHelmet00 -static int tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedHelmet00(lua_State* tolua_S) +/* method: IsGameModeCreative of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_IsGameModeCreative00 +static int tolua_AllToLua_cPlayer_IsGameModeCreative00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); + const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__GetEquippedHelmet'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsGameModeCreative'", NULL); #endif { - cItem tolua_ret = (cItem) self->cEntity__GetEquippedHelmet(); - { -#ifdef __cplusplus - void* tolua_obj = Mtolua_new((cItem)(tolua_ret)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#else - void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(cItem)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#endif - } + bool tolua_ret = (bool) self->IsGameModeCreative(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__GetEquippedHelmet'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsGameModeCreative'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cEntity__GetEquippedChestplate of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedChestplate00 -static int tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedChestplate00(lua_State* tolua_S) +/* method: IsGameModeSurvival of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_IsGameModeSurvival00 +static int tolua_AllToLua_cPlayer_IsGameModeSurvival00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); + const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__GetEquippedChestplate'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsGameModeSurvival'", NULL); #endif { - cItem tolua_ret = (cItem) self->cEntity__GetEquippedChestplate(); - { -#ifdef __cplusplus - void* tolua_obj = Mtolua_new((cItem)(tolua_ret)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#else - void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(cItem)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#endif - } + bool tolua_ret = (bool) self->IsGameModeSurvival(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__GetEquippedChestplate'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsGameModeSurvival'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cEntity__GetEquippedLeggings of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedLeggings00 -static int tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedLeggings00(lua_State* tolua_S) +/* method: IsGameModeAdventure of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_IsGameModeAdventure00 +static int tolua_AllToLua_cPlayer_IsGameModeAdventure00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); + const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__GetEquippedLeggings'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsGameModeAdventure'", NULL); #endif { - cItem tolua_ret = (cItem) self->cEntity__GetEquippedLeggings(); - { -#ifdef __cplusplus - void* tolua_obj = Mtolua_new((cItem)(tolua_ret)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#else - void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(cItem)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#endif - } + bool tolua_ret = (bool) self->IsGameModeAdventure(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__GetEquippedLeggings'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsGameModeAdventure'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cEntity__GetEquippedBoots of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedBoots00 -static int tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedBoots00(lua_State* tolua_S) +/* method: GetIP of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetIP00 +static int tolua_AllToLua_cPlayer_GetIP00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); + const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__GetEquippedBoots'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetIP'", NULL); #endif { - cItem tolua_ret = (cItem) self->cEntity__GetEquippedBoots(); - { -#ifdef __cplusplus - void* tolua_obj = Mtolua_new((cItem)(tolua_ret)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#else - void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(cItem)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#endif - } + AString tolua_ret = (AString) self->GetIP(); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__GetEquippedBoots'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetIP'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cEntity__KilledBy of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__KilledBy00 -static int tolua_AllToLua_Lua__cEntity_cEntity__KilledBy00(lua_State* tolua_S) +/* method: MoveTo of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_MoveTo00 +static int tolua_AllToLua_cPlayer_MoveTo00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || - !tolua_isusertype(tolua_S,2,"cEntity",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3d",0,&tolua_err)) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); - cEntity* a_Killer = ((cEntity*) tolua_tousertype(tolua_S,2,0)); + cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); + const Vector3d* a_NewPos = ((const Vector3d*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__KilledBy'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MoveTo'", NULL); #endif { - self->cEntity__KilledBy(a_Killer); + self->MoveTo(*a_NewPos); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__KilledBy'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'MoveTo'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cEntity__TeleportToEntity of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__TeleportToEntity00 -static int tolua_AllToLua_Lua__cEntity_cEntity__TeleportToEntity00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cEntity",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); - cEntity* a_Entity = ((cEntity*) tolua_tousertype(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__TeleportToEntity'", NULL); -#endif - { - self->cEntity__TeleportToEntity(*a_Entity); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__TeleportToEntity'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: cEntity__TeleportToCoords of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__TeleportToCoords00 -static int tolua_AllToLua_Lua__cEntity_cEntity__TeleportToCoords00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); - double a_PosX = ((double) tolua_tonumber(tolua_S,2,0)); - double a_PosY = ((double) tolua_tonumber(tolua_S,3,0)); - double a_PosZ = ((double) tolua_tonumber(tolua_S,4,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__TeleportToCoords'", NULL); -#endif - { - self->cEntity__TeleportToCoords(a_PosX,a_PosY,a_PosZ); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__TeleportToCoords'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: cEntity__IsOnFire of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__IsOnFire00 -static int tolua_AllToLua_Lua__cEntity_cEntity__IsOnFire00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__IsOnFire'", NULL); -#endif - { - bool tolua_ret = (bool) self->cEntity__IsOnFire(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__IsOnFire'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: cEntity__IsCrouched of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__IsCrouched00 -static int tolua_AllToLua_Lua__cEntity_cEntity__IsCrouched00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__IsCrouched'", NULL); -#endif - { - bool tolua_ret = (bool) self->cEntity__IsCrouched(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__IsCrouched'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: cEntity__IsRiding of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__IsRiding00 -static int tolua_AllToLua_Lua__cEntity_cEntity__IsRiding00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__IsRiding'", NULL); -#endif - { - bool tolua_ret = (bool) self->cEntity__IsRiding(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__IsRiding'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: cEntity__IsSprinting of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__IsSprinting00 -static int tolua_AllToLua_Lua__cEntity_cEntity__IsSprinting00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__IsSprinting'", NULL); -#endif - { - bool tolua_ret = (bool) self->cEntity__IsSprinting(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__IsSprinting'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: cEntity__IsRclking of class Lua__cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cEntity_cEntity__IsRclking00 -static int tolua_AllToLua_Lua__cEntity_cEntity__IsRclking00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"Lua__cEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - Lua__cEntity* self = (Lua__cEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cEntity__IsRclking'", NULL); -#endif - { - bool tolua_ret = (bool) self->cEntity__IsRclking(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cEntity__IsRclking'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetEyeHeight of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetEyeHeight00 -static int tolua_AllToLua_cPlayer_GetEyeHeight00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEyeHeight'", NULL); -#endif - { - double tolua_ret = (double) self->GetEyeHeight(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetEyeHeight'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetEyePosition of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetEyePosition00 -static int tolua_AllToLua_cPlayer_GetEyePosition00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEyePosition'", NULL); -#endif - { - Vector3d tolua_ret = (Vector3d) self->GetEyePosition(); - { -#ifdef __cplusplus - void* tolua_obj = Mtolua_new((Vector3d)(tolua_ret)); - tolua_pushusertype(tolua_S,tolua_obj,"Vector3d"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#else - void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3d)); - tolua_pushusertype(tolua_S,tolua_obj,"Vector3d"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#endif - } - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetEyePosition'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: IsOnGround of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_IsOnGround00 -static int tolua_AllToLua_cPlayer_IsOnGround00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsOnGround'", NULL); -#endif - { - bool tolua_ret = (bool) self->IsOnGround(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsOnGround'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetStance of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetStance00 -static int tolua_AllToLua_cPlayer_GetStance00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetStance'", NULL); -#endif - { - const double tolua_ret = (const double) self->GetStance(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetStance'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetInventory of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetInventory00 -static int tolua_AllToLua_cPlayer_GetInventory00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetInventory'", NULL); -#endif - { - cInventory& tolua_ret = (cInventory&) self->GetInventory(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cInventory"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetInventory'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetEquippedItem of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetEquippedItem00 -static int tolua_AllToLua_cPlayer_GetEquippedItem00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedItem'", NULL); -#endif - { - const cItem& tolua_ret = (const cItem&) self->GetEquippedItem(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetEquippedItem'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetGameMode of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetGameMode00 -static int tolua_AllToLua_cPlayer_GetGameMode00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetGameMode'", NULL); -#endif - { - eGameMode tolua_ret = (eGameMode) self->GetGameMode(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetGameMode'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SetGameMode of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_SetGameMode00 -static int tolua_AllToLua_cPlayer_SetGameMode00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); - eGameMode a_GameMode = ((eGameMode) (int) tolua_tonumber(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetGameMode'", NULL); -#endif - { - self->SetGameMode(a_GameMode); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetGameMode'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: IsGameModeCreative of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_IsGameModeCreative00 -static int tolua_AllToLua_cPlayer_IsGameModeCreative00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsGameModeCreative'", NULL); -#endif - { - bool tolua_ret = (bool) self->IsGameModeCreative(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsGameModeCreative'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: IsGameModeSurvival of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_IsGameModeSurvival00 -static int tolua_AllToLua_cPlayer_IsGameModeSurvival00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsGameModeSurvival'", NULL); -#endif - { - bool tolua_ret = (bool) self->IsGameModeSurvival(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsGameModeSurvival'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: IsGameModeAdventure of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_IsGameModeAdventure00 -static int tolua_AllToLua_cPlayer_IsGameModeAdventure00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsGameModeAdventure'", NULL); -#endif - { - bool tolua_ret = (bool) self->IsGameModeAdventure(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsGameModeAdventure'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetIP of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetIP00 -static int tolua_AllToLua_cPlayer_GetIP00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetIP'", NULL); -#endif - { - AString tolua_ret = (AString) self->GetIP(); - tolua_pushcppstring(tolua_S,(const char*)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetIP'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: MoveTo of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_MoveTo00 -static int tolua_AllToLua_cPlayer_MoveTo00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3d",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); - const Vector3d* a_NewPos = ((const Vector3d*) tolua_tousertype(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MoveTo'", NULL); -#endif - { - self->MoveTo(*a_NewPos); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'MoveTo'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetWindow of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetWindow00 -static int tolua_AllToLua_cPlayer_GetWindow00(lua_State* tolua_S) +/* method: GetWindow of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetWindow00 +static int tolua_AllToLua_cPlayer_GetWindow00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; @@ -9941,631 +8973,210 @@ static int tolua_AllToLua_cPlayer_GetSprintingMaxSpeed00(lua_State* tolua_S) if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSprintingMaxSpeed'", NULL); #endif { - double tolua_ret = (double) self->GetSprintingMaxSpeed(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetSprintingMaxSpeed'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SetNormalMaxSpeed of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_SetNormalMaxSpeed00 -static int tolua_AllToLua_cPlayer_SetNormalMaxSpeed00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); - double a_Speed = ((double) tolua_tonumber(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetNormalMaxSpeed'", NULL); -#endif - { - self->SetNormalMaxSpeed(a_Speed); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetNormalMaxSpeed'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SetSprintingMaxSpeed of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_SetSprintingMaxSpeed00 -static int tolua_AllToLua_cPlayer_SetSprintingMaxSpeed00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); - double a_Speed = ((double) tolua_tonumber(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSprintingMaxSpeed'", NULL); -#endif - { - self->SetSprintingMaxSpeed(a_Speed); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetSprintingMaxSpeed'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SetCrouch of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_SetCrouch00 -static int tolua_AllToLua_cPlayer_SetCrouch00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || - !tolua_isboolean(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); - bool a_IsCrouched = ((bool) tolua_toboolean(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCrouch'", NULL); -#endif - { - self->SetCrouch(a_IsCrouched); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetCrouch'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SetSprint of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_SetSprint00 -static int tolua_AllToLua_cPlayer_SetSprint00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || - !tolua_isboolean(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); - bool a_IsSprinting = ((bool) tolua_toboolean(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSprint'", NULL); -#endif - { - self->SetSprint(a_IsSprinting); + double tolua_ret = (double) self->GetSprintingMaxSpeed(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetSprint'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetSprintingMaxSpeed'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsSwimming of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_IsSwimming00 -static int tolua_AllToLua_cPlayer_IsSwimming00(lua_State* tolua_S) +/* method: SetNormalMaxSpeed of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_SetNormalMaxSpeed00 +static int tolua_AllToLua_cPlayer_SetNormalMaxSpeed00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); + cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); + double a_Speed = ((double) tolua_tonumber(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsSwimming'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetNormalMaxSpeed'", NULL); #endif { - bool tolua_ret = (bool) self->IsSwimming(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->SetNormalMaxSpeed(a_Speed); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsSwimming'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetNormalMaxSpeed'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsSubmerged of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_IsSubmerged00 -static int tolua_AllToLua_cPlayer_IsSubmerged00(lua_State* tolua_S) +/* method: SetSprintingMaxSpeed of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_SetSprintingMaxSpeed00 +static int tolua_AllToLua_cPlayer_SetSprintingMaxSpeed00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); + cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); + double a_Speed = ((double) tolua_tonumber(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsSubmerged'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSprintingMaxSpeed'", NULL); #endif { - bool tolua_ret = (bool) self->IsSubmerged(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->SetSprintingMaxSpeed(a_Speed); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsSubmerged'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetSprintingMaxSpeed'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE - class Lua__cPlayer : public cPlayer, public ToluaBase { -public: - void MoveTo( const Vector3d& a_NewPos) { - if (push_method("MoveTo", tolua_AllToLua_cPlayer_MoveTo00)) { - tolua_pushusertype(lua_state, (void*)&a_NewPos, "const Vector3d"); - ToluaBase::dbcall(lua_state, 2, 0); - } else { - return ( void ) cPlayer:: MoveTo(a_NewPos); - }; - }; - bool IsSwimming( void )const { - if (push_method("IsSwimming", tolua_AllToLua_cPlayer_IsSwimming00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPlayer:: IsSwimming(); - }; - }; - bool IsSubmerged( void )const { - if (push_method("IsSubmerged", tolua_AllToLua_cPlayer_IsSubmerged00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPlayer:: IsSubmerged(); - }; - }; - bool IsA( const char* a_ClassName)const { - if (push_method("IsA", tolua_AllToLua_cEntity_IsA00)) { - tolua_pushstring(lua_state, (const char*)a_ClassName); - ToluaBase::dbcall(lua_state, 2, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPlayer:: IsA(a_ClassName); - }; - }; - const char* GetClass( void )const { - if (push_method("GetClass", tolua_AllToLua_cEntity_GetClass00)) { - ToluaBase::dbcall(lua_state, 1, 1); - const char* tolua_ret = ( const char* )tolua_tostring(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( const char* ) cPlayer:: GetClass(); - }; - }; - const char* GetParentClass( void )const { - if (push_method("GetParentClass", tolua_AllToLua_cEntity_GetParentClass00)) { - ToluaBase::dbcall(lua_state, 1, 1); - const char* tolua_ret = ( const char* )tolua_tostring(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( const char* ) cPlayer:: GetParentClass(); - }; - }; - int GetRawDamageAgainst( const cEntity& a_Receiver) { - if (push_method("GetRawDamageAgainst", tolua_AllToLua_cEntity_GetRawDamageAgainst00)) { - tolua_pushusertype(lua_state, (void*)&a_Receiver, "const cEntity"); - ToluaBase::dbcall(lua_state, 2, 1); - int tolua_ret = ( int )tolua_tonumber(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( int ) cPlayer:: GetRawDamageAgainst(a_Receiver); - }; - }; - int GetArmorCoverAgainst( const cEntity* a_Attacker, eDamageType a_DamageType, int a_RawDamage) { - if (push_method("GetArmorCoverAgainst", tolua_AllToLua_cEntity_GetArmorCoverAgainst00)) { - tolua_pushusertype(lua_state, (void*)a_Attacker, "const cEntity"); - tolua_pushnumber(lua_state, (lua_Number)a_DamageType); - tolua_pushnumber(lua_state, (lua_Number)a_RawDamage); - ToluaBase::dbcall(lua_state, 4, 1); - int tolua_ret = ( int )tolua_tonumber(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( int ) cPlayer:: GetArmorCoverAgainst(a_Attacker,a_DamageType,a_RawDamage); - }; - }; - double GetKnockbackAmountAgainst( const cEntity& a_Receiver) { - if (push_method("GetKnockbackAmountAgainst", tolua_AllToLua_cEntity_GetKnockbackAmountAgainst00)) { - tolua_pushusertype(lua_state, (void*)&a_Receiver, "const cEntity"); - ToluaBase::dbcall(lua_state, 2, 1); - double tolua_ret = ( double )tolua_tonumber(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( double ) cPlayer:: GetKnockbackAmountAgainst(a_Receiver); - }; - }; - cItem GetEquippedWeapon( void )const { - if (push_method("GetEquippedWeapon", tolua_AllToLua_cEntity_GetEquippedWeapon00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cPlayer:: GetEquippedWeapon(); - }; - }; - cItem GetEquippedHelmet( void )const { - if (push_method("GetEquippedHelmet", tolua_AllToLua_cEntity_GetEquippedHelmet00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cPlayer:: GetEquippedHelmet(); - }; - }; - cItem GetEquippedChestplate( void )const { - if (push_method("GetEquippedChestplate", tolua_AllToLua_cEntity_GetEquippedChestplate00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cPlayer:: GetEquippedChestplate(); - }; - }; - cItem GetEquippedLeggings( void )const { - if (push_method("GetEquippedLeggings", tolua_AllToLua_cEntity_GetEquippedLeggings00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cPlayer:: GetEquippedLeggings(); - }; - }; - cItem GetEquippedBoots( void )const { - if (push_method("GetEquippedBoots", tolua_AllToLua_cEntity_GetEquippedBoots00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cPlayer:: GetEquippedBoots(); - }; - }; - void KilledBy( cEntity* a_Killer) { - if (push_method("KilledBy", tolua_AllToLua_cEntity_KilledBy00)) { - tolua_pushusertype(lua_state, (void*)a_Killer, "cEntity"); - ToluaBase::dbcall(lua_state, 2, 0); - } else { - return ( void ) cPlayer:: KilledBy(a_Killer); - }; - }; - void TeleportToEntity( cEntity& a_Entity) { - if (push_method("TeleportToEntity", tolua_AllToLua_cEntity_TeleportToEntity00)) { - tolua_pushusertype(lua_state, (void*)&a_Entity, "cEntity"); - ToluaBase::dbcall(lua_state, 2, 0); - } else { - return ( void ) cPlayer:: TeleportToEntity(a_Entity); - }; - }; - void TeleportToCoords( double a_PosX, double a_PosY, double a_PosZ) { - if (push_method("TeleportToCoords", tolua_AllToLua_cEntity_TeleportToCoords00)) { - tolua_pushnumber(lua_state, (lua_Number)a_PosX); - tolua_pushnumber(lua_state, (lua_Number)a_PosY); - tolua_pushnumber(lua_state, (lua_Number)a_PosZ); - ToluaBase::dbcall(lua_state, 4, 0); - } else { - return ( void ) cPlayer:: TeleportToCoords(a_PosX,a_PosY,a_PosZ); - }; - }; - bool IsOnFire( void )const { - if (push_method("IsOnFire", tolua_AllToLua_cEntity_IsOnFire00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPlayer:: IsOnFire(); - }; - }; - bool IsCrouched( void )const { - if (push_method("IsCrouched", tolua_AllToLua_cEntity_IsCrouched00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPlayer:: IsCrouched(); - }; - }; - bool IsRiding( void )const { - if (push_method("IsRiding", tolua_AllToLua_cEntity_IsRiding00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPlayer:: IsRiding(); - }; - }; - bool IsSprinting( void )const { - if (push_method("IsSprinting", tolua_AllToLua_cEntity_IsSprinting00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPlayer:: IsSprinting(); - }; - }; - bool IsRclking( void )const { - if (push_method("IsRclking", tolua_AllToLua_cEntity_IsRclking00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPlayer:: IsRclking(); - }; - }; - - void cPlayer__MoveTo( const Vector3d& a_NewPos) { - return ( void )cPlayer::MoveTo(a_NewPos); - }; - bool cPlayer__IsSwimming( void ) { - return ( bool )cPlayer::IsSwimming(); - }; - bool cPlayer__IsSubmerged( void ) { - return ( bool )cPlayer::IsSubmerged(); - }; - bool cPlayer__IsA( const char* a_ClassName) { - return ( bool )cPlayer::IsA(a_ClassName); - }; - const char* cPlayer__GetClass( void ) { - return ( const char* )cPlayer::GetClass(); - }; - const char* cPlayer__GetParentClass( void ) { - return ( const char* )cPlayer::GetParentClass(); - }; - int cPlayer__GetRawDamageAgainst( const cEntity& a_Receiver) { - return ( int )cPlayer::GetRawDamageAgainst(a_Receiver); - }; - int cPlayer__GetArmorCoverAgainst( const cEntity* a_Attacker, eDamageType a_DamageType, int a_RawDamage) { - return ( int )cPlayer::GetArmorCoverAgainst(a_Attacker,a_DamageType,a_RawDamage); - }; - double cPlayer__GetKnockbackAmountAgainst( const cEntity& a_Receiver) { - return ( double )cPlayer::GetKnockbackAmountAgainst(a_Receiver); - }; - cItem cPlayer__GetEquippedWeapon( void ) { - return ( cItem )cPlayer::GetEquippedWeapon(); - }; - cItem cPlayer__GetEquippedHelmet( void ) { - return ( cItem )cPlayer::GetEquippedHelmet(); - }; - cItem cPlayer__GetEquippedChestplate( void ) { - return ( cItem )cPlayer::GetEquippedChestplate(); - }; - cItem cPlayer__GetEquippedLeggings( void ) { - return ( cItem )cPlayer::GetEquippedLeggings(); - }; - cItem cPlayer__GetEquippedBoots( void ) { - return ( cItem )cPlayer::GetEquippedBoots(); - }; - void cPlayer__KilledBy( cEntity* a_Killer) { - return ( void )cPlayer::KilledBy(a_Killer); - }; - void cPlayer__TeleportToEntity( cEntity& a_Entity) { - return ( void )cPlayer::TeleportToEntity(a_Entity); - }; - void cPlayer__TeleportToCoords( double a_PosX, double a_PosY, double a_PosZ) { - return ( void )cPlayer::TeleportToCoords(a_PosX,a_PosY,a_PosZ); - }; - bool cPlayer__IsOnFire( void ) { - return ( bool )cPlayer::IsOnFire(); - }; - bool cPlayer__IsCrouched( void ) { - return ( bool )cPlayer::IsCrouched(); - }; - bool cPlayer__IsRiding( void ) { - return ( bool )cPlayer::IsRiding(); - }; - bool cPlayer__IsSprinting( void ) { - return ( bool )cPlayer::IsSprinting(); - }; - bool cPlayer__IsRclking( void ) { - return ( bool )cPlayer::IsRclking(); - }; -}; - -/* method: tolua__set_instance of class Lua__cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cPlayer_tolua__set_instance00 -static int tolua_AllToLua_Lua__cPlayer_tolua__set_instance00(lua_State* tolua_S) +/* method: SetCrouch of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_SetCrouch00 +static int tolua_AllToLua_cPlayer_SetCrouch00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cPlayer",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || + !tolua_isboolean(tolua_S,2,0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cPlayer* self = (Lua__cPlayer*) tolua_tousertype(tolua_S,1,0); - lua_State* L = tolua_S; - lua_Object lo = ((lua_Object) tolua_tovalue(tolua_S,2,0)); + cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); + bool a_IsCrouched = ((bool) tolua_toboolean(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'tolua__set_instance'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCrouch'", NULL); #endif { - self->tolua__set_instance(L,lo); + self->SetCrouch(a_IsCrouched); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'tolua__set_instance'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetCrouch'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cPlayer__MoveTo of class Lua__cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cPlayer_cPlayer__MoveTo00 -static int tolua_AllToLua_Lua__cPlayer_cPlayer__MoveTo00(lua_State* tolua_S) +/* method: SetSprint of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_SetSprint00 +static int tolua_AllToLua_cPlayer_SetSprint00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cPlayer",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3d",0,&tolua_err)) || + !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || + !tolua_isboolean(tolua_S,2,0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cPlayer* self = (Lua__cPlayer*) tolua_tousertype(tolua_S,1,0); - const Vector3d* a_NewPos = ((const Vector3d*) tolua_tousertype(tolua_S,2,0)); + cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); + bool a_IsSprinting = ((bool) tolua_toboolean(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cPlayer__MoveTo'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSprint'", NULL); #endif { - self->cPlayer__MoveTo(*a_NewPos); + self->SetSprint(a_IsSprinting); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cPlayer__MoveTo'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetSprint'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cPlayer__IsSwimming of class Lua__cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cPlayer_cPlayer__IsSwimming00 -static int tolua_AllToLua_Lua__cPlayer_cPlayer__IsSwimming00(lua_State* tolua_S) +/* method: IsSwimming of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_IsSwimming00 +static int tolua_AllToLua_cPlayer_IsSwimming00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cPlayer",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cPlayer* self = (Lua__cPlayer*) tolua_tousertype(tolua_S,1,0); + const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cPlayer__IsSwimming'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsSwimming'", NULL); #endif { - bool tolua_ret = (bool) self->cPlayer__IsSwimming(); + bool tolua_ret = (bool) self->IsSwimming(); tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cPlayer__IsSwimming'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsSwimming'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: cPlayer__IsSubmerged of class Lua__cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cPlayer_cPlayer__IsSubmerged00 -static int tolua_AllToLua_Lua__cPlayer_cPlayer__IsSubmerged00(lua_State* tolua_S) +/* method: IsSubmerged of class cPlayer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_IsSubmerged00 +static int tolua_AllToLua_cPlayer_IsSubmerged00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"Lua__cPlayer",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - Lua__cPlayer* self = (Lua__cPlayer*) tolua_tousertype(tolua_S,1,0); + const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cPlayer__IsSubmerged'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsSubmerged'", NULL); #endif { - bool tolua_ret = (bool) self->cPlayer__IsSubmerged(); + bool tolua_ret = (bool) self->IsSubmerged(); tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cPlayer__IsSubmerged'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsSubmerged'.",&tolua_err); return 0; #endif } @@ -19236,77 +17847,6 @@ static int tolua_AllToLua_cWebPlugin_SafeString00(lua_State* tolua_S) return 0; #endif } -#endif //#ifndef TOLUA_DISABLE - - class Lua__cWebPlugin : public cWebPlugin, public ToluaBase { -public: - const AString GetWebTitle( void )const { - if (push_method("GetWebTitle", tolua_AllToLua_cWebPlugin_GetWebTitle00)) { - ToluaBase::dbcall(lua_state, 1, 1); - const AString tolua_ret = ( const AString )tolua_tocppstring(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - if (lua_state) - LOG("pure-virtual method cWebPlugin::GetWebTitle not implemented."); - else { - LOG("pure-virtual method cWebPlugin::GetWebTitle called with no lua_state. Aborting"); - ::abort(); - }; - return ( const AString )0; - }; - }; - AString HandleWebRequest( const HTTPRequest* a_Request) { - if (push_method("HandleWebRequest", tolua_AllToLua_cWebPlugin_HandleWebRequest00)) { - tolua_pushusertype(lua_state, (void*)a_Request, "const HTTPRequest"); - ToluaBase::dbcall(lua_state, 2, 1); - AString tolua_ret = ( AString )tolua_tocppstring(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - if (lua_state) - LOG("pure-virtual method cWebPlugin::HandleWebRequest not implemented."); - else { - LOG("pure-virtual method cWebPlugin::HandleWebRequest called with no lua_state. Aborting"); - ::abort(); - }; - return ( AString )0; - }; - }; - -}; - -/* method: tolua__set_instance of class Lua__cWebPlugin */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cWebPlugin_tolua__set_instance00 -static int tolua_AllToLua_Lua__cWebPlugin_tolua__set_instance00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"Lua__cWebPlugin",0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - Lua__cWebPlugin* self = (Lua__cWebPlugin*) tolua_tousertype(tolua_S,1,0); - lua_State* L = tolua_S; - lua_Object lo = ((lua_Object) tolua_tovalue(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'tolua__set_instance'", NULL); -#endif - { - self->tolua__set_instance(L,lo); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'tolua__set_instance'.",&tolua_err); - return 0; -#endif -} #endif //#ifndef TOLUA_DISABLE /* method: new of class cPickup */ @@ -19460,439 +18000,6 @@ static int tolua_AllToLua_cPickup_CollectedBy00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE - class Lua__cPickup : public cPickup, public ToluaBase { -public: - bool CollectedBy( cPlayer* a_Dest) { - if (push_method("CollectedBy", tolua_AllToLua_cPickup_CollectedBy00)) { - tolua_pushusertype(lua_state, (void*)a_Dest, "cPlayer"); - ToluaBase::dbcall(lua_state, 2, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPickup:: CollectedBy(a_Dest); - }; - }; - bool IsA( const char* a_ClassName)const { - if (push_method("IsA", tolua_AllToLua_cEntity_IsA00)) { - tolua_pushstring(lua_state, (const char*)a_ClassName); - ToluaBase::dbcall(lua_state, 2, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPickup:: IsA(a_ClassName); - }; - }; - const char* GetClass( void )const { - if (push_method("GetClass", tolua_AllToLua_cEntity_GetClass00)) { - ToluaBase::dbcall(lua_state, 1, 1); - const char* tolua_ret = ( const char* )tolua_tostring(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( const char* ) cPickup:: GetClass(); - }; - }; - const char* GetParentClass( void )const { - if (push_method("GetParentClass", tolua_AllToLua_cEntity_GetParentClass00)) { - ToluaBase::dbcall(lua_state, 1, 1); - const char* tolua_ret = ( const char* )tolua_tostring(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( const char* ) cPickup:: GetParentClass(); - }; - }; - int GetRawDamageAgainst( const cEntity& a_Receiver) { - if (push_method("GetRawDamageAgainst", tolua_AllToLua_cEntity_GetRawDamageAgainst00)) { - tolua_pushusertype(lua_state, (void*)&a_Receiver, "const cEntity"); - ToluaBase::dbcall(lua_state, 2, 1); - int tolua_ret = ( int )tolua_tonumber(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( int ) cPickup:: GetRawDamageAgainst(a_Receiver); - }; - }; - int GetArmorCoverAgainst( const cEntity* a_Attacker, eDamageType a_DamageType, int a_RawDamage) { - if (push_method("GetArmorCoverAgainst", tolua_AllToLua_cEntity_GetArmorCoverAgainst00)) { - tolua_pushusertype(lua_state, (void*)a_Attacker, "const cEntity"); - tolua_pushnumber(lua_state, (lua_Number)a_DamageType); - tolua_pushnumber(lua_state, (lua_Number)a_RawDamage); - ToluaBase::dbcall(lua_state, 4, 1); - int tolua_ret = ( int )tolua_tonumber(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( int ) cPickup:: GetArmorCoverAgainst(a_Attacker,a_DamageType,a_RawDamage); - }; - }; - double GetKnockbackAmountAgainst( const cEntity& a_Receiver) { - if (push_method("GetKnockbackAmountAgainst", tolua_AllToLua_cEntity_GetKnockbackAmountAgainst00)) { - tolua_pushusertype(lua_state, (void*)&a_Receiver, "const cEntity"); - ToluaBase::dbcall(lua_state, 2, 1); - double tolua_ret = ( double )tolua_tonumber(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( double ) cPickup:: GetKnockbackAmountAgainst(a_Receiver); - }; - }; - cItem GetEquippedWeapon( void )const { - if (push_method("GetEquippedWeapon", tolua_AllToLua_cEntity_GetEquippedWeapon00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cPickup:: GetEquippedWeapon(); - }; - }; - cItem GetEquippedHelmet( void )const { - if (push_method("GetEquippedHelmet", tolua_AllToLua_cEntity_GetEquippedHelmet00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cPickup:: GetEquippedHelmet(); - }; - }; - cItem GetEquippedChestplate( void )const { - if (push_method("GetEquippedChestplate", tolua_AllToLua_cEntity_GetEquippedChestplate00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cPickup:: GetEquippedChestplate(); - }; - }; - cItem GetEquippedLeggings( void )const { - if (push_method("GetEquippedLeggings", tolua_AllToLua_cEntity_GetEquippedLeggings00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cPickup:: GetEquippedLeggings(); - }; - }; - cItem GetEquippedBoots( void )const { - if (push_method("GetEquippedBoots", tolua_AllToLua_cEntity_GetEquippedBoots00)) { - ToluaBase::dbcall(lua_state, 1, 1); - cItem tolua_ret = ( cItem )*(cItem*)tolua_tousertype(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( cItem ) cPickup:: GetEquippedBoots(); - }; - }; - void KilledBy( cEntity* a_Killer) { - if (push_method("KilledBy", tolua_AllToLua_cEntity_KilledBy00)) { - tolua_pushusertype(lua_state, (void*)a_Killer, "cEntity"); - ToluaBase::dbcall(lua_state, 2, 0); - } else { - return ( void ) cPickup:: KilledBy(a_Killer); - }; - }; - void TeleportToEntity( cEntity& a_Entity) { - if (push_method("TeleportToEntity", tolua_AllToLua_cEntity_TeleportToEntity00)) { - tolua_pushusertype(lua_state, (void*)&a_Entity, "cEntity"); - ToluaBase::dbcall(lua_state, 2, 0); - } else { - return ( void ) cPickup:: TeleportToEntity(a_Entity); - }; - }; - void TeleportToCoords( double a_PosX, double a_PosY, double a_PosZ) { - if (push_method("TeleportToCoords", tolua_AllToLua_cEntity_TeleportToCoords00)) { - tolua_pushnumber(lua_state, (lua_Number)a_PosX); - tolua_pushnumber(lua_state, (lua_Number)a_PosY); - tolua_pushnumber(lua_state, (lua_Number)a_PosZ); - ToluaBase::dbcall(lua_state, 4, 0); - } else { - return ( void ) cPickup:: TeleportToCoords(a_PosX,a_PosY,a_PosZ); - }; - }; - bool IsOnFire( void )const { - if (push_method("IsOnFire", tolua_AllToLua_cEntity_IsOnFire00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPickup:: IsOnFire(); - }; - }; - bool IsCrouched( void )const { - if (push_method("IsCrouched", tolua_AllToLua_cEntity_IsCrouched00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPickup:: IsCrouched(); - }; - }; - bool IsRiding( void )const { - if (push_method("IsRiding", tolua_AllToLua_cEntity_IsRiding00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPickup:: IsRiding(); - }; - }; - bool IsSprinting( void )const { - if (push_method("IsSprinting", tolua_AllToLua_cEntity_IsSprinting00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPickup:: IsSprinting(); - }; - }; - bool IsRclking( void )const { - if (push_method("IsRclking", tolua_AllToLua_cEntity_IsRclking00)) { - ToluaBase::dbcall(lua_state, 1, 1); - bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0); - lua_pop(lua_state, 1); - return tolua_ret; - } else { - return ( bool ) cPickup:: IsRclking(); - }; - }; - - bool cPickup__CollectedBy( cPlayer* a_Dest) { - return ( bool )cPickup::CollectedBy(a_Dest); - }; - bool cPickup__IsA( const char* a_ClassName) { - return ( bool )cPickup::IsA(a_ClassName); - }; - const char* cPickup__GetClass( void ) { - return ( const char* )cPickup::GetClass(); - }; - const char* cPickup__GetParentClass( void ) { - return ( const char* )cPickup::GetParentClass(); - }; - int cPickup__GetRawDamageAgainst( const cEntity& a_Receiver) { - return ( int )cPickup::GetRawDamageAgainst(a_Receiver); - }; - int cPickup__GetArmorCoverAgainst( const cEntity* a_Attacker, eDamageType a_DamageType, int a_RawDamage) { - return ( int )cPickup::GetArmorCoverAgainst(a_Attacker,a_DamageType,a_RawDamage); - }; - double cPickup__GetKnockbackAmountAgainst( const cEntity& a_Receiver) { - return ( double )cPickup::GetKnockbackAmountAgainst(a_Receiver); - }; - cItem cPickup__GetEquippedWeapon( void ) { - return ( cItem )cPickup::GetEquippedWeapon(); - }; - cItem cPickup__GetEquippedHelmet( void ) { - return ( cItem )cPickup::GetEquippedHelmet(); - }; - cItem cPickup__GetEquippedChestplate( void ) { - return ( cItem )cPickup::GetEquippedChestplate(); - }; - cItem cPickup__GetEquippedLeggings( void ) { - return ( cItem )cPickup::GetEquippedLeggings(); - }; - cItem cPickup__GetEquippedBoots( void ) { - return ( cItem )cPickup::GetEquippedBoots(); - }; - void cPickup__KilledBy( cEntity* a_Killer) { - return ( void )cPickup::KilledBy(a_Killer); - }; - void cPickup__TeleportToEntity( cEntity& a_Entity) { - return ( void )cPickup::TeleportToEntity(a_Entity); - }; - void cPickup__TeleportToCoords( double a_PosX, double a_PosY, double a_PosZ) { - return ( void )cPickup::TeleportToCoords(a_PosX,a_PosY,a_PosZ); - }; - bool cPickup__IsOnFire( void ) { - return ( bool )cPickup::IsOnFire(); - }; - bool cPickup__IsCrouched( void ) { - return ( bool )cPickup::IsCrouched(); - }; - bool cPickup__IsRiding( void ) { - return ( bool )cPickup::IsRiding(); - }; - bool cPickup__IsSprinting( void ) { - return ( bool )cPickup::IsSprinting(); - }; - bool cPickup__IsRclking( void ) { - return ( bool )cPickup::IsRclking(); - }; - Lua__cPickup( int a_MicroPosX, int a_MicroPosY, int a_MicroPosZ, const cItem& a_Item, float a_SpeedX = 0.f, float a_SpeedY = 0.f, float a_SpeedZ = 0.f): cPickup(a_MicroPosX,a_MicroPosY,a_MicroPosZ,a_Item,a_SpeedX,a_SpeedY,a_SpeedZ){}; -}; - -/* method: tolua__set_instance of class Lua__cPickup */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cPickup_tolua__set_instance00 -static int tolua_AllToLua_Lua__cPickup_tolua__set_instance00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"Lua__cPickup",0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - Lua__cPickup* self = (Lua__cPickup*) tolua_tousertype(tolua_S,1,0); - lua_State* L = tolua_S; - lua_Object lo = ((lua_Object) tolua_tovalue(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'tolua__set_instance'", NULL); -#endif - { - self->tolua__set_instance(L,lo); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'tolua__set_instance'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: cPickup__CollectedBy of class Lua__cPickup */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cPickup_cPickup__CollectedBy00 -static int tolua_AllToLua_Lua__cPickup_cPickup__CollectedBy00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"Lua__cPickup",0,&tolua_err) || - !tolua_isusertype(tolua_S,2,"cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - Lua__cPickup* self = (Lua__cPickup*) tolua_tousertype(tolua_S,1,0); - cPlayer* a_Dest = ((cPlayer*) tolua_tousertype(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cPickup__CollectedBy'", NULL); -#endif - { - bool tolua_ret = (bool) self->cPickup__CollectedBy(a_Dest); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'cPickup__CollectedBy'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new of class Lua__cPickup */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cPickup_new00 -static int tolua_AllToLua_Lua__cPickup_new00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"Lua__cPickup",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"cItem",0,&tolua_err)) || - !tolua_isnumber(tolua_S,6,1,&tolua_err) || - !tolua_isnumber(tolua_S,7,1,&tolua_err) || - !tolua_isnumber(tolua_S,8,1,&tolua_err) || - !tolua_isnoobj(tolua_S,9,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int a_MicroPosX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_MicroPosY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_MicroPosZ = ((int) tolua_tonumber(tolua_S,4,0)); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,5,0)); - float a_SpeedX = ((float) tolua_tonumber(tolua_S,6,0.f)); - float a_SpeedY = ((float) tolua_tonumber(tolua_S,7,0.f)); - float a_SpeedZ = ((float) tolua_tonumber(tolua_S,8,0.f)); - { - Lua__cPickup* tolua_ret = (Lua__cPickup*) Mtolua_new((Lua__cPickup)(a_MicroPosX,a_MicroPosY,a_MicroPosZ,*a_Item,a_SpeedX,a_SpeedY,a_SpeedZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"Lua__cPickup"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new_local of class Lua__cPickup */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cPickup_new00_local -static int tolua_AllToLua_Lua__cPickup_new00_local(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"Lua__cPickup",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"cItem",0,&tolua_err)) || - !tolua_isnumber(tolua_S,6,1,&tolua_err) || - !tolua_isnumber(tolua_S,7,1,&tolua_err) || - !tolua_isnumber(tolua_S,8,1,&tolua_err) || - !tolua_isnoobj(tolua_S,9,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int a_MicroPosX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_MicroPosY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_MicroPosZ = ((int) tolua_tonumber(tolua_S,4,0)); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,5,0)); - float a_SpeedX = ((float) tolua_tonumber(tolua_S,6,0.f)); - float a_SpeedY = ((float) tolua_tonumber(tolua_S,7,0.f)); - float a_SpeedZ = ((float) tolua_tonumber(tolua_S,8,0.f)); - { - Lua__cPickup* tolua_ret = (Lua__cPickup*) Mtolua_new((Lua__cPickup)(a_MicroPosX,a_MicroPosY,a_MicroPosZ,*a_Item,a_SpeedX,a_SpeedY,a_SpeedZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"Lua__cPickup"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - - -/* function to release collected object via destructor */ -#ifdef __cplusplus - -static int tolua_collect_Lua__cPickup (lua_State* tolua_S) -{ - Lua__cPickup* self = (Lua__cPickup*) tolua_tousertype(tolua_S,1,0); - delete self; - return 0; -} -#endif - /* get function: m_PrimaryServerVersion of class cRoot */ #ifndef TOLUA_DISABLE_tolua_get_cRoot_m_PrimaryServerVersion static int tolua_get_cRoot_m_PrimaryServerVersion(lua_State* tolua_S) @@ -29603,29 +27710,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"IsSprinting",tolua_AllToLua_cEntity_IsSprinting00); tolua_function(tolua_S,"IsRclking",tolua_AllToLua_cEntity_IsRclking00); tolua_endmodule(tolua_S); - tolua_cclass(tolua_S,"Lua__cEntity","Lua__cEntity","cEntity",NULL); - tolua_beginmodule(tolua_S,"Lua__cEntity"); - tolua_function(tolua_S,"tolua__set_instance",tolua_AllToLua_Lua__cEntity_tolua__set_instance00); - tolua_function(tolua_S,"cEntity__IsA",tolua_AllToLua_Lua__cEntity_cEntity__IsA00); - tolua_function(tolua_S,"cEntity__GetClass",tolua_AllToLua_Lua__cEntity_cEntity__GetClass00); - tolua_function(tolua_S,"cEntity__GetParentClass",tolua_AllToLua_Lua__cEntity_cEntity__GetParentClass00); - tolua_function(tolua_S,"cEntity__GetRawDamageAgainst",tolua_AllToLua_Lua__cEntity_cEntity__GetRawDamageAgainst00); - tolua_function(tolua_S,"cEntity__GetArmorCoverAgainst",tolua_AllToLua_Lua__cEntity_cEntity__GetArmorCoverAgainst00); - tolua_function(tolua_S,"cEntity__GetKnockbackAmountAgainst",tolua_AllToLua_Lua__cEntity_cEntity__GetKnockbackAmountAgainst00); - tolua_function(tolua_S,"cEntity__GetEquippedWeapon",tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedWeapon00); - tolua_function(tolua_S,"cEntity__GetEquippedHelmet",tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedHelmet00); - tolua_function(tolua_S,"cEntity__GetEquippedChestplate",tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedChestplate00); - tolua_function(tolua_S,"cEntity__GetEquippedLeggings",tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedLeggings00); - tolua_function(tolua_S,"cEntity__GetEquippedBoots",tolua_AllToLua_Lua__cEntity_cEntity__GetEquippedBoots00); - tolua_function(tolua_S,"cEntity__KilledBy",tolua_AllToLua_Lua__cEntity_cEntity__KilledBy00); - tolua_function(tolua_S,"cEntity__TeleportToEntity",tolua_AllToLua_Lua__cEntity_cEntity__TeleportToEntity00); - tolua_function(tolua_S,"cEntity__TeleportToCoords",tolua_AllToLua_Lua__cEntity_cEntity__TeleportToCoords00); - tolua_function(tolua_S,"cEntity__IsOnFire",tolua_AllToLua_Lua__cEntity_cEntity__IsOnFire00); - tolua_function(tolua_S,"cEntity__IsCrouched",tolua_AllToLua_Lua__cEntity_cEntity__IsCrouched00); - tolua_function(tolua_S,"cEntity__IsRiding",tolua_AllToLua_Lua__cEntity_cEntity__IsRiding00); - tolua_function(tolua_S,"cEntity__IsSprinting",tolua_AllToLua_Lua__cEntity_cEntity__IsSprinting00); - tolua_function(tolua_S,"cEntity__IsRclking",tolua_AllToLua_Lua__cEntity_cEntity__IsRclking00); - tolua_endmodule(tolua_S); tolua_cclass(tolua_S,"cPawn","cPawn","cEntity",NULL); tolua_beginmodule(tolua_S,"cPawn"); tolua_endmodule(tolua_S); @@ -29695,13 +27779,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"IsSwimming",tolua_AllToLua_cPlayer_IsSwimming00); tolua_function(tolua_S,"IsSubmerged",tolua_AllToLua_cPlayer_IsSubmerged00); tolua_endmodule(tolua_S); - tolua_cclass(tolua_S,"Lua__cPlayer","Lua__cPlayer","cPlayer",NULL); - tolua_beginmodule(tolua_S,"Lua__cPlayer"); - tolua_function(tolua_S,"tolua__set_instance",tolua_AllToLua_Lua__cPlayer_tolua__set_instance00); - tolua_function(tolua_S,"cPlayer__MoveTo",tolua_AllToLua_Lua__cPlayer_cPlayer__MoveTo00); - tolua_function(tolua_S,"cPlayer__IsSwimming",tolua_AllToLua_Lua__cPlayer_cPlayer__IsSwimming00); - tolua_function(tolua_S,"cPlayer__IsSubmerged",tolua_AllToLua_Lua__cPlayer_cPlayer__IsSubmerged00); - tolua_endmodule(tolua_S); tolua_cclass(tolua_S,"cPluginManager","cPluginManager","",NULL); tolua_beginmodule(tolua_S,"cPluginManager"); tolua_constant(tolua_S,"HOOK_BLOCK_TO_PICKUPS",cPluginManager::HOOK_BLOCK_TO_PICKUPS); @@ -30163,10 +28240,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"HandleWebRequest",tolua_AllToLua_cWebPlugin_HandleWebRequest00); tolua_function(tolua_S,"SafeString",tolua_AllToLua_cWebPlugin_SafeString00); tolua_endmodule(tolua_S); - tolua_cclass(tolua_S,"Lua__cWebPlugin","Lua__cWebPlugin","cWebPlugin",NULL); - tolua_beginmodule(tolua_S,"Lua__cWebPlugin"); - tolua_function(tolua_S,"tolua__set_instance",tolua_AllToLua_Lua__cWebPlugin_tolua__set_instance00); - tolua_endmodule(tolua_S); #ifdef __cplusplus tolua_cclass(tolua_S,"cPickup","cPickup","cEntity",tolua_collect_cPickup); #else @@ -30179,18 +28252,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"GetItem",tolua_AllToLua_cPickup_GetItem00); tolua_function(tolua_S,"CollectedBy",tolua_AllToLua_cPickup_CollectedBy00); tolua_endmodule(tolua_S); - #ifdef __cplusplus - tolua_cclass(tolua_S,"Lua__cPickup","Lua__cPickup","cPickup",tolua_collect_Lua__cPickup); - #else - tolua_cclass(tolua_S,"Lua__cPickup","Lua__cPickup","cPickup",NULL); - #endif - tolua_beginmodule(tolua_S,"Lua__cPickup"); - tolua_function(tolua_S,"tolua__set_instance",tolua_AllToLua_Lua__cPickup_tolua__set_instance00); - tolua_function(tolua_S,"cPickup__CollectedBy",tolua_AllToLua_Lua__cPickup_cPickup__CollectedBy00); - tolua_function(tolua_S,"new",tolua_AllToLua_Lua__cPickup_new00); - tolua_function(tolua_S,"new_local",tolua_AllToLua_Lua__cPickup_new00_local); - tolua_function(tolua_S,".call",tolua_AllToLua_Lua__cPickup_new00_local); - tolua_endmodule(tolua_S); tolua_cclass(tolua_S,"cRoot","cRoot","",NULL); tolua_beginmodule(tolua_S,"cRoot"); tolua_variable(tolua_S,"m_PrimaryServerVersion",tolua_get_cRoot_m_PrimaryServerVersion,tolua_set_cRoot_m_PrimaryServerVersion); diff --git a/source/Bindings.h b/source/Bindings.h index fdc3f39d9..55baed803 100644 --- a/source/Bindings.h +++ b/source/Bindings.h @@ -1,6 +1,6 @@ /* ** Lua binding: AllToLua -** Generated automatically by tolua++-1.0.92 on 08/17/13 23:54:30. +** Generated automatically by tolua++-1.0.92 on 08/18/13 10:47:31. */ /* Exported function */ diff --git a/source/virtual_method_hooks.lua b/source/virtual_method_hooks.lua index b6cbe8268..15ff1d7f8 100644 --- a/source/virtual_method_hooks.lua +++ b/source/virtual_method_hooks.lua @@ -1,5 +1,5 @@ -- flags -local disable_virtual_hooks = false +local disable_virtual_hooks = true local enable_pure_virtual = true local default_private_access = false -- cgit v1.2.3