39 void load(
const std::string& map,
const std::string& default_game =
"");
42 void begin_play(
const std::string& options =
"");
52 const Model*
model()
const {
return has_model_ ? &model_ :
nullptr; }
62 Obj*
login(
const std::string& options,
const std::string& player_class);
69 void guarded(
Obj* o,
const std::string& event, std::vector<Value> args = {});
70 Obj* find_class(
const std::string& pkg_dot_class);
71 void player_tick(
float dt);
74 void physics(
Obj* o,
float dt);
81 void bump(
Obj* o,
Obj* other);
83 void move_brush(
Obj* o,
float dt);
84 void set_base(
Obj* o,
Obj* base);
89 std::map<Obj*, Brush> movers_;
90 void add_mover(Obj* o);
91 const LodMesh::AnimSeq* seq(Obj* o,
const std::string& name);
94 bool reachable(Obj* pawn, Vec3 dest);
97 Obj* route(Obj* pawn,
const std::function<
float(Obj*,
float)>& weight,
float* best);
98 void walk(Obj* o,
float dt);
99 void sight(Obj* o,
float dt);
101 Obj* trace_actors(Obj* self, Vec3 a, Vec3 b,
float* t_hit, Vec3* normal,
const std::set<Obj*>* skip =
nullptr);
102 std::set<std::pair<Obj*, Obj*>> seen_;
108 std::map<Obj*, std::vector<Edge>> paths_;
109 std::map<Obj*, float> speed_;
110 void touches(Obj* o);
111 std::set<std::pair<Obj*, Obj*>> touching_;
112 std::vector<Obj*> navs_;
113 bool anim_done(Obj* o);
114 void animate(Obj* o,
float dt);
115 std::map<const Obj*, std::unique_ptr<LodMesh>> meshes_;
116 std::map<Obj*, float> tweens_;
118 const Package* map_ =
nullptr;
120 bool has_model_ =
false;
123 PackageSet& packages_;
124 std::set<Obj*> deleted_;
126 size_t map_actors_ = 0;
Obj * spawn(Obj *cls, Obj *spawner, Obj *owner, const std::string *tag, const Value *loc, const Value *rot)
Definition world.cpp:382