Lerp mob movement a little.

We'll lerp a little harder later. Also retreat if kited
too far.
This commit is contained in:
2020-09-24 22:55:33 +02:00
parent 1f18104a6f
commit cfb3d25bc5
2 changed files with 80 additions and 32 deletions

View File

@@ -27,7 +27,7 @@ struct Mob : public BaseNPC {
// dead
time_t killedTime = 0;
int regenTime;
time_t regenTime;
bool despawned = false; // for the sake of death animations
// roaming
@@ -85,4 +85,5 @@ namespace MobManager {
void npcAttackPc(Mob *mob);
void killMob(CNSocket *sock, Mob *mob);
void giveReward(CNSocket *sock);
std::pair<int,int> lerp(int, int, int, int, int);
}