Exemple #1
0
        public static void G_RunEntity(edict_t ent)
        {
            if (ent.prethink != null)
            {
                ent.prethink.Think(ent);
            }
            switch ((int)ent.movetype)
            {
            case Defines.MOVETYPE_PUSH:
            case Defines.MOVETYPE_STOP:
                SV.SV_Physics_Pusher(ent);
                break;

            case Defines.MOVETYPE_NONE:
                SV.SV_Physics_None(ent);
                break;

            case Defines.MOVETYPE_NOCLIP:
                SV.SV_Physics_Noclip(ent);
                break;

            case Defines.MOVETYPE_STEP:
                SV.SV_Physics_Step(ent);
                break;

            case Defines.MOVETYPE_TOSS:
            case Defines.MOVETYPE_BOUNCE:
            case Defines.MOVETYPE_FLY:
            case Defines.MOVETYPE_FLYMISSILE:
                SV.SV_Physics_Toss(ent);
                break;

            default:
                gi.Error("SV_Physics: bad movetype " + (int)ent.movetype);
                break;
            }
        }