{
self.drawmask = MASK_NORMAL;
self.movetype = MOVETYPE_NOCLIP;
+ self.draw = ItemDraw;
if(self.mdl)
strunzone(self.mdl);
if(cl_simple_items && (self.ItemStatus & ITS_ALLOWSI))
{
string _fn2 = substring(_fn, 0 , strlen(_fn) -4);
-
+ self.draw = ItemDrawSimple;
+
if(fexists(strcat(_fn2, "_simple.md3")))
self.mdl = strzone(strcat(_fn2, "_simple.md3"));
else if(fexists(strcat(_fn2, "_simple.dpm")))
self.mdl = strzone(strcat(_fn2, "_simple.obj"));
else
{
- self.mdl = "";
+ self.draw = ItemDraw;
dprint("Simple item requested for ", _fn, " but no model exsist for it\n");
}
}
+ if(self.draw != ItemDrawSimple)
+ self.mdl = strzone(_fn);
+
+
if(self.mdl == "")
- {
- self.mdl = strzone(_fn);
- self.draw = ItemDraw;
- }
- else
- self.draw = ItemDrawSimple;
+ dprint("^1WARNING!^7 self.mdl is unset for item ", self.classname, "exspect a crash just aboute now\n");
precache_model(self.mdl);
setmodel(self, self.mdl);
WriteByte(MSG_ENTITY, self.ItemStatus);
if(sf & ISF_MODEL)
+ {
+
+ if(self.mdl == "")
+ dprint("^1WARNING!^7 self.mdl is unset for item ", self.classname, "exspect a crash just aboute now\n");
+
WriteString(MSG_ENTITY, self.mdl);
+ }
+
if(sf & ISF_COLORMAP)
WriteShort(MSG_ENTITY, self.colormap);
if(self.model == "")
self.model = itemmodel;
+ if(self.model == "")
+ {
+ dprint("^1Tried to spawn ", itemname, " with no model!\n");
+ return;
+ }
+
+
if(self.item_pickupsound == "")
self.item_pickupsound = pickupsound;