This commit is contained in:
aozhiwei 2019-11-07 10:40:11 +08:00
parent 11ec0e68ca
commit b94ed56e88
2 changed files with 18 additions and 9 deletions

View File

@ -224,6 +224,13 @@ void Human::GetAabbBox(AabbCollider& aabb_box)
void Human::FillMFTeamData(cs::MFTeamData* team_data)
{
#if 1
{
#else
if (room->gas_data.gas_mode == GasJump ||
room->frame_no - last_sync_teamdata_frameno_ > SERVER_FRAME_RATE * 2) {
#endif
last_sync_teamdata_frameno_ = room->frame_no;
team_data->set_player_id(entity_uniid);
team_data->set_name(name);
TypeConvert::ToPb(pos, team_data->mutable_pos());
@ -234,6 +241,7 @@ void Human::FillMFTeamData(cs::MFTeamData* team_data)
team_data->set_dead(dead);
team_data->set_downed(downed);
}
}
void Human::Shot(a8::Vec2& target_dir)
{

View File

@ -241,6 +241,7 @@ protected:
long long recover_hp_frameno_ = 0;
long long reflect_damage_frameno_ = 0;
long long summon_hero_frameno_ = 0;
long long last_sync_teamdata_frameno_ = 0;
a8::XTimerAttacher skill_xtimer_attacher_;
bool leave_ = false;
long long leave_frameno_ = 0;