From b0897f7327508156222330934fa25cc9650949e9 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 29 Jun 2019 13:59:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E8=B7=B3=E4=BC=9E=E9=80=BB?= =?UTF-8?q?=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 | 4 -- server/gameserver/human.cc | 61 +---------------- server/gameserver/human.h | 4 -- server/gameserver/metadata.cc | 16 ----- server/gameserver/metadata.h | 18 ----- server/gameserver/metamgr.cc | 31 --------- server/gameserver/metamgr.h | 3 - server/gameserver/player.cc | 96 +++++--------------------- server/gameserver/player.h | 1 - server/gameserver/room.cc | 118 -------------------------------- server/gameserver/room.h | 7 -- server/gameserver/types.h | 8 --- 13 files changed, 18 insertions(+), 356 deletions(-) diff --git a/server/gameserver/android.ai.cc b/server/gameserver/android.ai.cc index 8e5fcdd..bcd15bf 100644 --- a/server/gameserver/android.ai.cc +++ b/server/gameserver/android.ai.cc @@ -86,9 +86,6 @@ void AndroidAI::ChangeToState(AndroidState_e to_state) void AndroidAI::DoMove() { Human* hum = (Human*)owner; - 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()); @@ -110,10 +107,6 @@ void AndroidAI::DoMove() void AndroidAI::DoAttack() { Human* hum = (Human*)owner; - 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 3624ecb..a7dbde5 100644 --- a/server/gameserver/android.cc +++ b/server/gameserver/android.cc @@ -32,10 +32,6 @@ void Android::Initialize() void Android::Update(int delta_time) { - if (a8::HasBitFlag(status, HS_Fly)) { - pos = room->plane.curr_pos; - room->grid_service.MoveHuman(this); - } if (action_type != AT_None) { UpdateAction(); } diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 87fa1cd..a7eb576 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -65,9 +65,7 @@ void Human::Initialize() float Human::GetSpeed() { - if (a8::HasBitFlag(status, HS_Jump)) { - return meta->i->jump_speed() + buff.speed; - } if (downed) { + if (downed) { return meta->i->move_speed3() + buff.speed; } else { if (shot_hold) { @@ -296,10 +294,6 @@ bool Human::IsCollision() return true; } - if (a8::HasBitFlag(status, HS_Jump)) { - return false; - } - std::vector objects; for (auto& grid : grid_list) { for (Entity* entity : grid->entity_list) { @@ -338,10 +332,6 @@ bool Human::IsCollisionInMapService() return true; } - if (a8::HasBitFlag(status, HS_Jump)) { - return false; - } - std::set colliders; room->map_service.GetColliders(pos.x, pos.y, colliders); @@ -845,44 +835,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(); -} - -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(); - 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_); - } -} - void Human::DoSkill() { if (skill_meta && skill_meta->i->condition() == SC_Active) { @@ -1353,17 +1305,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 (a8::HasBitFlag(status, HS_Hide) && skill_meta) { int passed_time = (room->frame_no - hide_frameno_) * FRAME_RATE_MS; cs::MFBodyState* state = states->Add(); diff --git a/server/gameserver/human.h b/server/gameserver/human.h index a3aa4ff..0fde3f5 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -15,8 +15,6 @@ namespace MetaData enum HumanStatus { HS_PainKiller = 1, - HS_Fly = 2, - HS_Jump = 3, HS_Hide = 4, HS_Accelerate = 5, HS_DamageAdd = 6, @@ -152,8 +150,6 @@ class Human : public Entity void RemoveOutObjects(Entity* entity); bool HasLiveTeammate(); bool HasNoDownedTeammate(); - void Land(); - void DoJump(); void DoSkill(); void FindLocation(); void RefreshView(); diff --git a/server/gameserver/metadata.cc b/server/gameserver/metadata.cc index 11f8e4c..f7fb8e5 100644 --- a/server/gameserver/metadata.cc +++ b/server/gameserver/metadata.cc @@ -342,22 +342,6 @@ namespace MetaData return 0; } - void AirLine::Init() - { - { - std::vector strings; - a8::Split(i->start_point(), strings, ':'); - start_point_x = a8::XValue(strings[0]).GetDouble(); - start_point_y = a8::XValue(strings[1]).GetDouble(); - } - { - std::vector strings; - a8::Split(i->end_point(), strings, ':'); - end_point_x = a8::XValue(strings[0]).GetDouble(); - end_point_y = a8::XValue(strings[1]).GetDouble(); - } - } - void Skill::Init() { value1 = a8::XValue(i->value1()).GetDouble(); diff --git a/server/gameserver/metadata.h b/server/gameserver/metadata.h index 3e43f0d..e6af602 100755 --- a/server/gameserver/metadata.h +++ b/server/gameserver/metadata.h @@ -120,24 +120,6 @@ namespace MetaData int rand_space = 0; }; - struct AirDrop - { - const metatable::AirDrop* i = nullptr; - }; - - struct AirLine - { - const metatable::AirLine* i = nullptr; - - float start_point_x = 0.0f; - float start_point_y = 0.0f; - - float end_point_x = 0.0f; - float end_point_y = 0.0f; - - void Init(); - }; - struct Skill { const metatable::Skill* i = nullptr; diff --git a/server/gameserver/metamgr.cc b/server/gameserver/metamgr.cc index 71bc3a3..9bdbbba 100755 --- a/server/gameserver/metamgr.cc +++ b/server/gameserver/metamgr.cc @@ -29,10 +29,6 @@ public: std::list building_list; std::list drop_meta_list; std::list drop_list; - std::list airdrop_meta_list; - std::list airdrop_list; - std::list airline_meta_list; - std::vector airline_list; std::list dress_meta_list; std::list dress_list; std::list skill_meta_list; @@ -91,8 +87,6 @@ public: f8::ReadCsvMetaFile(res_path + "player@player.csv", player_meta_list); f8::ReadCsvMetaFile(res_path + "mapThing@mapThing.csv", mapthing_meta_list); f8::ReadCsvMetaFile(res_path + "drop@drop.csv", drop_meta_list); - f8::ReadCsvMetaFile(res_path + "airdrop@airdrop.csv", airdrop_meta_list); - f8::ReadCsvMetaFile(res_path + "airline@airline.csv", airline_meta_list); f8::ReadJsonMetaFile(res_path + "maps.json", building_meta_list); f8::ReadCsvMetaFile(res_path + "dress@dress.csv", dress_meta_list); f8::ReadCsvMetaFile(res_path + "skill@skill.csv", skill_meta_list); @@ -104,7 +98,6 @@ public: #if 1 { MetaMgr::Instance()->gas_inactive_time = MetaMgr::Instance()->GetSysParamAsInt("gas_inactive_time"); - MetaMgr::Instance()->jump_time = MetaMgr::Instance()->GetSysParamAsFloat("jump_time"); MetaMgr::Instance()->K = MetaMgr::Instance()->GetSysParamAsFloat("K"); MetaMgr::Instance()->kill_param = MetaMgr::Instance()->GetSysParamAsFloat("kill_parameter"); MetaMgr::Instance()->rank_param = MetaMgr::Instance()->GetSysParamAsFloat("rank_parameter"); @@ -209,17 +202,6 @@ private: drop_hash[item.i->drop_id()] = &item; } - for (auto& meta : airdrop_meta_list) { - MetaData::AirDrop& item = a8::FastAppend(airdrop_list); - item.i = &meta; - } - - for (auto& meta : airline_meta_list) { - MetaData::AirLine& item = a8::FastAppend(airline_list); - item.i = &meta; - item.Init(); - } - { for (auto& meta : building_meta_list) { MetaData::Building& item = a8::FastAppend(building_list); @@ -372,19 +354,6 @@ std::vector* MetaMgr::GetMapTplThing(std::string& map_nam return itr != loader_->maptpl_hash.end() ? &itr->second : nullptr; } -std::list& MetaMgr::GetAirDrops() -{ - return loader_->airdrop_list; -} - -MetaData::AirLine* MetaMgr::RandAirLine() -{ - if (loader_->airline_list.empty()) { - abort(); - } - return &loader_->airline_list[rand() % loader_->airline_list.size()]; -} - MetaData::Skill* MetaMgr::GetSkill(int skill_id) { auto itr = loader_->skill_hash.find(skill_id); diff --git a/server/gameserver/metamgr.h b/server/gameserver/metamgr.h index 9b3955b..2db8fef 100755 --- a/server/gameserver/metamgr.h +++ b/server/gameserver/metamgr.h @@ -29,8 +29,6 @@ class MetaMgr : public a8::Singleton MetaData::Drop* GetDrop(int drop_id); MetaData::SafeArea* GetSafeArea(int area_id); std::vector* GetMapTplThing(std::string& map_name); - std::list& GetAirDrops(); - MetaData::AirLine* RandAirLine(); MetaData::Skill* GetSkill(int skill_id); MetaData::Dress* GetDress(int dress_id); float GetRankRewardParam(int rank); @@ -39,7 +37,6 @@ class MetaMgr : public a8::Singleton MetaData::Robot* GetRobot(int robot_id); int gas_inactive_time = 10; - int jump_time = 10; float K = 100.0f; float kill_param = 0.0f; float rank_param = 0.0f; diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index 8c71159..72fa893 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -46,10 +46,6 @@ void Player::Update(int delta_time) if (poisoning) { poisoning_time += delta_time; } - if (a8::HasBitFlag(status, HS_Fly)) { - pos = room->plane.curr_pos; - room->grid_service.MoveHuman(this); - } if (moving) { UpdateMove(); } @@ -90,9 +86,6 @@ void Player::Update(int delta_time) if (emote) { UpdateEmote(); } - if (jump) { - UpdateJump(); - } if (use_skill) { UpdateUseSkill(); } @@ -104,7 +97,7 @@ void Player::UpdateMove() if (action_type == AT_Relive) { CancelAction(); } - if (dead || a8::HasBitFlag(status, HS_Fly)) { + if (dead) { moving = false; moved_frames = 0; last_collision_door = nullptr; @@ -124,9 +117,7 @@ void Player::UpdateMove() void Player::UpdateShot() { - if (dead || - a8::HasBitFlag(status, HS_Fly) || - a8::HasBitFlag(status, HS_Jump) ) { + if (dead) { shot_start = false; shot_hold = false; series_shot_frames = 0; @@ -155,11 +146,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]; @@ -232,8 +218,7 @@ void Player::UpdateUseItemIdx() void Player::UpdateSpectate() { - if (room->gas_data.gas_mode == GasInactive || - a8::HasBitFlag(status, HS_Fly)) { + if (room->gas_data.gas_mode == GasInactive) { spectate = false; return; } @@ -243,45 +228,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(); - for (size_t i = 0; i < 4; ++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_); - } - } - jump = false; -} - void Player::UpdateUseSkill() { DoSkill(); @@ -304,14 +255,7 @@ void Player::Shot() CancelAction(); } -#if 1 if (true) { -#else - if (room->gas_data.gas_mode != GasInactive && - !a8::HasBitFlag(status, HS_Fly) && - !a8::HasBitFlag(status, HS_Jump) - ) { -#endif for (auto& tuple : curr_weapon->meta->bullet_born_offset) { a8::Vec2 bullet_born_offset = a8::Vec2(std::get<0>(tuple), std::get<1>(tuple)); bullet_born_offset.Rotate(attack_dir.CalcAngle(a8::Vec2::UP)); @@ -407,10 +351,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) { @@ -825,22 +765,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) { diff --git a/server/gameserver/player.h b/server/gameserver/player.h index 32ed027..6d4a076 100644 --- a/server/gameserver/player.h +++ b/server/gameserver/player.h @@ -72,7 +72,6 @@ class Player : public Human void UpdateUseItemIdx(); void UpdateSpectate(); void UpdateEmote(); - void UpdateJump(); void UpdateUseSkill(); void Shot(); void ProcInteraction(); diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 4efad87..b1c7cdc 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -55,7 +55,6 @@ void Room::Init() }, &xtimer_attacher.timer_list_); } - InitAirDrop(); ShuaAndroid(); } @@ -312,17 +311,6 @@ void Room::FillSMJoinedNotify(Player* self_hum, cs::SMJoinedNotify& msg) msg.set_player_id(self_hum->entity_uniid); msg.set_started(false); msg.set_room_uuid(a8::XValue(room_uuid).GetString()); - #if 0 - for (auto& pair : uniid_hash_) { - if (pair.second->entity_type == ET_Player) { - Human* hum = (Human*)pair.second; - cs::MFPlayerInfo* info = msg.add_player_infos(); - info->set_player_id(hum->entity_uniid); - info->set_team_id(hum->team_id); - info->set_name(hum->name); - } - } - #endif } void Room::ScatterDrop(a8::Vec2 center, int drop_id) @@ -789,34 +777,8 @@ void Room::UpdateGas() CreateAndroid(ROOM_MAX_PLAYER_NUM - human_hash_.size()); NotifyUiUpdate(); } - ShuaPlane(); NotifyWxVoip(); 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); - 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_); } } break; @@ -893,86 +855,6 @@ void Room::MatchTeam(Human* hum) } } -void Room::InitAirDrop() -{ - std::list& air_drops = MetaMgr::Instance()->GetAirDrops(); - for (auto& air_drop : air_drops) { - xtimer.AddDeadLineTimerAndAttach(SERVER_FRAME_RATE * air_drop.i->time(), - a8::XParams() - .SetSender(this) - .SetParam1(air_drop.i->appear_time()) - .SetParam2(air_drop.i->drop_id()) - .SetParam3(air_drop.i->id()), - [] (const a8::XParams& param) - { - Room* room = (Room*)param.sender.GetUserData(); - if (!room->game_over) { - room->AirDrop(param.param1, param.param2); - } - }, - &xtimer_attacher.timer_list_); - } -} - -void Room::AirDrop(int appear_time, int box_id) -{ - MetaData::MapThing* thing_meta = MetaMgr::Instance()->GetMapThing(box_id); - if (thing_meta) { - a8::Vec2 dir = a8::Vec2::UP; - dir.Rotate(a8::RandAngle()); - a8::Vec2 box_pos = gas_data.pos_new + dir * (500 + rand() % 300); - #if 1 - if (box_pos.x < 1.0f) { - box_pos.x = 1.0f; - } - if (box_pos.x >= MAP_WIDTH) { - box_pos.x = MAP_WIDTH - 1; - } - if (box_pos.y < 1.0f) { - box_pos.y = 1.0f; - } - if (box_pos.y >= MAP_HEIGHT) { - box_pos.y = MAP_HEIGHT - 1; - } - #endif - frame_event.AddAirDrop(appear_time, box_id, box_pos); - xtimer.AddDeadLineTimerAndAttach(SERVER_FRAME_RATE * appear_time / 1000.f, - a8::XParams() - .SetSender(this) - .SetParam1(box_id) - .SetParam2(box_pos.x) - .SetParam3(box_pos.y), - [] (const a8::XParams& param) - { - Room* room = (Room*)param.sender.GetUserData(); - if (!room->game_over) { - room->CreateObstacle(param.param1.GetInt(), - param.param2.GetDouble(), - param.param3.GetDouble()); - } - }, - &xtimer_attacher.timer_list_); - } -} - -void Room::ShuaPlane() -{ - airline_ = MetaMgr::Instance()->RandAirLine(); - 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; - - for (auto& pair : human_hash_) { - a8::SetBitFlag(pair.second->status, HS_Fly); - pair.second->pos = plane.curr_pos; - pair.second->attack_dir = plane.dir; - pair.second->move_dir = plane.dir; - grid_service.MoveHuman(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 56c72d4..1ddac0b 100644 --- a/server/gameserver/room.h +++ b/server/gameserver/room.h @@ -13,7 +13,6 @@ namespace MetaData struct Map; struct SafeArea; struct Building; - struct AirLine; } struct timer_list; @@ -40,7 +39,6 @@ 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; @@ -97,9 +95,6 @@ private: a8::Vec2& out_pos); void AutoMatchTeam(); void MatchTeam(Human* hum); - void InitAirDrop(); - void AirDrop(int appear_time, int box_id); - void ShuaPlane(); int NewTeam(); Obstacle* CreateObstacle(int id, float x, float y); void CreateThings(); @@ -115,9 +110,7 @@ private: private: int elapsed_time_ = 0; 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 d95fe21..5ac8c5f 100755 --- a/server/gameserver/types.h +++ b/server/gameserver/types.h @@ -90,14 +90,6 @@ struct PlayerStats int rank = 0; }; -struct Plane -{ - a8::Vec2 start_point; - a8::Vec2 end_point; - a8::Vec2 dir; - a8::Vec2 curr_pos; -}; - struct HumanAbility { float speed = 0.0f;