From e93f8c9bfcd85bb01d9d4b55b62be57743576e56 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 18 Jun 2021 11:25:59 +0800 Subject: [PATCH] 1 --- server/gameserver/bullet.cc | 1 - server/gameserver/constant.h | 4 ++-- server/gameserver/obstacle.cc | 5 +++++ server/gameserver/obstacle.h | 1 + server/tools/protobuild/cs_proto.proto | 2 ++ server/tools/protobuild/metatable.proto | 1 + 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/server/gameserver/bullet.cc b/server/gameserver/bullet.cc index 4779d60..0faed9d 100644 --- a/server/gameserver/bullet.cc +++ b/server/gameserver/bullet.cc @@ -398,7 +398,6 @@ void Bullet::ProcC4Bomb(int delay_time) void Bullet::ProcSignalGunBomb(int delay_time) { - printf("%d xxxxxx\n",this); if (sender.Get()) { a8::Vec2 old_buff_vec2_param1 = sender.Get()->buff_vec2_param1; sender.Get()->buff_vec2_param1 = GetPos(); diff --git a/server/gameserver/constant.h b/server/gameserver/constant.h index b381665..14ce3cc 100755 --- a/server/gameserver/constant.h +++ b/server/gameserver/constant.h @@ -89,6 +89,7 @@ enum InventorySlot_e IS_SMOKE = 6, IS_HEALTHKIT = 7, //医疗包 IS_PAIN_KILLER = 8, //止痛药 + IS_SHEN_BAO = 9, //肾上腺速 IS_1XSCOPE = 12, IS_2XSCOPE = 13, @@ -104,8 +105,7 @@ enum InventorySlot_e IS_C4 = 21, //c3 IS_SHIELD_WALL = 22, //盾墙 IS_SINGAL_GUN = 23, //信号枪 - IS_SHEN_BAO = 24, //肾上腺速 - IS_OIL_BUCKET = 25, //汽油桶 + IS_OIL_BUCKET = 24, //汽油桶 IS_MAX = 30, IS_END diff --git a/server/gameserver/obstacle.cc b/server/gameserver/obstacle.cc index 6d60253..cd23b8d 100644 --- a/server/gameserver/obstacle.cc +++ b/server/gameserver/obstacle.cc @@ -731,3 +731,8 @@ void Obstacle::ClearObstacleBuff(Creature* c) c->RemoveBuffById(buff_id); } } + +bool Obstacle::IsTouchInteraction() +{ + return meta->i->interaction_mode() == 1; +} diff --git a/server/gameserver/obstacle.h b/server/gameserver/obstacle.h index 9e9cf8f..e1e0ed2 100644 --- a/server/gameserver/obstacle.h +++ b/server/gameserver/obstacle.h @@ -67,6 +67,7 @@ class Obstacle : public Entity bool IsPermanent(); bool Attackable(); bool Throughable(); + bool IsTouchInteraction(); protected: Obstacle(); diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 472537b..54487b5 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -452,6 +452,8 @@ message MFCarFull optional float max_health = 13; //最大血量 optional int32 oil = 14; //当前油量 optional int32 max_oil = 15; //最大油量 + optional int32 bullet_num = 16; //子弹数量 + /* 乘客列表(包含驾驶员) !!!注意这里只返回客户端必要的用于显示玩家外观的信息而不是全量信息 diff --git a/server/tools/protobuild/metatable.proto b/server/tools/protobuild/metatable.proto index 9ee02f1..baf3db8 100755 --- a/server/tools/protobuild/metatable.proto +++ b/server/tools/protobuild/metatable.proto @@ -67,6 +67,7 @@ message MapThing optional string receive_special_damage_type = 23; optional string param1 = 24; optional string param2 = 25; + optional int32 interaction_mode = 26; } message SafeArea