This commit is contained in:
aozhiwei 2021-09-29 00:08:51 +08:00
commit 5e3b8e2774

View File

@ -58,6 +58,7 @@ Human::Human():Creature()
Human::~Human()
{
int i = 0;
}
void Human::Initialize()
@ -235,8 +236,14 @@ void Human::FillMFObjectFull(Room* room, Human* hum, cs::MFObjectFull* full_data
if (parachute != 0) {
p->set_parachute(parachute);
}
if (IsPlayer()) {
int i = 0;
}
if (follow_target.Get()) {
p->set_follow_target(follow_target.Get()->GetUniId());
#ifdef DEBUG
a8::XPrintf("DoFollow1 %d->%d\n", {GetUniId(), follow_target.Get()->GetUniId()});
#endif
}
FillBodyState(p->mutable_states());
FillBuffList(hum, p->mutable_buff_list());
@ -3695,6 +3702,9 @@ void Human::DoFollow(int target_id)
if (GetTeam()) {
Human* member = GetTeam()->GetMemberByUniId(target_id);
if (member && member->CanFollow(this)) {
#ifdef DEBUG
a8::XPrintf("DoFollow %d->%d\n", {GetUniId(), member->GetUniId()});
#endif
if (follow_target.Get()) {
follow_target.Detach();
if (follow_target_timer_) {