remove unuse code
This commit is contained in:
parent
511044816d
commit
5f58b93274
@ -50,8 +50,5 @@ void Hero::FillMFObjectFull(cs::MFObjectFull* full_data)
|
||||
TypeConvert::ToPb(attack_dir, p->mutable_dir());
|
||||
|
||||
skin.ToPB(p->mutable_skin());
|
||||
p->set_backpack(backpack);
|
||||
p->set_helmet(helmet);
|
||||
p->set_chest(chest);
|
||||
weapon.ToPB(p->mutable_weapon());
|
||||
}
|
||||
|
@ -16,9 +16,6 @@ class Hero : public Entity
|
||||
Human* master = nullptr;
|
||||
|
||||
Tank skin;
|
||||
int backpack = 0;
|
||||
int helmet = 0;
|
||||
int chest = 0;
|
||||
Weapon weapon;
|
||||
|
||||
Hero();
|
||||
|
@ -122,9 +122,6 @@ void Human::FillMFObjectFull(cs::MFObjectFull* full_data)
|
||||
#endif
|
||||
p->set_disconnected(disconnected);
|
||||
tank_.ToPB(p->mutable_skin());
|
||||
p->set_backpack(backpack);
|
||||
p->set_helmet(helmet);
|
||||
p->set_chest(chest);
|
||||
if (tankskin.skin_id != 0) {
|
||||
tankskin.ToPB(p->mutable_tankskin());
|
||||
}
|
||||
@ -708,9 +705,6 @@ void Human::FillMFActivePlayerData(cs::MFActivePlayerData* player_data)
|
||||
}
|
||||
}
|
||||
tank_.ToPB(player_data->mutable_skin());
|
||||
player_data->set_backpack(backpack);
|
||||
player_data->set_helmet(helmet);
|
||||
player_data->set_chest(chest);
|
||||
player_data->set_health(GetHP());
|
||||
player_data->set_max_health(GetMaxHP());
|
||||
player_data->set_cur_weapon_idx(curr_weapon->weapon_idx);
|
||||
@ -765,12 +759,6 @@ bool Human::CanSee(const Human* hum) const
|
||||
|
||||
void Human::RecalcVolume()
|
||||
{
|
||||
MetaData::Equip* backpack_meta = MetaMgr::Instance()->GetEquip(backpack);
|
||||
if (backpack_meta) {
|
||||
for (size_t i = 0; i < backpack_meta->volume.size(); ++i) {
|
||||
volume_[i] = meta->volume[i] + backpack_meta->volume[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int Human::GetInventory(int slot_id)
|
||||
@ -815,39 +803,6 @@ void Human::RecoverHp(int inc_hp)
|
||||
}
|
||||
}
|
||||
|
||||
void Human::SummonHero()
|
||||
{
|
||||
#if 0
|
||||
Hero* hero = room->CreateHero(this);
|
||||
if (hero) {
|
||||
summon_hero_frameno_ = room->frame_no;
|
||||
a8::SetBitFlag(status, HS_SummonHero);
|
||||
room->xtimer.AddDeadLineTimerAndAttach(skill_meta->last_time * SERVER_FRAME_RATE,
|
||||
a8::XParams()
|
||||
.SetSender(this)
|
||||
.SetParam1(hero->entity_uniid),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
},
|
||||
&skill_xtimer_attacher_.timer_list_,
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Human* hum = (Human*)param.sender.GetUserData();
|
||||
Entity* hero = hum->room->GetEntityByUniId(param.param1);
|
||||
if (hero && hero->entity_type == ET_Hero) {
|
||||
hum->room->RemoveObjectLater(hero);
|
||||
}
|
||||
a8::UnSetBitFlag(hum->status, HS_SummonHero);
|
||||
hum->need_sync_active_player = true;
|
||||
hum->BroadcastFullState();
|
||||
}
|
||||
);
|
||||
need_sync_active_player = true;
|
||||
BroadcastFullState();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Human::AddObserver(Human* observer)
|
||||
{
|
||||
observers_.insert(observer);
|
||||
|
@ -39,8 +39,6 @@ class Human : public Entity
|
||||
std::string team_uuid;
|
||||
int account_registertime = 0;
|
||||
MetaData::Player* meta = nullptr;
|
||||
MetaData::Equip* helmet_meta = nullptr;
|
||||
MetaData::Equip* chest_meta = nullptr;
|
||||
MetaData::Tank* tank_meta = nullptr;
|
||||
MetaData::Skill* skill_meta = nullptr;
|
||||
MetaData::Driver* driver_meta = nullptr;
|
||||
@ -64,11 +62,6 @@ class Human : public Entity
|
||||
int action_target_id = 0;
|
||||
TankSkin tankskin;
|
||||
Driver driver;
|
||||
int backpack = 0;
|
||||
int helmet = 0;
|
||||
int chest = 0;
|
||||
int vip = 0;
|
||||
int sdmg = 0;
|
||||
int lethal_weapon = 0;
|
||||
long long dead_frameno = 0;
|
||||
long long join_frameno = 0;
|
||||
@ -160,7 +153,6 @@ class Human : public Entity
|
||||
void DecInventory(int slot_id, int num);
|
||||
int GetVolume(int slot_id);
|
||||
void RecoverHp(int inc_hp);
|
||||
void SummonHero();
|
||||
void AddObserver(Human* observer);
|
||||
void RemoveObserver(Human* observer);
|
||||
void SendUpdateMsg();
|
||||
@ -220,13 +212,6 @@ private:
|
||||
protected:
|
||||
long long last_shot_frameno_ = 0;
|
||||
long long last_use_skill_frameno_ = 0;
|
||||
long long hide_frameno_ = 0;
|
||||
long long accelerate_frameno_ = 0;
|
||||
long long damageadd_frameno_ = 0;
|
||||
long long defadd_frameno_ = 0;
|
||||
long long recover_hp_frameno_ = 0;
|
||||
long long reflect_damage_frameno_ = 0;
|
||||
long long summon_hero_frameno_ = 0;
|
||||
a8::XTimerAttacher skill_xtimer_attacher_;
|
||||
bool leave_ = false;
|
||||
long long leave_frameno_ = 0;
|
||||
|
@ -501,9 +501,6 @@ Hero* Room::CreateHero(Human* hum)
|
||||
hero->attack_dir = hum->attack_dir;
|
||||
hero->master = hum;
|
||||
hero->skin = hum->GetTank();
|
||||
hero->backpack = hum->backpack;
|
||||
hero->helmet = hum->helmet;
|
||||
hero->chest = hum->chest;
|
||||
hero->weapon = *hum->curr_weapon;
|
||||
hero->Initialize();
|
||||
#if 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user