remove GasDump
This commit is contained in:
parent
e1b05b6dee
commit
9e52d8f763
@ -56,7 +56,6 @@ enum GasMode_e
|
||||
GasInactive = 0,
|
||||
GasWaiting = 1,
|
||||
GasMoving = 2,
|
||||
GasJump = 3
|
||||
};
|
||||
|
||||
enum ActionType_e
|
||||
|
@ -10,13 +10,6 @@ cs::SMUpdate* FrameMaker::MakeUpdateMsg(const Human* hum)
|
||||
cs::SMUpdate* msg = new cs::SMUpdate;
|
||||
{
|
||||
Room* room = hum->room;
|
||||
#if 0
|
||||
if (room->gas_data.gas_mode == GasJump) {
|
||||
cs::MFPlane* p = msg->mutable_plane();
|
||||
TypeConvert::ToPb(room->plane.start_point, p->mutable_start_point());
|
||||
TypeConvert::ToPb(room->plane.end_point, p->mutable_end_point());
|
||||
}
|
||||
#endif
|
||||
for (auto& itr : hum->new_objects) {
|
||||
#ifdef DEBUG
|
||||
if (hum->del_objects.find(itr->GetEntityUniId()) != hum->del_objects.end()) {
|
||||
@ -27,17 +20,10 @@ cs::SMUpdate* FrameMaker::MakeUpdateMsg(const Human* hum)
|
||||
}
|
||||
for (auto& itr : hum->part_objects) {
|
||||
Entity* entity = itr;
|
||||
if (entity->IsDead(room) && hum->room->GetFrameNo() - entity->GetDeadFrameNo(room) > 10) {
|
||||
if (entity->IsDead(room) &&
|
||||
hum->room->GetFrameNo() - entity->GetDeadFrameNo(room) > 10) {
|
||||
continue;
|
||||
} else {
|
||||
#if 0
|
||||
if (room->gas_data.gas_mode == GasJump &&
|
||||
entity != hum &&
|
||||
entity->entity_type == ET_Player &&
|
||||
a8::HasBitFlag(((Human*)entity)->status, HS_Fly)) {
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
entity->FillMFObjectPart(room, msg->add_part_objects());
|
||||
}
|
||||
|
@ -274,12 +274,7 @@ long long Human::GetDeadFrameNo(Room* room)
|
||||
|
||||
void Human::FillMFTeamData(cs::MFTeamData* team_data)
|
||||
{
|
||||
#if 1
|
||||
{
|
||||
#else
|
||||
if (room->GetGasData().gas_mode == GasJump ||
|
||||
room->GetFrameNo() - last_sync_teamdata_frameno_ > SERVER_FRAME_RATE * 2) {
|
||||
#endif
|
||||
last_sync_teamdata_frameno_ = room->GetFrameNo();
|
||||
team_data->set_player_id(GetEntityUniId());
|
||||
team_data->set_name(name);
|
||||
@ -1332,8 +1327,6 @@ void Human::FillMFGasData(cs::MFGasData* gas_data)
|
||||
long long duration = room->GetGasInactiveTime() * SERVER_FRAME_RATE -
|
||||
(room->GetFrameNo() - room->GetGasData().gas_start_frameno);
|
||||
gas_data->set_duration(std::max(duration * 50, (long long)1000) / 1000);
|
||||
} else if (room->GetGasData().gas_mode == GasJump) {
|
||||
gas_data->set_duration(0);
|
||||
} else if (room->GetGasData().gas_mode == GasMoving) {
|
||||
if (room->GetGasData().new_area_meta->i->shrink_speed() > 0.01f) {
|
||||
long long duration = (room->GetGasData().old_area_meta->i->rad() - room->GetGasData().new_area_meta->i->rad()) /
|
||||
|
@ -296,8 +296,7 @@ void Player::UpdateUseItemId()
|
||||
|
||||
void Player::UpdateSpectate()
|
||||
{
|
||||
if (room->GetGasData().gas_mode == GasInactive ||
|
||||
room->GetGasData().gas_mode == GasJump) {
|
||||
if (room->GetGasData().gas_mode == GasInactive) {
|
||||
spectate = false;
|
||||
return;
|
||||
}
|
||||
|
@ -768,9 +768,6 @@ void Room::UpdateGas()
|
||||
case GasInactive:
|
||||
UpdateGasInactive();
|
||||
break;
|
||||
case GasJump:
|
||||
abort();
|
||||
break;
|
||||
case GasWaiting:
|
||||
UpdateGasWaiting();
|
||||
break;
|
||||
@ -778,7 +775,7 @@ void Room::UpdateGas()
|
||||
UpdateGasMoving();
|
||||
break;
|
||||
}
|
||||
if (gas_data_.gas_mode != GasInactive && gas_data_.gas_mode != GasJump) {
|
||||
if (gas_data_.gas_mode != GasInactive) {
|
||||
if (!IsGameOver() && alive_count_ <= MAX_TEAM_NUM && GetAliveTeamNum() <= 1) {
|
||||
game_over_ = true;
|
||||
game_over_frameno_ = GetFrameNo();
|
||||
|
Loading…
x
Reference in New Issue
Block a user