From 0e523546f97f56acf73ec19481f5c0b624701c01 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 19 May 2020 11:25:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E9=A3=9E=E6=9C=BA=E3=80=81?= =?UTF-8?q?=E8=B7=B3=E4=BC=9E=E3=80=81human=20status=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/gameserver/android.ai.cc | 7 -- server/gameserver/android.cc | 2 + server/gameserver/framemaker.cc | 9 +- server/gameserver/human.cc | 113 +------------------------ server/gameserver/human.h | 11 +-- server/gameserver/player.cc | 97 +++++---------------- server/gameserver/player.h | 3 - server/gameserver/playermgr.cc | 2 + server/gameserver/room.cc | 109 ------------------------ server/gameserver/room.h | 4 - server/gameserver/types.h | 8 -- server/tools/protobuild/cs_proto.proto | 2 +- 12 files changed, 37 insertions(+), 330 deletions(-) diff --git a/server/gameserver/android.ai.cc b/server/gameserver/android.ai.cc index 03005cc..ad1d543 100644 --- a/server/gameserver/android.ai.cc +++ b/server/gameserver/android.ai.cc @@ -102,9 +102,6 @@ void AndroidAI::DoMove() if (hum->room->waiting_start) { return; } - if (a8::HasBitFlag(hum->status, HS_Fly)) { - return; - } if (owner->updated_times % 2 == 0) { Human* hum = (Human*)owner; int speed = std::max(1, (int)hum->GetSpeed()); @@ -129,10 +126,6 @@ void AndroidAI::DoAttack() if (hum->room->waiting_start) { return; } - if (a8::HasBitFlag(hum->status, HS_Fly) || - a8::HasBitFlag(hum->status, HS_Jump)) { - return; - } if (hum->room->gas_data.gas_mode == GasInactive) { return; } diff --git a/server/gameserver/android.cc b/server/gameserver/android.cc index 8a2c71e..45257ba 100644 --- a/server/gameserver/android.cc +++ b/server/gameserver/android.cc @@ -36,10 +36,12 @@ void Android::Initialize() void Android::Update(int delta_time) { + #if 0 if (a8::HasBitFlag(status, HS_Fly)) { SetPos(room->plane.curr_pos); room->grid_service.MoveHuman(this); } + #endif if (action_type != AT_None) { UpdateAction(); } diff --git a/server/gameserver/framemaker.cc b/server/gameserver/framemaker.cc index 7086d47..7643747 100644 --- a/server/gameserver/framemaker.cc +++ b/server/gameserver/framemaker.cc @@ -10,17 +10,22 @@ 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) { +#if 0 if (itr != hum && itr->entity_type == ET_Player && - a8::HasBitFlag(((Human*)itr)->status, HS_Fly)) { + a8::HasBitFlag(((Human*) + ) { continue; } +#endif itr->FillMFObjectFull(msg->add_full_objects()); } for (auto& itr : hum->part_objects) { @@ -28,12 +33,14 @@ cs::SMUpdate* FrameMaker::MakeUpdateMsg(const Human* hum) if (entity->dead && hum->room->frame_no - entity->dead_frameno > 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(msg->add_part_objects()); } diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 0982a34..862230e 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -78,9 +78,7 @@ void Human::Initialize() float Human::GetSpeed() { - if (a8::HasBitFlag(status, HS_Jump)) { - return meta->i->jump_speed(); - } if (downed) { + if (downed) { return meta->i->move_speed3(); } else { if (shot_hold) { @@ -400,7 +398,7 @@ void Human::TankShot(a8::Vec2& target_dir) } bullet_dir.Rotate(bullet_angle / 180.0f); room->frame_event.AddBullet(this, bullet_born_pos, bullet_dir, fly_distance); - if (room->BattleStarted() || (room->gas_data.gas_mode == GasJump && !a8::HasBitFlag(status, HS_Jump))) { + if (room->BattleStarted()) { room->CreateBullet(this, &tank_weapon, bullet_born_pos, bullet_dir, fly_distance, true); } } @@ -431,10 +429,6 @@ bool Human::IsCollisionInMapService() return true; } - if (a8::HasBitFlag(status, HS_Jump)) { - return false; - } - std::set colliders; room->map_service.GetColliders(GetX(), GetY(), colliders); @@ -459,9 +453,7 @@ bool Human::IsCollisionInMapService() if (!obstacle->dead && obstacle->meta->i->attack_type() == 1 && obstacle->meta->i->drop() != 0 && - room->gas_data.gas_mode != GasInactive && - !a8::HasBitFlag(status, HS_Fly) && - !a8::HasBitFlag(status, HS_Jump) + room->gas_data.gas_mode != GasInactive ) { obstacle->health = 0; obstacle->dead = obstacle->health <= 0.01f; @@ -1019,44 +1011,6 @@ bool Human::HasNoDownedTeammate() return false; } -void Human::Land() -{ - a8::UnSetBitFlag(status, HS_Jump); - if (App::Instance()->HasFlag(8)) { - MetaData::Equip* weapon_meta = MetaMgr::Instance()->GetEquip(a8::RandEx(12103, 12122)); - if (weapon_meta) { - weapons[GUN_SLOT1].weapon_idx = GUN_SLOT1; - weapons[GUN_SLOT1].weapon_id = weapon_meta->i->id(); - weapons[GUN_SLOT1].weapon_lv = 1; - weapons[GUN_SLOT1].ammo = 0; - weapons[GUN_SLOT1].meta = weapon_meta; - weapons[GUN_SLOT1].Recalc(); - curr_weapon = &weapons[GUN_SLOT1]; - } - } - FindLocation(); - SyncAroundPlayers(__FILE__, __LINE__, __func__); -} - -void Human::DoJump() -{ - if (a8::HasBitFlag(status, HS_Fly)) { - a8::UnSetBitFlag(status, HS_Fly); - a8::SetBitFlag(status, HS_Jump); - jump_frameno = room->frame_no; - SyncAroundPlayers(__FILE__, __LINE__, __func__); - room->xtimer.AddDeadLineTimerAndAttach(MetaMgr::Instance()->jump_time * SERVER_FRAME_RATE, - a8::XParams() - .SetSender(this), - [] (const a8::XParams& param) - { - Human* hum = (Human*)param.sender.GetUserData(); - hum->Land(); - }, - &xtimer_attacher.timer_list_); - } -} - bool Human::CanUseSkill() { if (downed) { @@ -1440,67 +1394,6 @@ void Human::FillBodyState(::google::protobuf::RepeatedPtrField<::cs::MFBodyState state->set_left_time(left_time); state->set_lasting_time(anodyne_max_time * 1000); } - if (a8::HasBitFlag(status, HS_Fly)) { - cs::MFBodyState* state = states->Add(); - state->set_state_type(2); - } - if (a8::HasBitFlag(status, HS_Jump)) { - int passed_time = (room->frame_no - jump_frameno) * FRAME_RATE_MS; - cs::MFBodyState* state = states->Add(); - state->set_state_type(3); - state->set_left_time(std::max(0, MetaMgr::Instance()->jump_time * 1000 - passed_time)); - state->set_lasting_time(MetaMgr::Instance()->jump_time * 1000); - } - #if 0 - if (a8::HasBitFlag(status, HS_Hide) && skill_meta) { - int passed_time = (room->frame_no - hide_frameno_) * FRAME_RATE_MS; - cs::MFBodyState* state = states->Add(); - state->set_state_type(HS_Hide); - state->set_left_time(std::max(0, skill_meta->last_time * 1000 - passed_time)); - state->set_lasting_time(skill_meta->last_time * 1000); - } - if (a8::HasBitFlag(status, HS_Accelerate) && skill_meta) { - int passed_time = (room->frame_no - accelerate_frameno_) * FRAME_RATE_MS; - cs::MFBodyState* state = states->Add(); - state->set_state_type(HS_Accelerate); - state->set_left_time(std::max(0, skill_meta->last_time * 1000 - passed_time)); - state->set_lasting_time(skill_meta->last_time * 1000); - } - if (a8::HasBitFlag(status, HS_DamageAdd) && skill_meta) { - int passed_time = (room->frame_no - damageadd_frameno_) * FRAME_RATE_MS; - cs::MFBodyState* state = states->Add(); - state->set_state_type(HS_DamageAdd); - state->set_left_time(std::max(0, skill_meta->last_time * 1000 - passed_time)); - state->set_lasting_time(skill_meta->last_time * 1000); - } - if (a8::HasBitFlag(status, HS_DefAdd) && skill_meta) { - int passed_time = (room->frame_no - defadd_frameno_) * FRAME_RATE_MS; - cs::MFBodyState* state = states->Add(); - state->set_state_type(HS_DefAdd); - state->set_left_time(std::max(0, skill_meta->last_time * 1000 - passed_time)); - state->set_lasting_time(skill_meta->last_time * 1000); - } - if (a8::HasBitFlag(status, HS_RecoverHP) && skill_meta) { - int passed_time = (room->frame_no - recover_hp_frameno_) * FRAME_RATE_MS; - cs::MFBodyState* state = states->Add(); - state->set_state_type(HS_RecoverHP); - state->set_left_time(std::max(0, skill_meta->last_time * 1000 - passed_time)); - state->set_lasting_time(skill_meta->last_time * 1000); - } - if (a8::HasBitFlag(status, HS_ReflectDamage) && skill_meta) { - int passed_time = (room->frame_no - reflect_damage_frameno_) * FRAME_RATE_MS; - cs::MFBodyState* state = states->Add(); - state->set_state_type(HS_ReflectDamage); - state->set_left_time(std::max(0, skill_meta->last_time * 1000 - passed_time)); - state->set_lasting_time(skill_meta->last_time * 1000); - } - #endif - if (a8::HasBitFlag(status, HS_AtkAdd)) { - cs::MFBodyState* state = states->Add(); - state->set_state_type(HS_AtkAdd); - state->set_left_time(999 * 1000); - state->set_lasting_time(999 * 1000); - } } void Human::FillBuffList(::google::protobuf::RepeatedPtrField<::cs::MFBuff>* pb_buff_list) diff --git a/server/gameserver/human.h b/server/gameserver/human.h index 7e74be5..66cd2d9 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -16,12 +16,7 @@ namespace MetaData enum HumanStatus { - HS_PainKiller = 1, - HS_Fly = 2, - HS_Jump = 3, - HS_AtkAdd = 11, - HS_Assaulting = 12, - HS_AlreadyLordMode = 13, + HS_AlreadyLordMode = 1, HS_End }; @@ -121,8 +116,6 @@ class Human : public Entity int series_shot_frames = 0; float fly_distance = 0.0f; - long long jump_frameno = 0; - long long send_msg_times = 0; std::map weapon_configs; @@ -175,8 +168,6 @@ class Human : public Entity void RemoveOutObjects(Entity* entity); bool HasLiveTeammate(); bool HasNoDownedTeammate(); - void Land(); - void DoJump(); bool CanUseSkill(); void DoSkill(); void DoGetDown(); diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index 7fd6985..42578f0 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -42,10 +42,12 @@ void Player::Update(int delta_time) if (poisoning) { poisoning_time += delta_time; } + #if 0 if (a8::HasBitFlag(status, HS_Fly)) { SetPos(room->plane.curr_pos); room->grid_service.MoveHuman(this); } + #endif if (moving) { UpdateMove(); } @@ -83,9 +85,6 @@ void Player::Update(int delta_time) if (emote) { UpdateEmote(); } - if (jump) { - UpdateJump(); - } if (get_down) { UpdateGetDown(); } @@ -112,8 +111,7 @@ void Player::UpdateMove() CancelAction(); } if (dead || - room->waiting_start || - a8::HasBitFlag(status, HS_Fly)) { + room->waiting_start) { moving = false; moved_frames = 0; last_collision_door = nullptr; @@ -147,9 +145,7 @@ void Player::UpdateShot() { if (dead || downed || - room->waiting_start || - a8::HasBitFlag(status, HS_Fly) || - a8::HasBitFlag(status, HS_Jump) ) { + room->waiting_start) { shot_start = false; shot_hold = false; series_shot_frames = 0; @@ -185,11 +181,6 @@ void Player::UpdateShot() void Player::UpdateSelectWeapon() { - if (a8::HasBitFlag(status, HS_Fly)) { - select_weapon = false; - selected_weapon_idx = 0; - return; - } if (selected_weapon_idx >= 0 && selected_weapon_idx < weapons.size()) { Weapon* old_weapon = curr_weapon; Weapon* weapon = &weapons[selected_weapon_idx]; @@ -292,8 +283,7 @@ void Player::UpdateUseItemId() void Player::UpdateSpectate() { if (room->gas_data.gas_mode == GasInactive || - room->gas_data.gas_mode == GasJump || - a8::HasBitFlag(status, HS_Fly)) { + room->gas_data.gas_mode == GasJump) { spectate = false; return; } @@ -303,49 +293,11 @@ void Player::UpdateSpectate() void Player::UpdateEmote() { - if (a8::HasBitFlag(status, HS_Fly)) { - emote = false; - emote_id = 0; - return; - } room->frame_event.AddEmote(this, emote_id); emote = false; emote_id = 0; } -void Player::UpdateJump() -{ - if (a8::HasBitFlag(status, HS_Fly)) { - DoJump(); - if (GetPos().Distance(room->last_player_jump_pos) > 64 * 4) { - size_t num = 2 + rand() % 2; - for (size_t i = 0; i < num; ++i){ - room->xtimer.AddDeadLineTimerAndAttach(SERVER_FRAME_RATE / 10, - a8::XParams() - .SetSender(this), - [] (const a8::XParams& param) - { - Human* hum = (Human*)param.sender.GetUserData(); - hum->room->TouchHumanList( - a8::XParams() - .SetSender(hum), - [] (Human* hum, a8::XParams& param) -> bool - { - if (a8::HasBitFlag(hum->status, HS_Fly) && hum->entity_subtype != EST_Player) { - hum->DoJump(); - return false; - } - return true; - }); - }, - &xtimer_attacher.timer_list_); - } - } - room->last_player_jump_pos = GetPos(); - } - jump = false; -} - void Player::UpdateGetDown() { DoGetDown(); @@ -420,7 +372,7 @@ void Player::Shot() bullet_born_pos.y += MetaMgr::Instance()->horse_shoot_y; } room->frame_event.AddBullet(this, bullet_born_pos, bullet_dir, fly_distance); - if (room->BattleStarted() || (room->gas_data.gas_mode == GasJump && !a8::HasBitFlag(status, HS_Jump))) { + if (room->BattleStarted()) { room->CreateBullet(this, curr_weapon, bullet_born_pos, bullet_dir, fly_distance); } } @@ -490,10 +442,6 @@ void Player::Shot() void Player::ProcInteraction() { - if (a8::HasBitFlag(status, HS_Fly)) { - interaction_objids.Clear(); - return; - } for (auto obj_id : interaction_objids) { Entity* entity = room->GetEntityByUniId(obj_id); if (entity) { @@ -933,22 +881,20 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg) } } assert(!isnan(move_dir.x) && !isnan(move_dir.y)); - if (!a8::HasBitFlag(status, HS_Fly)) { - if (msg.has_attack_dir()) { - if (std::isfinite(msg.attack_dir().x()) && - std::isfinite(msg.attack_dir().y()) && - ( - std::abs(msg.attack_dir().x()) > 0.00001f || - std::abs(msg.attack_dir().y()) > 0.00001f - ) - ){ - TypeConvert::FromPb(attack_dir, &msg.attack_dir()); - attack_dir.Normalize(); - } - } else { - if (moving) { - attack_dir = move_dir; - } + if (msg.has_attack_dir()) { + if (std::isfinite(msg.attack_dir().x()) && + std::isfinite(msg.attack_dir().y()) && + ( + std::abs(msg.attack_dir().x()) > 0.00001f || + std::abs(msg.attack_dir().y()) > 0.00001f + ) + ){ + TypeConvert::FromPb(attack_dir, &msg.attack_dir()); + attack_dir.Normalize(); + } + } else { + if (moving) { + attack_dir = move_dir; } } if (moving) { @@ -997,9 +943,6 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg) emote = true; emote_id = msg.emote(); } - if (msg.has_jump()) { - jump = true; - } if (msg.has_aiming()) { aiming = msg.aiming(); } else { diff --git a/server/gameserver/player.h b/server/gameserver/player.h index db29c3f..a3a5c5b 100644 --- a/server/gameserver/player.h +++ b/server/gameserver/player.h @@ -54,8 +54,6 @@ class Player : public Human bool emote = false; int emote_id = 0; - bool jump = false; - bool use_skill = false; bool get_down = false; @@ -77,7 +75,6 @@ class Player : public Human void UpdateUseItemId(); void UpdateSpectate(); void UpdateEmote(); - void UpdateJump(); void UpdateGetDown(); void UpdateUseSkill(); void Shot(); diff --git a/server/gameserver/playermgr.cc b/server/gameserver/playermgr.cc index 6271456..5a3bdec 100644 --- a/server/gameserver/playermgr.cc +++ b/server/gameserver/playermgr.cc @@ -65,10 +65,12 @@ Player* PlayerMgr::CreatePlayerByCMJoin(long ip_saddr, int socket, const cs::CMJ hum->emoji2 = msg.emoji2(); hum->parachute = msg.parachute(); hum->has_pass = msg.has_pass(); + #if 0 if (hum->atk_add > 0.9999f) { hum->atk_add = hum->atk_add / 100.0f; a8::SetBitFlag(hum->status, HS_AtkAdd); } + #endif for (auto& weapon : msg.weapons()) { if (weapon.weapon_id() != 0 && weapon.weapon_lv() > 0) { hum->weapon_configs[weapon.weapon_id()] = weapon.weapon_lv(); diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index f5b822c..bdc207d 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -889,9 +889,6 @@ void Room::UpdateGas() case GasInactive: UpdateGasInactive(); break; - case GasJump: - UpdateGasJump(); - break; case GasWaiting: UpdateGasWaiting(); break; @@ -933,7 +930,6 @@ void Room::UpdateGasInactive() { if (frame_no - gas_data.gas_start_frameno >= MetaMgr::Instance()->gas_inactive_time * SERVER_FRAME_RATE) { - #if 1 gas_data.gas_mode = GasWaiting; gas_data.old_area_meta = MetaMgr::Instance()->GetSafeArea(30001); gas_data.new_area_meta = MetaMgr::Instance()->GetSafeArea(30002); @@ -960,88 +956,6 @@ void Room::UpdateGasInactive() NotifyGameStart(); NotifyWxVoip(); InitAirDrop(); - #else - gas_data.gas_mode = GasJump; - gas_data.gas_start_frameno = frame_no; - if (human_hash_.size() < ROOM_MAX_PLAYER_NUM) { - CreateAndroid(ROOM_MAX_PLAYER_NUM - human_hash_.size()); - NotifyUiUpdate(); - } - CombineTeam(); - ShuaPlane(); - NotifyWxVoip(); - InitAirDrop(); - RoomMgr::Instance()->ActiveRoom(room_uuid); - int auto_jump_interval = MetaMgr::Instance()->GetSysParamAsInt("auto_jump_interval"); - auto_jump_timer_ = xtimer.AddRepeatTimerAndAttach(SERVER_FRAME_RATE * auto_jump_interval, - a8::XParams() - .SetSender(this), - [] (const a8::XParams& param) - { - Room* room = (Room*)param.sender.GetUserData(); - int auto_jump_min_num = MetaMgr::Instance()->GetSysParamAsInt("auto_jump_min_num"); - int auto_jump_max_num = MetaMgr::Instance()->GetSysParamAsInt("auto_jump_max_num"); - int jump_num = a8::RandEx(auto_jump_min_num, auto_jump_max_num); - if (room->last_player_jump_pos.Distance(room->plane.curr_pos) < 64 * 8) { - jump_num = 1 + rand() % 2; - } - for (int i = 0; i < jump_num; ++i) { - room->TouchHumanList( - a8::XParams() - .SetSender(room), - [] (Human* hum, a8::XParams& param) -> bool - { - if (a8::HasBitFlag(hum->status, HS_Fly) && hum->entity_subtype != EST_Player) { - hum->DoJump(); - return false; - } - return true; - }); - } - }, - &xtimer_attacher.timer_list_); - #endif - } -} - -void Room::UpdateGasJump() -{ - a8::Vec2 len_vec = plane.dir * - ((frame_no - gas_data.gas_start_frameno)*airline_->i->plane_speed() / SERVER_FRAME_RATE); - plane.curr_pos = plane.start_point + len_vec; - if ((plane.end_point - plane.start_point).Norm() <= len_vec.Norm()) { - TouchHumanList( - a8::XParams(), - [] (Human* hum, a8::XParams& param) -> bool - { - if (a8::HasBitFlag(hum->status, HS_Fly)) { - hum->DoJump(); - } - if (hum->entity_subtype == EST_Player) { - GameLog::Instance()->GameStart((Player*)hum); - } - return true; - }); - gas_data.gas_mode = GasWaiting; - gas_data.old_area_meta = MetaMgr::Instance()->GetSafeArea(30001); - gas_data.new_area_meta = MetaMgr::Instance()->GetSafeArea(30002); - gas_data.gas_progress = gas_data.old_area_meta->i->rad(); - gas_data.gas_start_frameno = frame_no; - gas_data.pos_old = a8::Vec2(map_meta->i->map_width() / 2.0f, - map_meta->i->map_height() / 2.0f); - gas_data.pos_old_bk = gas_data.pos_old; - { - bool gen_ok = GenSmallCircle(gas_data.pos_old, - gas_data.old_area_meta->i->rad(), - gas_data.new_area_meta->i->rad(), - gas_data.pos_new); - assert(gen_ok); - } - gas_data.rad_old = gas_data.old_area_meta->i->rad(); - gas_data.rad_new = gas_data.new_area_meta->i->rad(); - battle_start_frameno_ = frame_no; - xtimer.DeleteTimer(auto_jump_timer_); - auto_jump_timer_ = nullptr; } } @@ -1400,29 +1314,6 @@ void Room::AirDrop(int appear_time, int box_id) } } -void Room::ShuaPlane() -{ - airline_ = MetaMgr::Instance()->RandAirLine(map_meta->i->map_id()); - if (!airline_) { - abort(); - } - plane.start_point = a8::Vec2(airline_->start_point_x, airline_->start_point_y); - plane.end_point = a8::Vec2(airline_->end_point_x, airline_->end_point_y); - plane.dir = plane.end_point - plane.start_point; - plane.dir.Normalize(); - plane.curr_pos = plane.start_point; - last_player_jump_pos = plane.curr_pos; - - for (auto& pair : human_hash_) { - a8::SetBitFlag(pair.second->status, HS_Fly); - pair.second->SetPos(plane.curr_pos); - pair.second->attack_dir = plane.dir; - pair.second->move_dir = plane.dir; - grid_service.MoveHuman(pair.second); - pair.second->AddToNewObjects(pair.second); - } -} - Obstacle* Room::InternalCreateObstacle(int id, float x, float y, std::function on_precreate) { diff --git a/server/gameserver/room.h b/server/gameserver/room.h index a3f4161..6e2d096 100644 --- a/server/gameserver/room.h +++ b/server/gameserver/room.h @@ -42,13 +42,11 @@ public: long long game_over_tick = 0; timer_list* game_over_timer = nullptr; a8::XTimer xtimer; - Plane plane; GridService grid_service; MapService map_service; long long battle_start_frameno_ = 0; long long pending_request = 0; long long last_debugout_tick = 0; - a8::Vec2 last_player_jump_pos; bool waiting_start = false; RoomType_e room_type = RT_NewBrid; long long last_add_player_tick = 0; @@ -110,7 +108,6 @@ private: void CreateAndroid(int android_num); void UpdateGas(); void UpdateGasInactive(); - void UpdateGasJump(); void UpdateGasWaiting(); void UpdateGasMoving(); bool GenSmallCircle(a8::Vec2 big_circle_pos, float big_circle_rad, float small_circle_rad, @@ -144,7 +141,6 @@ private: int alive_count_ = 0; MetaData::AirLine* airline_ = nullptr; a8::XTimerAttacher xtimer_attacher; - xtimer_list* auto_jump_timer_ = nullptr; int current_teamid = 0; int current_uniid = 0; diff --git a/server/gameserver/types.h b/server/gameserver/types.h index a56a942..32c9168 100755 --- a/server/gameserver/types.h +++ b/server/gameserver/types.h @@ -96,14 +96,6 @@ struct PlayerStats int use_skill_times = 0; }; -struct Plane -{ - a8::Vec2 start_point; - a8::Vec2 end_point; - a8::Vec2 dir; - a8::Vec2 curr_pos; -}; - struct CarObject { int car_id = 0; diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 6ce889a..636a81e 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -674,7 +674,7 @@ message CMJoin repeated MFPair prepare_items2 = 29; //战斗前准备道具 key:道具id value:数量 optional string session_id = 20; //session_id optional string from_appid = 21; //from_appid - optional float atk_add = 22; //攻击加成 + optional float atk_add = 22; //攻击加成,废弃!!! optional string pre_settlement_info = 23; //透传game2001api预结算信息(为了本地结算用) optional int32 emoji1 = 24; //表情1 optional int32 emoji2 = 25; //表情2