Example #1
0
        public static void PF_setmodel(edict_t ent, string name)
        {
            int      i;
            cmodel_t mod;

            if (name == null)
            {
                Com.Error(Defines.ERR_DROP, "PF_setmodel: NULL");
            }
            i = SV_INIT.SV_ModelIndex(name);
            ent.s.modelindex = i;
            if (name.StartsWith("*"))
            {
                mod = CM.InlineModel(name);
                Math3D.VectorCopy(mod.mins, ent.mins);
                Math3D.VectorCopy(mod.maxs, ent.maxs);
                SV_WORLD.SV_LinkEdict(ent);
            }
        }