コード例 #1
0
ファイル: mmove_t.cs プロジェクト: optimus-code/Q2Sharp
 public mmove_t(int firstframe, int lastframe, mframe_t[] frame, EntThinkAdapter endfunc)
 {
     this.firstframe = firstframe;
     this.lastframe  = lastframe;
     this.frame      = frame;
     this.endfunc    = endfunc;
 }
コード例 #2
0
ファイル: mmove_t.cs プロジェクト: optimus-code/Q2Sharp
        public virtual void Read(QuakeFile f)
        {
            firstframe = f.ReadInt32();
            lastframe  = f.ReadInt32();
            int len = f.ReadInt32();

            frame = new mframe_t[len];
            for (int n = 0; n < len; n++)
            {
                frame[n] = new mframe_t();
                frame[n].Read(f);
            }

            endfunc = (EntThinkAdapter)f.ReadAdapter();
        }
コード例 #3
0
ファイル: moveinfo_t.cs プロジェクト: optimus-code/Q2Sharp
 public virtual void Read(QuakeFile f)
 {
     start_origin       = f.ReadVector();
     start_angles       = f.ReadVector();
     end_origin         = f.ReadVector();
     end_angles         = f.ReadVector();
     sound_start        = f.ReadInt32();
     sound_middle       = f.ReadInt32();
     sound_end          = f.ReadInt32();
     accel              = f.ReadSingle();
     speed              = f.ReadSingle();
     decel              = f.ReadSingle();
     distance           = f.ReadSingle();
     wait               = f.ReadSingle();
     state              = f.ReadInt32();
     dir                = f.ReadVector();
     current_speed      = f.ReadSingle();
     move_speed         = f.ReadSingle();
     next_speed         = f.ReadSingle();
     remaining_distance = f.ReadSingle();
     decel_distance     = f.ReadSingle();
     endfunc            = ( EntThinkAdapter )f.ReadAdapter();
 }
コード例 #4
0
ファイル: monsterinfo_t.cs プロジェクト: optimus-code/Q2Sharp
 public virtual void Read(QuakeFile f)
 {
     if (f.ReadBoolean())
     {
         currentmove = new mmove_t();
         currentmove.Read(f);
     }
     else
     {
         currentmove = null;
     }
     aiflags           = f.ReadInt32();
     nextframe         = f.ReadInt32();
     scale             = f.ReadSingle();
     stand             = ( EntThinkAdapter )f.ReadAdapter();
     idle              = ( EntThinkAdapter )f.ReadAdapter();
     search            = ( EntThinkAdapter )f.ReadAdapter();
     walk              = ( EntThinkAdapter )f.ReadAdapter();
     run               = ( EntThinkAdapter )f.ReadAdapter();
     dodge             = ( EntDodgeAdapter )f.ReadAdapter();
     attack            = ( EntThinkAdapter )f.ReadAdapter();
     melee             = ( EntThinkAdapter )f.ReadAdapter();
     sight             = ( EntInteractAdapter )f.ReadAdapter();
     checkattack       = ( EntThinkAdapter )f.ReadAdapter();
     pausetime         = f.ReadSingle();
     attack_finished   = f.ReadSingle();
     saved_goal        = f.ReadVector();
     search_time       = f.ReadSingle();
     trail_time        = f.ReadSingle();
     last_sighting     = f.ReadVector();
     attack_state      = f.ReadInt32();
     lefty             = f.ReadInt32();
     idle_time         = f.ReadSingle();
     linkcount         = f.ReadInt32();
     power_armor_power = f.ReadInt32();
     power_armor_type  = f.ReadInt32();
 }
コード例 #5
0
 public gitem_t(string classname, EntInteractAdapter pickup, ItemUseAdapter use, ItemDropAdapter drop, EntThinkAdapter weaponthink, string pickup_sound, string world_model, int world_model_flags, string view_model, string icon, string pickup_name, int count_width, int quantity, string ammo, int flags, int weapmodel, gitem_armor_t info, int tag, string precaches)
 {
     this.classname         = classname;
     this.pickup            = pickup;
     this.use               = use;
     this.drop              = drop;
     this.weaponthink       = weaponthink;
     this.pickup_sound      = pickup_sound;
     this.world_model       = world_model;
     this.world_model_flags = world_model_flags;
     this.view_model        = view_model;
     this.icon              = icon;
     this.pickup_name       = pickup_name;
     this.count_width       = count_width;
     this.quantity          = quantity;
     this.ammo              = ammo;
     this.flags             = flags;
     this.weapmodel         = weapmodel;
     this.info              = info;
     this.tag               = tag;
     this.precaches         = precaches;
     this.index             = id++;
 }
コード例 #6
0
 public gitem_t(string classname, EntInteractAdapter pickup, ItemUseAdapter use, ItemDropAdapter drop, EntThinkAdapter weaponthink)
 {
 }
コード例 #7
0
 public virtual void Read(QuakeFile f)
 {
     ai    = (AIAdapter)f.ReadAdapter();
     dist  = f.ReadSingle();
     think = (EntThinkAdapter)f.ReadAdapter();
 }
コード例 #8
0
 public mframe_t(AIAdapter ai, float dist, EntThinkAdapter think)
 {
     this.ai    = ai;
     this.dist  = dist;
     this.think = think;
 }
コード例 #9
0
ファイル: spawn_t.cs プロジェクト: optimus-code/Q2Sharp
 public spawn_t(string name, EntThinkAdapter spawn)
 {
     this.name  = name;
     this.spawn = spawn;
 }
