1
This commit is contained in:
parent
d4a8e500c9
commit
e7fca225b6
@ -238,15 +238,25 @@ void Human::FillMFTeamData(cs::MFTeamData* team_data)
|
||||
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);
|
||||
if (room->gas_data.gas_mode == GasInactive) {
|
||||
team_data->set_name(name);
|
||||
}
|
||||
if (room->gas_data.gas_mode != GasInactive &&
|
||||
room->GetFrameNo() - room->GetBattleStartFrameNo() < 4) {
|
||||
team_data->set_name(name);
|
||||
team_data->set_disconnected(socket_handle == 0);
|
||||
}
|
||||
TypeConvert::ToPb(pos, team_data->mutable_pos());
|
||||
TypeConvert::ToPb(attack_dir, team_data->mutable_dir());
|
||||
team_data->set_health(health);
|
||||
team_data->set_max_health(GetMaxHP());
|
||||
team_data->set_disconnected(false);
|
||||
team_data->set_dead(dead);
|
||||
team_data->set_downed(downed);
|
||||
#if 0
|
||||
team_data->set_disconnected(false);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,6 +57,7 @@ public:
|
||||
int GetPlayerNum();
|
||||
int AliveCount();
|
||||
long long AliveCountChgFrameNo() { return alive_count_chged_frameno_; }
|
||||
long long GetBattleStartFrameNo() { return battle_start_frameno_;}
|
||||
Player* GetPlayerByAccountId(const std::string& accountid);
|
||||
Player* GetPlayerByUniId(int uniid);
|
||||
Entity* GetEntityByUniId(int uniid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user