1
This commit is contained in:
parent
51611facf3
commit
e1f73dd40a
@ -14,11 +14,11 @@ endif()
|
||||
set(LIB_DIR "ubuntu20.04_g++-9")
|
||||
message(LIB_DIR: ${LIB_DIR} )
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -std=gnu++1z -DGAME_ID=${GAME_ID} -DNDEBUG -DMAP3D -DDT_VIRTUAL_QUERYFILTER -DNEW_WEAPON_SYS=1 -DNEWBIE_ROOM=1")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -std=gnu++1z -DGAME_ID=${GAME_ID} -DNDEBUG -DMAP3D -DDT_VIRTUAL_QUERYFILTER -DNEW_WEAPON_SYS=1 -DNEWBIE_ROOM=1 -DNEW_BT")
|
||||
if (${ASAN})
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++1z -DGAME_ID=${GAME_ID} -DDEBUG -DCXY -DSXY -DMAP3D -DDT_VIRTUAL_QUERYFILTER -DNEW_WEAPON_SYS=1 -DNEWBIE_ROOM=1 -fsanitize=address -fno-omit-frame-pointer")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++1z -DGAME_ID=${GAME_ID} -DDEBUG -DCXY -DSXY -DMAP3D -DDT_VIRTUAL_QUERYFILTER -DNEW_WEAPON_SYS=1 -DNEWBIE_ROOM=1 -DNEW_BT -fsanitize=address -fno-omit-frame-pointer")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++1z -DGAME_ID=${GAME_ID} -DDEBUG -DCXY -DSXY -DMAP3D -DDT_VIRTUAL_QUERYFILTER -DNEW_WEAPON_SYS=1 -DNEWBIE_ROOM=1")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++1z -DGAME_ID=${GAME_ID} -DDEBUG -DCXY -DSXY -DMAP3D -DDT_VIRTUAL_QUERYFILTER -DNEW_WEAPON_SYS=1 -DNEWBIE_ROOM=1 -DNEW_BT")
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
|
@ -52,6 +52,7 @@ namespace mtb
|
||||
float damage_ratio() const { return damage_ratio_; };
|
||||
float defence_ratio() const { return defence_ratio_; };
|
||||
const std::string bt() const { return bt_; };
|
||||
const std::string new_bt() const { return new_bt_; };
|
||||
|
||||
bool has_id() const { return __flags__.test(0);};
|
||||
bool has_radius() const { return __flags__.test(1);};
|
||||
@ -95,6 +96,7 @@ namespace mtb
|
||||
bool has_defence_ratio() const { return __flags__.test(39);};
|
||||
bool has_bt() const { return __flags__.test(40);};
|
||||
bool has_drop() const { return __flags__.test(41);};
|
||||
bool has_new_bt() const { return __flags__.test(42);};
|
||||
|
||||
protected:
|
||||
|
||||
@ -140,9 +142,10 @@ namespace mtb
|
||||
float defence_ratio_ = 0.0f;
|
||||
std::string bt_;
|
||||
std::string drop_;
|
||||
std::string new_bt_;
|
||||
|
||||
public:
|
||||
std::bitset<42> __flags__;
|
||||
std::bitset<43> __flags__;
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -312,7 +312,7 @@ namespace mtb
|
||||
{
|
||||
a8::reflect::Class* meta_class = nullptr;
|
||||
if (!meta_class) {
|
||||
meta_class = new a8::reflect::Class("Hero", 42, 0);
|
||||
meta_class = new a8::reflect::Class("Hero", 43, 0);
|
||||
meta_class->SetSimpleField(0, "id", a8::reflect::ET_INT32, my_offsetof2(Hero, id_));
|
||||
meta_class->SetSimpleField(1, "radius", a8::reflect::ET_FLOAT, my_offsetof2(Hero, radius_));
|
||||
meta_class->SetSimpleField(2, "move_speed", a8::reflect::ET_FLOAT, my_offsetof2(Hero, move_speed_));
|
||||
@ -355,6 +355,7 @@ namespace mtb
|
||||
meta_class->SetSimpleField(39, "defence_ratio", a8::reflect::ET_FLOAT, my_offsetof2(Hero, defence_ratio_));
|
||||
meta_class->SetSimpleField(40, "bt", a8::reflect::ET_STRING, my_offsetof2(Hero, bt_));
|
||||
meta_class->SetSimpleField(41, "drop", a8::reflect::ET_STRING, my_offsetof2(Hero, drop_));
|
||||
meta_class->SetSimpleField(42, "new_bt", a8::reflect::ET_STRING, my_offsetof2(Hero, new_bt_));
|
||||
}
|
||||
return meta_class;
|
||||
}
|
||||
|
@ -285,6 +285,7 @@ message Hero
|
||||
optional string bt = 70;
|
||||
|
||||
optional string drop = 71;
|
||||
optional string new_bt = 72;
|
||||
}
|
||||
|
||||
message Robot
|
||||
|
Loading…
x
Reference in New Issue
Block a user