public static void Read(Player player, ref BinaryReader reader) { CreatureHandler.Read(player, ref reader); player.aerobicLevel = reader.ReadSingle(); player.airInLungs = reader.ReadSingle(); player.allowRoll = reader.ReadInt32(); player.animation = (Player.AnimationIndex)reader.ReadInt32(); player.bodyMode = (Player.BodyModeIndex)reader.ReadInt32(); player.circuitSwimResistance = reader.ReadSingle(); player.consistentDownDiagonal = reader.ReadInt32(); bool corridorDrop = reader.ReadBoolean(); int corridorTurnCounter = reader.ReadInt32(); IntVector2?corridorTurnDir = IntVector2NHandler.Read(ref reader); int crawlTurnDelay = reader.ReadInt32(); PlayerHK.Sync(player, corridorDrop, corridorTurnCounter, corridorTurnDir, crawlTurnDelay); player.drown = reader.ReadSingle(); player.exhausted = reader.ReadBoolean(); player.glowing = reader.ReadBoolean(); player.leftFoot = reader.ReadBoolean(); player.longBellySlide = reader.ReadBoolean(); player.lungsExhausted = reader.ReadBoolean(); player.rollCounter = reader.ReadInt32(); player.rollDirection = reader.ReadInt32(); player.slideCounter = reader.ReadInt32(); player.slideDirection = reader.ReadInt32(); player.slideUpPole = reader.ReadInt32(); player.standing = reader.ReadBoolean(); player.swallowAndRegurgitateCounter = reader.ReadInt32(); player.swimCycle = reader.ReadSingle(); InputHandler.Read(player, ref reader); }
public static void Read(Creature creature, ref BinaryReader reader) { AbstractCreatureHandler.Read(creature, ref reader); PhysicalObjectHandler.Read(creature, ref reader); //creature.blind = reader.ReadInt32(); CreatureHK.Sync(creature, reader.ReadBoolean()); creature.enteringShortCut = IntVector2NHandler.Read(ref reader); creature.lastCoord = WorldCoordinateHandler.Read(ref reader); creature.leechedOut = reader.ReadBoolean(); creature.newToRoomInvinsibility = reader.ReadInt32(); creature.NPCTransportationDestination = WorldCoordinateHandler.Read(ref reader); creature.shortcutDelay = reader.ReadInt32(); // return creature; }
public static Creature Read(Creature creature, ref BinaryReader reader) { creature.abstractPhysicalObject = AbstractCreatureHandler.Read(creature.abstractCreature, ref reader); creature = PhysicalObjectHandler.Read(creature, ref reader); //creature.blind = reader.ReadInt32(); (creature as Patches.patch_Player).Sync(reader.ReadBoolean()); creature.enteringShortCut = IntVector2NHandler.Read(ref reader); creature.lastCoord = WorldCoordinateHandler.Read(ref reader); creature.leechedOut = reader.ReadBoolean(); creature.newToRoomInvinsibility = reader.ReadInt32(); creature.NPCTransportationDestination = WorldCoordinateHandler.Read(ref reader); creature.shortcutDelay = reader.ReadInt32(); return(creature); }
public static Player Read(Player creature, ref BinaryReader reader) { creature.abstractPhysicalObject = AbstractCreatureHandler.Read(creature.abstractCreature, ref reader); creature = PhysicalObjectHandler.Read(creature, ref reader); //creature.blind = reader.ReadInt32(); (creature as Patches.patch_Player).Sync(reader.ReadBoolean()); creature.enteringShortCut = IntVector2NHandler.Read(ref reader); creature.lastCoord = WorldCoordinateHandler.Read(ref reader); creature.leechedOut = reader.ReadBoolean(); creature.newToRoomInvinsibility = reader.ReadInt32(); creature.NPCTransportationDestination = WorldCoordinateHandler.Read(ref reader); creature.shortcutDelay = reader.ReadInt32(); /*int len = reader.ReadInt32(); * for (int i = 0; i < len; i++) * { * if (i < creature.grasps.Length && creature.grasps[i] != null) * { * creature.grasps[i] = GraspHandler.Read(ref creature.grasps[i], creature, ref reader, creature.room); * } * else * { * Creature.Grasp grasp = GraspHandler.Read(creature, ref reader, creature.room); * if (i < creature.grasps.Length && grasp != null && grasp.grabbed != null && grasp.grabber != null) * { * MonklandSteamManager.Log("Grabbed Rock!"); * (creature as Player).switchHandsCounter = 0; * ((creature as Player) as patch_Player).setWantToPickUp(0); * (creature as Player).noPickUpOnRelease = 20; * if (creature.grasps[i] != null) * { * creature.ReleaseGrasp(i); * } * creature.grasps[i] = new Creature.Grasp(creature, grasp.grabbed, i, grasp.chunkGrabbed, grasp.shareability, grasp.dominance, grasp.pacifying); * grasp.grabbed.Grabbed(creature.grasps[i]); * new AbstractPhysicalObject.CreatureGripStick(creature.abstractCreature, grasp.grabbed.abstractPhysicalObject, i, grasp.pacifying); * } * } * }*/ return(creature); }