From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wi0-f176.google.com ([209.85.212.176]) by ur; Sun Aug 16 15:58:18 EDT 2015 Received: by wicne3 with SMTP id ne3so59533693wic.1 for <9front@9front.org>; Sun, 16 Aug 2015 12:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=az5e3nQuCCjRPVoEFIOpJmnRshNuW5UZ5ycHbmlfkjU=; b=YAA/ogaZmjwC3XCArJmbuwbptB422PaFvHkh1N80V+4Jm9EAWuIDYyKZB56auZuStD Po9rFmeAuwUhh+rqxEI7ysYPgydrQ/OpohQttPjZjJ5rfJj2AEMsS5N6F1e1J0415igS TwIg6jj9b8nEcI04fZEaHZh831wd7zMTAf4mjQPwKQmxdjaCTn9345phB3Ey+KNERtfB d11N0jdNEG2sf4QtYJeUQ0BkEND9qA1uB0yufILnGZXdkkaWsUiJfDIgbuj9auMtmxrf ihPznYOvBTKaWpD8fgRhVa34VTmcF4Oeyud51AVnwpcFp6WMVMwIgXAgYOrp9IXRWx1k Ixgw== MIME-Version: 1.0 X-Received: by 10.180.99.71 with SMTP id eo7mr28032549wib.25.1439755094888; Sun, 16 Aug 2015 12:58:14 -0700 (PDT) Received: by 10.28.229.135 with HTTP; Sun, 16 Aug 2015 12:58:14 -0700 (PDT) Date: Sun, 16 Aug 2015 22:58:14 +0300 Message-ID: List-ID: <9front.9front.org> X-Glyph: ➈ X-Bullshit: WEB2.0 over YAML DOM hardware Subject: games/doom: fix unterminated comment causing sound bugs From: qux To: 9front@9front.org Content-Type: text/plain; charset=UTF-8 games/doom: fix unterminated comment causing sound bugs this bug was introduced in the plan9 port, and since i_sound.c compiles with no warning, it was never noticed. in effect, the statement between the unterminated comment and the next is ignored. channelids[] is used in addsfx() to avoid re-adding certain sounds if they are already playing. one of those is sfx_sawful, and because of this bug, it is added again each tic during which the player fires the chainsaw, rather than reset every tic. compare firing the chainsaw continuously with and without the patch (without hitting an enemy). diff -Naur a/sys/src/games/doom/i_sound.c b/sys/src/games/doom/i_sound.c --- a/sys/src/games/doom/i_sound.c Wed Jul 29 13:45:35 2015 +++ b/sys/src/games/doom/i_sound.c Sun Aug 16 19:38:41 2015 @@ -430,6 +430,7 @@ /* Preserve sound SFX id, ** e.g. for avoiding duplicates of chainsaw. + */ channelids[slot] = id; /* You tell me. */