duncan
Mom and Dad were wrong!
/home/malcolm/tmp/duncan/prototype/0/server/npc.h
00001 #ifndef SERVER_NPC_H_
00002 #define SERVER_NPC_H_
00003 
00004 #include "../network/network.h"
00005 #include "character.h"
00006 #include <vector>
00007 #include <list>
00008 
00009 namespace server {
00010 
00018 class NPC : public Character {
00019         public:
00021                 typedef std::vector<std::pair<size_t,size_t> > path_t;
00022         private:
00024                 path_t route_;
00025 
00027                 path_t path_;
00028 
00030                 size_t p_;
00031 
00033                 size_t r_;
00034 
00036                 const static double kTolerance;
00037 
00039                 double desired_r_;
00040 
00042                 double desired_c_;
00043 
00044                 void update_dir();
00045 
00046                 void desire_pos(double,double);
00047         public:
00048                 NPC(std::pair<size_t,size_t>,std::pair<size_t,size_t>);
00049                 void update();
00050                 double last_path_send;
00051                 size_t destr();
00052                 size_t destc();
00053                 void set_path(const path_t&);
00054                 void set_path(const std::list<std::pair<size_t,size_t> >&);
00055                 bool should_snap();
00056                 std::pair<double,double> desired_pos();
00057                 void snapped();
00058 };
00059 
00060 }
00061 
00062 #endif
 All Classes Namespaces Functions Variables Typedefs Enumerations