This commit is contained in:
aozhiwei 2019-11-22 13:51:42 +08:00
parent f2a768d95d
commit ba0ec9b5f5
4 changed files with 0 additions and 9 deletions

View File

@ -73,7 +73,6 @@ void AndroidAI::ChangeToState(AndroidState_e to_state)
hum->move_dir = a8::Vec2(1.0f, 0);
hum->move_dir.Rotate(a8::RandAngle());
hum->move_dir.Normalize();
hum->attack_dir = hum->move_dir;
}
break;
default:
@ -116,7 +115,6 @@ void AndroidAI::DoAttack()
std::abs(shot_dir.y) > FLT_EPSILON) {
shot_dir.Normalize();
shot_dir.Rotate((rand() % 10) / 180.0f);
sender->attack_dir = shot_dir;
}
}
}

View File

@ -153,7 +153,6 @@ void Human::FillMFTeamData(cs::MFTeamData* team_data)
team_data->set_player_id(entity_uniid);
team_data->set_name(name);
TypeConvert::ToPb(pos, team_data->mutable_pos());
TypeConvert::ToPb(attack_dir, team_data->mutable_dir());
team_data->set_disconnected(false);
team_data->set_dead(dead);
}

View File

@ -36,7 +36,6 @@ class Human : public Entity
HumanAbility buff;
a8::Vec2 move_dir;
a8::Vec2 attack_dir;
std::string name;
std::string avatar_url;

View File

@ -149,11 +149,6 @@ int Room::AliveCount()
void Room::AddPlayer(Player* hum)
{
assert(gas_data.gas_mode == GasInactive);
hum->attack_dir = hum->pos;
hum->attack_dir.Normalize();
hum->attack_dir.Rotate(a8::RandAngle());
hum->move_dir = hum->attack_dir;
hum->entity_uniid = AllocUniid();
hum->room = this;
hum->join_frameno = frame_no;