Ejemplo n.º 1
0
        protected virtual void OnTick()
        {
            // increment time
            _time += LogicTimer.FixedDelta;

            if (IsConnected)
            {
                _mapId = Deadlocked.GetMapId();
                bool   isInMenu  = Deadlocked.IsInMenu();
                ushort missionId = PCSX2.Read <ushort>(Deadlocked.MISSION_ID);

                // Send pad
                _cachedLocalPadUpdate.Read(Deadlocked.GetPadPointer(_logic.LocalPlayerId));
                _logic.Send(_cachedLocalPadUpdate);

                if (missionId != 0 && missionId != 0xFFFF)
                {
                    // Send player
                    _cachedLocalPlayerUpdate.Read(_logic.LocalPlayerId);
                    _logic.Send(_cachedLocalPlayerUpdate);
                }

                // Send menu
                if (isInMenu || _mapId == MapId.MainMenu)
                {
                    _cachedLocalMenuUpdate.Read();
                    _logic.Send(_cachedLocalMenuUpdate);
                }
            }
        }
Ejemplo n.º 2
0
        protected virtual void OnPadUpdate(PadUpdate pad)
        {
            // Write hook
            PCSX2.Write(Deadlocked.PAD_OVERWRITE_POINTER, (int)Deadlocked.GetPadPointer(_logic.RemotePlayerId));

            // Write to our buffer
            pad.Write(Deadlocked.PAD_OVERWRITE_BUFFER);
        }