From 1aac6373a7f60db0ea56b49014cc3f751587c49b Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 23 Jul 2020 17:21:42 +0800 Subject: [PATCH] 1 --- server/gameserver/bullet.cc | 4 ++++ server/gameserver/constant.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/server/gameserver/bullet.cc b/server/gameserver/bullet.cc index 9d65c78..9a0d0e8 100644 --- a/server/gameserver/bullet.cc +++ b/server/gameserver/bullet.cc @@ -61,6 +61,10 @@ void Bullet::OnHit(std::set& objects) hum->HasBuffEffect(kBET_AdPlaying)) { continue; } + if (player->room->GetRoomMode() == kZombieMode && + player->GetRace() == hum->GetRace()) { + continue; + } if (!hum->dead && (IsBomb() || player->team_id != hum->team_id)) { float dmg = GetAtk() * (1 + player->GetBuffAttrRate(kHAT_Atk)) + player->GetBuffAttrAbs(kHAT_Atk); diff --git a/server/gameserver/constant.h b/server/gameserver/constant.h index 8e342e9..c7bb4bf 100755 --- a/server/gameserver/constant.h +++ b/server/gameserver/constant.h @@ -344,3 +344,7 @@ const int MAX_ROOM_IDX = 2018; const int VIEW_RANGE = 512; const int MAX_AI_LEVEL = 8; + +const int HUMAN_RACE_META_START_ID = 5001; +const int ZOMBIE_RACE_META_START_ID = 6001; +