dMZX Forums: Player movement key repeat timer is reset when the player is locked -> Archived MegaZeux Bugs -> Tracker

Jump to content

Report ID 745 Title Player movement key repeat timer is reset when the player is locked
Product Archived MegaZeux Bugs Status Fixed (Severity 2 - Fair)
Version 2.91i Fixed in 2.91j
Introduced In Version 2.80XOperating System All platforms

Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Report ID #745: Player movement key repeat timer is reset when the player is locked

#1 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,943
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 19 January 2019 - 07:27 PM

The player's movement uses its own key repeat timers for each direction that are independent from the normal key repeat functionality. In DOS versions, these timers were only reset when the arrow keys were pressed and released. In port versions, they are also reset when the player's movement is locked. This makes navigating the water in level 5 of Brotherhood much slower, and may affect other games more or less significantly.

Test: make a new world with the player at 0,0. Create a robot at 10,1 with this code. Test the board and hold the right arrow until the player has passed the robot significantly, then press 'Escape' without releasing the right arrow. In DOS versions, HORIZPLD and LOCAL will have the same value. In port versions, HORIZPLD will be 2 less than LOCAL.
: "l"
cycle 1
if not touching NORTH then "l"
lockplayer
wait for 5
unlockplayer
set "local" 0
: "l2"
* "&horizpld& &local&"
inc "local" 1
wait 1
goto "l2"


The code used by Brotherhood:
: "Loop"
lockplayer
wait for 3
unlockplayer
wait for 3
goto "Loop"


A possible fix might be to change lines 434-440 of game_update.c from
  else
  {
    mzx_world->key_up_delay = 0;
    mzx_world->key_down_delay = 0;
    mzx_world->key_right_delay = 0;
    mzx_world->key_left_delay = 0;
  }

to
  if(!up_pressed)
    mzx_world->key_up_delay = 0;
  if(!down_pressed)
    mzx_world->key_down_delay = 0;
  if(!right_pressed)
    mzx_world->key_right_delay = 0;
  if(!left_pressed)
    mzx_world->key_left_delay = 0;

"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository


Page 1 of 1  
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Replies (1 - 3)

#2 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,943
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 28 January 2019 - 10:49 PM

Updating status to: Fixed
Issue fixed in: 2.92

Fixed in GIT 654a5970.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#3 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,943
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 17 February 2019 - 11:58 PM

Issue fixed in: 2.91j
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#4 User is offline  
Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,966
  • Joined: 12-October 00
  • Gender:Male

Posted 24 February 2019 - 12:00 AM

Moving to: Archived MegaZeux Bugs


Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

0 User(s) are reading this issue
0 Guests and 0 Anonymous Users


Powered by IP.Tracker 1.3.2 © 2025  IPS, Inc.