#pragma once #include #include #include #include "vec.hpp" #include "wren.hpp" namespace wren { struct entvars { int id{-1}; math::vec3f origin{}; float next_think{0.0f}; int spawn_flags{0}; bool free{false}; math::vec3f velocity{}; math::vec3f angles{}; math::vec3f mins{}; math::vec3f maxs{}; std::string class_name{}; std::string target_name{}; float sounds{0}; std::string noise{}; std::string noise1{}; std::string noise2{}; std::string noise3{}; }; enum class typing { UNDEFINED = -1, INT = 1, FLOAT = 2, VECTOR = 3, STRING = 4 }; void init(); void load_progs(); std::optional> create_entity(const std::string &classname, std::map pairs); void run_think(int index); void set_field(WrenHandle *ent, std::string key, std::string value); std::map parse_fields(std::istringstream &ss); }