| 389 | } |
| 390 | |
| 391 | void NpcScriptState::insertRoutine(int hoursStart, int minutesStart, int hoursEnd, int minutesEnd, size_t symFunc, |
| 392 | const std::string& waypoint) |
| 393 | { |
| 394 | // FIXME: HACK, let the npc teleport to the first entry of the routine |
| 395 | if (!m_Routine.hasRoutine) |
| 396 | { |
| 397 | VobTypes::NpcVobInformation npc = VobTypes::asNpcVob(m_World, m_HostVob); |
| 398 | |
| 399 | World::Waynet::WaypointIndex wp = World::Waynet::getWaypointIndex(m_World.getWaynet(), waypoint); |
| 400 | |
| 401 | if (wp != World::Waynet::INVALID_WAYPOINT) |
| 402 | npc.playerController->teleportToWaypoint(wp); |
| 403 | } |
| 404 | |
| 405 | m_Routine.hasRoutine = true; // At least one routine-target present |
| 406 | |
| 407 | // Make new routine entry |
| 408 | RoutineEntry entry; |
| 409 | entry.hoursStart = hoursStart; |
| 410 | entry.hoursEnd = hoursEnd; |
| 411 | entry.minutesStart = minutesStart; |
| 412 | entry.minutesEnd = minutesEnd; |
| 413 | entry.symFunc = symFunc; |
| 414 | entry.waypoint = waypoint; |
| 415 | entry.isOverlay = false; |
| 416 | |
| 417 | m_Routine.routine.push_back(entry); |
| 418 | } |
| 419 | |
| 420 | bool NpcScriptState::isNpcStateDriven() |
| 421 | { |
no test coverage detected