mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 13:30:06 +00:00
Compare commits
No commits in common. "8568fd1c4635dead85ecfa6db1e6118608d8a38b" and "3365cb53b7387d825be24085842a10964aaf55db" have entirely different histories.
8568fd1c46
...
3365cb53b7
@ -478,14 +478,6 @@ void MobAI::deadStep(CombatNPC* npc, time_t currTime) {
|
|||||||
if (self->groupLeader == self->id)
|
if (self->groupLeader == self->id)
|
||||||
roamingStep(self, currTime);
|
roamingStep(self, currTime);
|
||||||
|
|
||||||
/*
|
|
||||||
* If the mob hasn't fully despanwed yet, don't try to respawn it. This protects
|
|
||||||
* against the edge case where mobs with a very short regenTime would try to respawn
|
|
||||||
* before they've faded away; and would respawn even if they were meant to be removed.
|
|
||||||
*/
|
|
||||||
if (!self->despawned)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (self->killedTime != 0 && currTime - self->killedTime < self->regenTime * 100)
|
if (self->killedTime != 0 && currTime - self->killedTime < self->regenTime * 100)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -388,21 +388,8 @@ NPCPath* Transport::findApplicablePath(int32_t id, int32_t type, int taskID) {
|
|||||||
|
|
||||||
void Transport::constructPathNPC(int32_t id, NPCPath* path) {
|
void Transport::constructPathNPC(int32_t id, NPCPath* path) {
|
||||||
BaseNPC* npc = NPCManager::NPCs[id];
|
BaseNPC* npc = NPCManager::NPCs[id];
|
||||||
|
if (npc->kind == EntityKind::MOB)
|
||||||
if (npc->kind == EntityKind::MOB) {
|
((Mob*)(npc))->staticPath = true;
|
||||||
auto mob = (Mob*)npc;
|
|
||||||
mob->staticPath = true;
|
|
||||||
|
|
||||||
Vec3 firstPoint = path->points.front();
|
|
||||||
|
|
||||||
// Ensure that the first point coincides with the mob's spawn point.
|
|
||||||
if (mob->spawnX != firstPoint.x || mob->spawnY != firstPoint.y) {
|
|
||||||
std::cout << "[FATAL] The first point of the route for mob " << mob->id << " (type " << mob->type
|
|
||||||
<< ") does not correspond with its spawn point." << std::endl;
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->loopingPath = path->isLoop;
|
npc->loopingPath = path->isLoop;
|
||||||
|
|
||||||
// Interpolate
|
// Interpolate
|
||||||
|
Loading…
Reference in New Issue
Block a user