Better flee runspeed calculation.

Added two new NPC special_abilities, ALWAYS_FLEE and FLEE_PERCENT.
Fixed an issue where a NPC could get stuck on a single coord in a rectangular roambox.
Added mindelay to spawngroup to allow for greater control of the roambox delay. SQL is required.
This commit is contained in:
cavedude00
2014-02-26 18:06:16 -08:00
parent ea31a29f8a
commit 1d6bd3cc5e
19 changed files with 118 additions and 56 deletions
+8
View File
@@ -381,6 +381,14 @@ int main(int argc, char** argv) {
entity_list.AddClient(client);
}
uint8 IDLEZONETIME = 200;
if ( numclients < 1 && temp_timer.GetDuration() != IDLEZONETIME )
temp_timer.SetTimer(IDLEZONETIME);
else if ( numclients > 0 && temp_timer.GetDuration() == IDLEZONETIME )
{
temp_timer.SetTimer(10);
temp_timer.Trigger();
}
//check for timeouts in other threads
timeout_manager.CheckTimeouts();