// initialize jwplayer var playerInstance = jwplayer('player'); // player dom elements var playerContainerEl = document.querySelector('.player-container'); // returns video player position from top of document function getElementOffsetTop(el) { var boundingClientRect = el.getBoundingClientRect(); var bodyEl = document.body; var docEl = document.documentElement; var scrollTop = window.pageYOffset || docEl.scrollTop || bodyEl.scrollTop; var clientTop = docEl.clientTop || bodyEl.clientTop || 0; return Math.round(boundingClientRect.top + scrollTop - clientTop); } // returns the current y scroll position function getScrollTop() { var docEl = document.documentElement; return (window.pageYOffset || docEl.scrollTop) - (docEl.clientTop || 0); } // configure jwplayer instance playerInstance.setup({ autostart: true, playlist: 'https://cdn.jwplayer.com/v2/playlists/mYdavspX', primary: 'html5', setFullscreen: true, width: '100%' }); // when jwplayer instance is ready playerInstance.on('ready', function() { var config = playerInstance.getConfig(); var utils = playerInstance.utils; // get height of player element var playerHeight = config.containerHeight; // flag determining whether close has been clicked var closed = true; // CHANGED // flag determing whether player is playing var playing = false; // ADDED // eventhandler for when close button is being pressed document.getElementsByClassName('icon-close')[0].addEventListener('click', () => { closed = true; onScrollViewHandler(); }); playerInstance.on('play', function() { closed = false; playing = true; // ADDED }).on('pause', function () { playing = false; // ADDED }).on('adPlay', function() { closed = false; // ADDED playing = true; // ADDED }).on('adPause', function() { playing = false; // ADDED }); // get player element position from top of document var playerOffsetTop = getElementOffsetTop(playerContainerEl); // set player container to match height of actual video element playerContainerEl.style.height = playerHeight + 'px'; // below we handle window scroll event without killing performance function onScrollViewHandler() { var minimized = getScrollTop() >= playerOffsetTop; if (closed && minimized) { minimized = false; jwplayer().pause(); playing = false; // ADDED } else if (!minimized && !playing) { closed = true; // ADDED } utils.toggleClass(playerContainerEl, 'player-minimize', minimized); // update the player's size so the controls are adjusted playerInstance.resize(); } // namespace for whether or not we are waiting for setTimeout() to finish var isScrollTimeout = false; // window onscroll event handler window.onscroll = function() { // skip if we're waiting on a scroll update timeout to finish if (isScrollTimeout) return; // flag that a new timeout will begin isScrollTimeout = true; // otherwise, call scroll event view handler onScrollViewHandler(); // set new timeout setTimeout(function() { // reset timeout flag to false (no longer waiting) isScrollTimeout = false; }, 80); }; });

When some original gameplay leaked for Call of Duty: Modern Warfare Remastered on Thursday, many fans started to notice and ask about why the sniper ADS looked different and why it was changed. We spoke with Raven Software’s Studio Director, David Pellas, who confirmed that the team did in fact change the animation, but they only changed the animation.

We are identical in timing in ADS, to the 100 millisecond. But we have also made improvements to them so that visually it looks more modern, so that they act and behave the way gamers expect them too.

The team worked extremely hard to retain the exact same timing that matches the original Modern Warfare game, but a new animation to match the updates that they have made across the entire game.

For the ADS, if you guys have been paying attention to social media, the ADSing for the sniper, for example, is a good example in that we used to have an animation that used to move about a point a quarter of the way up and then just popped up to a screen overlay. And I agree that that’s classic, however, when we did that, when we put it in there, it did not look good. It really looked dated, and it didn’t feel like it belonged in this modern space with this game, especially with all of the other improvements we made along the way.

So what we did was we figured out what the timing was for that ADS and said ‘we cannot deviate from our limit’. And we created the animation that moves up and it feels more natural cause you are connected to your weapon. And it still pops! You’ll notice it at the last minute, it’ll still pop because we felt that that was an important part of it but we ended up doing a more animation into that.

Pellas really focused on the fact that the team at Raven insured there was no changes to the timing, but they changed the animation to match the rest of the game. Another animation change you will notice in the Remaster is the mantling. Once again, the timing for it is the exact same, but your character’s hand now comes up and shows it being pushed off the object to feel more natural to the game.

comments below