From 8eb6737d436a1d7d07afd8335e70e1cba65bea8a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 30 Sep 2022 10:10:21 +0800 Subject: [PATCH] 1 --- server/gameserver/constant.h | 2 -- server/gameserver/creature.cc | 6 +++--- server/tools/protobuild/metatable.proto | 2 ++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/gameserver/constant.h b/server/gameserver/constant.h index 040ea611..5d86a5be 100644 --- a/server/gameserver/constant.h +++ b/server/gameserver/constant.h @@ -560,5 +560,3 @@ const int MAP_BLOCK_START_ID = 1000000000; const int ANDROID_AI_ID_START = 10001; const int MAX_SKILL_LV = 15; - -const int DOUBLE_GUN_ANIMATION = 4; diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index b6214478..6a796509 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -153,7 +153,7 @@ static void CalcGunMuzzlePosition(Creature* c, int bulletNum) { if (shot_animi) { - if (weapon_meta->i->shootfire() == DOUBLE_GUN_ANIMATION && + if (weapon_meta->i->double_gun()&& bulletIdx > (int)(bulletNum / 2)) { gun_muzzle_position += glm::vec4( @@ -163,7 +163,7 @@ static void CalcGunMuzzlePosition(Creature* c, 0 ); } else { - if (c->IsCar() && weapon_meta->i->shootfire() != DOUBLE_GUN_ANIMATION) { + if (c->IsCar() && !weapon_meta->i->double_gun()) { switch (c->shot_hole) { case 1: { @@ -377,7 +377,7 @@ void InternalShot(Creature* c, skill_meta->GetMagicId() == MAGIC_HJHX)) { bullet_info->trace_target_uniid = c->GetSkillTargetId(); } - if (weapon_meta->i->shootfire() == DOUBLE_GUN_ANIMATION && + if (weapon_meta->i->double_gun() && bulletIdx > (int)(bulletNum / 2)) { bullet_info->hand = 1; } diff --git a/server/tools/protobuild/metatable.proto b/server/tools/protobuild/metatable.proto index b03dffb0..4e9e864a 100755 --- a/server/tools/protobuild/metatable.proto +++ b/server/tools/protobuild/metatable.proto @@ -201,6 +201,8 @@ message Equip optional int32 auto_trace = 76; optional int32 trace_range = 77; + + optional int32 double_gun = 78; } message EquipUpgrade