Beispiel #1
0
 public virtual void Read(QuakeFile f)
 {
     userinfo      = f.ReadString();
     netname       = f.ReadString();
     hand          = f.ReadInt32();
     connected     = f.ReadInt32() != 0;
     health        = f.ReadInt32();
     max_health    = f.ReadInt32();
     savedFlags    = f.ReadInt32();
     selected_item = f.ReadInt32();
     for (int n = 0; n < Defines.MAX_ITEMS; n++)
     {
         inventory[n] = f.ReadInt32();
     }
     max_bullets      = f.ReadInt32();
     max_shells       = f.ReadInt32();
     max_rockets      = f.ReadInt32();
     max_grenades     = f.ReadInt32();
     max_cells        = f.ReadInt32();
     max_slugs        = f.ReadInt32();
     weapon           = f.ReadItem();
     lastweapon       = f.ReadItem();
     power_cubes      = f.ReadInt32();
     score            = f.ReadInt32();
     game_helpchanged = f.ReadInt32();
     helpchanged      = f.ReadInt32();
     spectator        = f.ReadInt32() != 0;
 }
Beispiel #2
0
 public virtual void Clear( )
 {
     ping                = 0;
     pers                = new client_persistant_t();
     resp                = new client_respawn_t();
     old_pmove           = new pmove_state_t();
     showscores          = false;
     showinventory       = false;
     showhelp            = false;
     showhelpicon        = false;
     ammo_index          = 0;
     buttons             = oldbuttons = latched_buttons = 0;
     weapon_thunk        = false;
     newweapon           = null;
     damage_armor        = 0;
     damage_parmor       = 0;
     damage_blood        = 0;
     damage_knockback    = 0;
     killer_yaw          = 0;
     damage_from         = new Single[3];
     weaponstate         = 0;
     kick_angles         = new Single[3];
     kick_origin         = new Single[3];
     v_dmg_roll          = v_dmg_pitch = v_dmg_time = 0;
     fall_time           = fall_value = 0;
     damage_alpha        = 0;
     bonus_alpha         = 0;
     damage_blend        = new Single[3];
     v_angle             = new Single[3];
     bobtime             = 0;
     oldviewangles       = new Single[3];
     oldvelocity         = new Single[3];
     next_drown_time     = 0;
     old_waterlevel      = 0;
     breather_sound      = 0;
     machinegun_shots    = 0;
     anim_end            = 0;
     anim_priority       = 0;
     anim_duck           = false;
     anim_run            = false;
     quad_framenum       = 0;
     invincible_framenum = 0;
     breather_framenum   = 0;
     enviro_framenum     = 0;
     grenade_blew_up     = false;
     grenade_time        = 0;
     silencer_shots      = 0;
     weapon_sound        = 0;
     pickup_msg_time     = 0;
     flood_locktill      = 0;
     flood_when          = new Single[10];
     flood_whenhead      = 0;
     respawn_time        = 0;
     chase_target        = null;
     update_chase        = false;
 }
 public virtual void Drop(edict_t ent, gitem_t item)
 {
 }
Beispiel #4
0
 public virtual void Read(QuakeFile f)
 {
     ps.Load(f);
     ping = f.ReadInt32();
     pers.Read(f);
     resp.Read(f);
     old_pmove.Load(f);
     showscores          = f.ReadInt32() != 0;
     showinventory       = f.ReadInt32() != 0;
     showhelp            = f.ReadInt32() != 0;
     showhelpicon        = f.ReadInt32() != 0;
     ammo_index          = f.ReadInt32();
     buttons             = f.ReadInt32();
     oldbuttons          = f.ReadInt32();
     latched_buttons     = f.ReadInt32();
     weapon_thunk        = f.ReadInt32() != 0;
     newweapon           = f.ReadItem();
     damage_armor        = f.ReadInt32();
     damage_parmor       = f.ReadInt32();
     damage_blood        = f.ReadInt32();
     damage_knockback    = f.ReadInt32();
     damage_from[0]      = f.ReadSingle();
     damage_from[1]      = f.ReadSingle();
     damage_from[2]      = f.ReadSingle();
     killer_yaw          = f.ReadSingle();
     weaponstate         = f.ReadInt32();
     kick_angles[0]      = f.ReadSingle();
     kick_angles[1]      = f.ReadSingle();
     kick_angles[2]      = f.ReadSingle();
     kick_origin[0]      = f.ReadSingle();
     kick_origin[1]      = f.ReadSingle();
     kick_origin[2]      = f.ReadSingle();
     v_dmg_roll          = f.ReadSingle();
     v_dmg_pitch         = f.ReadSingle();
     v_dmg_time          = f.ReadSingle();
     fall_time           = f.ReadSingle();
     fall_value          = f.ReadSingle();
     damage_alpha        = f.ReadSingle();
     bonus_alpha         = f.ReadSingle();
     damage_blend[0]     = f.ReadSingle();
     damage_blend[1]     = f.ReadSingle();
     damage_blend[2]     = f.ReadSingle();
     v_angle[0]          = f.ReadSingle();
     v_angle[1]          = f.ReadSingle();
     v_angle[2]          = f.ReadSingle();
     bobtime             = f.ReadSingle();
     oldviewangles[0]    = f.ReadSingle();
     oldviewangles[1]    = f.ReadSingle();
     oldviewangles[2]    = f.ReadSingle();
     oldvelocity[0]      = f.ReadSingle();
     oldvelocity[1]      = f.ReadSingle();
     oldvelocity[2]      = f.ReadSingle();
     next_drown_time     = f.ReadSingle();
     old_waterlevel      = f.ReadInt32();
     breather_sound      = f.ReadInt32();
     machinegun_shots    = f.ReadInt32();
     anim_end            = f.ReadInt32();
     anim_priority       = f.ReadInt32();
     anim_duck           = f.ReadInt32() != 0;
     anim_run            = f.ReadInt32() != 0;
     quad_framenum       = f.ReadSingle();
     invincible_framenum = f.ReadSingle();
     breather_framenum   = f.ReadSingle();
     enviro_framenum     = f.ReadSingle();
     grenade_blew_up     = f.ReadInt32() != 0;
     grenade_time        = f.ReadSingle();
     silencer_shots      = f.ReadInt32();
     weapon_sound        = f.ReadInt32();
     pickup_msg_time     = f.ReadSingle();
     flood_locktill      = f.ReadSingle();
     flood_when[0]       = f.ReadSingle();
     flood_when[1]       = f.ReadSingle();
     flood_when[2]       = f.ReadSingle();
     flood_when[3]       = f.ReadSingle();
     flood_when[4]       = f.ReadSingle();
     flood_when[5]       = f.ReadSingle();
     flood_when[6]       = f.ReadSingle();
     flood_when[7]       = f.ReadSingle();
     flood_when[8]       = f.ReadSingle();
     flood_when[9]       = f.ReadSingle();
     flood_whenhead      = f.ReadInt32();
     respawn_time        = f.ReadSingle();
     chase_target        = f.ReadEdictRef();
     update_chase        = f.ReadInt32() != 0;
     if (f.ReadInt32() != 8765)
     {
         System.Diagnostics.Debug.WriteLine("game client load failed for num=" + index);
     }
 }
Beispiel #5
0
        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);
            }
        }
Beispiel #6
0
 public virtual void Use(edict_t ent, gitem_t item)
 {
 }