Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int64_t Creature::getTimeSinceLastMove() const
- {
- if (lastStep) {
- return OTSYS_TIME() - lastStep;
- }
- return std::numeric_limits<int64_t>::max();
- }
- int32_t Creature::getWalkDelay(Direction dir) const
- {
- if (lastStep == 0) {
- return 0;
- }
- int64_t ct = OTSYS_TIME();
- int64_t stepDuration = getStepDuration(dir);
- return stepDuration - (ct - lastStep);
- }
- int32_t Creature::getWalkDelay() const
- {
- //Used for auto-walking
- if (lastStep == 0) {
- return 0;
- }
- int64_t ct = OTSYS_TIME();
- int64_t stepDuration = getStepDuration() * lastStepCost;
- return stepDuration - (ct - lastStep);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement