by Spike » Fri Jul 26, 2013 6:00 pm
setmodel looks up the name->modelindex
sets the modelindex to that lookup result
sets the model string to match.
sets the entity's mins+maxs (QW: only on a "*.bsp" model as non.bsp models are not loaded on the server)
relinks the entity (like setorigin) (including settting absmin, absmax, size, and checking which pvs leafs the entity is inside, as well as updating the physics kd tree thing, thus you will likely want to avoid calling it within touch functions).
.modelindex is used for bsp/bbox collisions, and is also used for networking. the check to see if the entity is actually potentially visible uses .model as an early-out clause however. clear either and the entity will not be drawn.
.mdl is merely a backup for .model, so that the entity can get the proper .model field again once a grabbed item respawns. that's its typical use. it means nothing to the engine.
.