This commit is contained in:
Arthur Ice
2014-12-05 20:16:13 -08:00
124 changed files with 63220 additions and 2537 deletions
+14 -18
View File
@@ -19,21 +19,17 @@
#ifdef _EQDEBUG
#include <iostream>
#endif
//#include <iomanip>
#include <stdlib.h>
#include <math.h>
#include "npc.h"
#include "masterentity.h"
#include "npc_ai.h"
#include "map.h"
#include "water_map.h"
#include "../common/moremath.h"
#include "string_ids.h"
#include "../common/misc_functions.h"
#include "../common/string_util.h"
#include "../common/rulesys.h"
#include "../common/features.h"
#include "../common/misc_functions.h"
#include "../common/rulesys.h"
#include "../common/string_util.h"
#include "map.h"
#include "npc.h"
#include "quest_parser_collection.h"
#include "water_map.h"
#include <math.h>
#include <stdlib.h>
struct wp_distance
{
@@ -265,7 +261,7 @@ void NPC::CalculateNewWaypoint()
if(closest.size() != 0)
{
iter = closest.begin();
std::advance(iter, MakeRandomInt(0, closest.size() - 1));
std::advance(iter, zone->random.Int(0, closest.size() - 1));
cur_wp = (*iter).index;
}
@@ -273,7 +269,7 @@ void NPC::CalculateNewWaypoint()
}
case 2: //random
{
cur_wp = MakeRandomInt(0, Waypoints.size() - 1);
cur_wp = zone->random.Int(0, Waypoints.size() - 1);
if(cur_wp == old_wp)
{
if(cur_wp == (Waypoints.size() - 1))
@@ -334,7 +330,7 @@ void NPC::CalculateNewWaypoint()
if(closest.size() != 0)
{
iter = closest.begin();
std::advance(iter, MakeRandomInt(0, closest.size() - 1));
std::advance(iter, zone->random.Int(0, closest.size() - 1));
cur_wp = (*iter).index;
}
break;
@@ -407,13 +403,13 @@ void NPC::SetWaypointPause()
switch (pausetype)
{
case 0: //Random Half
AIwalking_timer->Start((cur_wp_pause - MakeRandomInt(0, cur_wp_pause-1)/2)*1000);
AIwalking_timer->Start((cur_wp_pause - zone->random.Int(0, cur_wp_pause-1)/2)*1000);
break;
case 1: //Full
AIwalking_timer->Start(cur_wp_pause*1000);
break;
case 2: //Random Full
AIwalking_timer->Start(MakeRandomInt(0, cur_wp_pause-1)*1000);
AIwalking_timer->Start(zone->random.Int(0, cur_wp_pause-1)*1000);
break;
}
}