4 ATTRIB(Model, m_id, int, 0);
5 ATTRIB(Model, model_str, string());
6 ATTRIB(Model, model_str_, string);
7 CONSTRUCTOR(Model, string() path)
10 this.model_str = path;
12 METHOD(Model, model_precache, void(Model this))
15 string s = this.model_str();
16 if (s != "" && s != "null" && !fexists(s)) {
17 LOG_WARNF("Missing model: \"%s\"", s);
20 //profile(sprintf("precache_model(\"%s\")", s));
22 strcpy(this.model_str_, s);
26 #define setmodel(this, m) MACRO_BEGIN \
27 Model _setmodel_model = (m); \
28 string _setmodel_cached = _setmodel_model.model_str_; \
29 _setmodel((this), _setmodel_cached ? _setmodel_cached : _setmodel_model.model_str()); \