1
This commit is contained in:
parent
5e3b8e2774
commit
ee22da622e
@ -2825,7 +2825,7 @@ void Creature::OnBattleStart(Room* room)
|
||||
|
||||
bool Creature::CanFollow(Creature* follower)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG1
|
||||
return false;
|
||||
#endif
|
||||
if (follower->GetUniId() == GetUniId()) {
|
||||
|
@ -171,6 +171,7 @@ class Creature : public MoveableEntity
|
||||
bool IsHuman() const;
|
||||
bool IsCar() const;
|
||||
Human* AsHuman() { return IsHuman() ? (Human*)this : nullptr; };
|
||||
Player* AsPlayer() { return IsPlayer() ? (Player*)this : nullptr; };
|
||||
Car* AsCar() { return IsCar() ? (Car*)this : nullptr; };
|
||||
virtual void DecHP(float dec_hp, int killer_id, const std::string& killer_name, int weapon_id) {};
|
||||
void AddHp(float hp);
|
||||
|
@ -3721,10 +3721,12 @@ void Human::DoFollow(int target_id)
|
||||
.SetSender(this),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Player* hum = (Player*)param.sender.GetUserData();
|
||||
Human* hum = (Human*)param.sender.GetUserData();
|
||||
if (!hum->follow_target.Get()) {
|
||||
hum->moving = false;
|
||||
hum->moved_frames = 0;
|
||||
if (hum->IsPlayer()) {
|
||||
hum->AsPlayer()->moving = false;
|
||||
hum->AsPlayer()->moved_frames = 0;
|
||||
}
|
||||
hum->room->xtimer.DeleteTimer(hum->room->xtimer.GetRunningTimer());
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user