Example #1
0
        static void PF_makestatic()
        {
            edict_t       ent = GetEdict(OFS.OFS_PARM0);
            MessageWriter msg = Server.sv.signon;

            msg.WriteByte(Protocol.svc_spawnstatic);
            msg.WriteByte(Server.ModelIndex(Progs.GetString(ent.v.model)));
            msg.WriteByte((int)ent.v.frame);
            msg.WriteByte((int)ent.v.colormap);
            msg.WriteByte((int)ent.v.skin);
            for (int i = 0; i < 3; i++)
            {
                msg.WriteCoord(Mathlib.Comp(ref ent.v.origin, i));
                msg.WriteAngle(Mathlib.Comp(ref ent.v.angles, i));
            }

            // throw the entity away now
            Server.FreeEdict(ent);
        }