-#ifndef MODEL_H
-#define MODEL_H
+#pragma once
#define setmodel(e, m) _setmodel((e), (m).model_str())
CLASS(Model, Object)
- ATTRIB(Model, m_id, int, 0)
- ATTRIB(Model, model_str, string(), func_null)
+ ATTRIB(Model, m_id, int, 0);
+ ATTRIB(Model, model_str, string());
CONSTRUCTOR(Model, string() path)
{
CONSTRUCT(Model);
this.model_str = path;
}
- METHOD(Model, model_precache, void(entity this)) {
+ METHOD(Model, model_precache, void(Model this))
+ {
+ TC(Model, this);
string s = this.model_str();
if (s != "" && s != "null" && !fexists(s)) {
- LOG_WARNINGF("Missing model: \"%s\"\n", s);
+ LOG_WARNF("Missing model: \"%s\"", s);
return;
}
- LOG_DEBUGF("precache_model(\"%s\")\n", s);
+ profile(sprintf("precache_model(\"%s\")", s));
precache_model(s);
}
ENDCLASS(Model)
-
-#endif