コード例 #10
0
ファイル: edict_t.cs プロジェクト: optimus-code/Q2Sharp
        public virtual void Read(QuakeFile f)
        {
            s.Read(f);
            inuse        = f.ReadBoolean();
            linkcount    = f.ReadInt32();
            num_clusters = f.ReadInt32();
            if (f.ReadInt32() != 9999)
            {
                new Exception("wrong read pos!").PrintStackTrace();
            }
            var len = f.ReadInt32();

            if (len == -1)
            {
                clusternums = null;
            }
            else
            {
                clusternums = new Int32[Defines.MAX_ENT_CLUSTERS];
                for (var n = 0; n < Defines.MAX_ENT_CLUSTERS; n++)
                {
                    clusternums[n] = f.ReadInt32();
                }
            }

            headnode                = f.ReadInt32();
            areanum                 = f.ReadInt32();
            areanum2                = f.ReadInt32();
            svflags                 = f.ReadInt32();
            mins                    = f.ReadVector();
            maxs                    = f.ReadVector();
            absmin                  = f.ReadVector();
            absmax                  = f.ReadVector();
            size                    = f.ReadVector();
            solid                   = f.ReadInt32();
            clipmask                = f.ReadInt32();
            movetype                = f.ReadInt32();
            flags                   = f.ReadInt32();
            model                   = f.ReadString();
            freetime                = f.ReadSingle();
            message                 = f.ReadString();
            classname               = f.ReadString();
            spawnflags              = f.ReadInt32();
            timestamp               = f.ReadSingle();
            angle                   = f.ReadSingle();
            target                  = f.ReadString();
            targetname              = f.ReadString();
            killtarget              = f.ReadString();
            team                    = f.ReadString();
            pathtarget              = f.ReadString();
            deathtarget             = f.ReadString();
            combattarget            = f.ReadString();
            target_ent              = f.ReadEdictRef();
            speed                   = f.ReadSingle();
            accel                   = f.ReadSingle();
            decel                   = f.ReadSingle();
            movedir                 = f.ReadVector();
            pos1                    = f.ReadVector();
            pos2                    = f.ReadVector();
            velocity                = f.ReadVector();
            avelocity               = f.ReadVector();
            mass                    = f.ReadInt32();
            air_finished            = f.ReadSingle();
            gravity                 = f.ReadSingle();
            goalentity              = f.ReadEdictRef();
            movetarget              = f.ReadEdictRef();
            yaw_speed               = f.ReadSingle();
            ideal_yaw               = f.ReadSingle();
            nextthink               = f.ReadSingle();
            prethink                = ( EntThinkAdapter )f.ReadAdapter();
            think                   = ( EntThinkAdapter )f.ReadAdapter();
            blocked                 = ( EntBlockedAdapter )f.ReadAdapter();
            touch                   = ( EntTouchAdapter )f.ReadAdapter();
            use                     = ( EntUseAdapter )f.ReadAdapter();
            pain                    = ( EntPainAdapter )f.ReadAdapter();
            die                     = ( EntDieAdapter )f.ReadAdapter();
            touch_debounce_time     = f.ReadSingle();
            pain_debounce_time      = f.ReadSingle();
            damage_debounce_time    = f.ReadSingle();
            fly_sound_debounce_time = f.ReadSingle();
            last_move_time          = f.ReadSingle();
            health                  = f.ReadInt32();
            max_health              = f.ReadInt32();
            gib_health              = f.ReadInt32();
            deadflag                = f.ReadInt32();
            show_hostile            = f.ReadInt32();
            powerarmor_time         = f.ReadSingle();
            map                     = f.ReadString();
            viewheight              = f.ReadInt32();
            takedamage              = f.ReadInt32();
            dmg                     = f.ReadInt32();
            radius_dmg              = f.ReadInt32();
            dmg_radius              = f.ReadSingle();
            sounds                  = f.ReadInt32();
            count                   = f.ReadInt32();
            chain                   = f.ReadEdictRef();
            enemy                   = f.ReadEdictRef();
            oldenemy                = f.ReadEdictRef();
            activator               = f.ReadEdictRef();
            groundentity            = f.ReadEdictRef();
            groundentity_linkcount  = f.ReadInt32();
            teamchain               = f.ReadEdictRef();
            teammaster              = f.ReadEdictRef();
            mynoise                 = f.ReadEdictRef();
            mynoise2                = f.ReadEdictRef();
            noise_index             = f.ReadInt32();
            noise_index2            = f.ReadInt32();
            volume                  = f.ReadSingle();
            attenuation             = f.ReadSingle();
            wait                    = f.ReadSingle();
            delay                   = f.ReadSingle();
            random                  = f.ReadSingle();
            teleport_time           = f.ReadSingle();
            watertype               = f.ReadInt32();
            waterlevel              = f.ReadInt32();
            move_origin             = f.ReadVector();
            move_angles             = f.ReadVector();
            light_level             = f.ReadInt32();
            style                   = f.ReadInt32();
            item                    = f.ReadItem();
            moveinfo.Read(f);
            monsterinfo.Read(f);
            var ndx = f.ReadInt32();

            if (ndx == -1)
            {
                client = null;
            }
            else
            {
                client = GameBase.game.clients[ndx];
            }
            owner = f.ReadEdictRef();
            if (f.ReadInt32() != 9876)
            {
                System.Diagnostics.Debug.WriteLine("ent load check failed for num " + index);
            }
        }