예제 #1
0
        protected override void DoUpdate(Liberty.SaveIO.SaveWriter writer, long start)
        {
            base.DoUpdate(writer, start);

            writer.Seek(start + 0xD4, SeekOrigin.Begin);
            writer.WriteUInt32(_usageInfo);

            writer.Seek(start + 0x1A8, SeekOrigin.Begin);
            writer.WriteUInt32(_weaponFlags);

            writer.Seek(start + 0x1B4, SeekOrigin.Begin);
            if (_user != null)
            {
                // hax
                writer.WriteUInt32(_user.ID);
                writer.WriteUInt32(_user.ID);
            }
            else
            {
                writer.WriteUInt32(0xFFFFFFFF);
                writer.WriteUInt32(0xFFFFFFFF);
            }

            writer.Seek(start + 0x1E0, SeekOrigin.Begin);
            writer.WriteFloat(_plasmaUsage);

            writer.Seek(start + 0x2C6, SeekOrigin.Begin);
            writer.WriteInt16(_ammo);
            writer.Seek(2, SeekOrigin.Current);
            writer.WriteInt16(_clipAmmo);
        }
예제 #2
0
        protected override void DoUpdate(Liberty.SaveIO.SaveWriter writer, long start)
        {
            base.DoUpdate(writer, start);

            // Player
            writer.Seek(start + 0x1CC, SeekOrigin.Begin);
            if (_player != null)
            {
                writer.WriteUInt32(_player.ID);
            }
            else
            {
                writer.WriteUInt32(0xFFFFFFFF);
            }

            // Vehicle seat
            writer.Seek(start + 0x32E, SeekOrigin.Begin);
            writer.WriteUInt16(_seatIndex);

            // Armor ability
            writer.Seek(start + 0x36C, SeekOrigin.Begin);
            if (_armorAbility != null)
            {
                writer.WriteUInt32(_armorAbility.ID);
            }
            else
            {
                writer.WriteUInt32(0xFFFFFFFF);
            }

            // Grenade counts
            writer.Seek(start + 0x378, SeekOrigin.Begin);
            writer.WriteSByte(_fragGrenades);
            writer.WriteSByte(_plasmaGrenades);

            // Vehicle
            writer.Seek(start + 0xA00, SeekOrigin.Begin);
            writer.WriteUInt32(_currentVehicleId);
            writer.WriteUInt32(_controlledVehicleId);

            // Rotation and position
            /*WriteRotationAndPosition(writer, 0xD4C);*/
        }