Anonymous | Login | 2024-11-21 11:34 CET |
Main | My View | View Issues | Change Log | Roadmap | My Account |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0000213 | Soldat Dedicated Server | Scripting Core | public | 2012-05-19 02:02 | 2012-06-23 21:00 | ||||||||
Reporter | JotEmI | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||||
Status | acknowledged | Resolution | open | ||||||||||
Platform | i386 | OS | Debian GNU/Linux | OS Version | 6.0 | ||||||||
Product Version | 2.7.3 | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0000213: GetKeyPress() not working properly | ||||||||||||
Description | I've already mentioned it on the forums.soldat.pl. GetKeyPress() seems to always return false (at least for the "throw" key) when called inside OnWeaponChange event. Quote from forums.soldat.pl: [code] const Msg=$FFFF9922; procedure AppOnIdle(Ticks: integer); begin if(GetKeyPress(1,'Throw')=true)then begin WriteConsole(0,'Throw key pressed (AppOnIdle)!',Msg); end; end; procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: Byte); begin WriteConsole(0,'In OnWeaponChange!',Msg); if(GetKeyPress(ID,'Throw')=true)then begin WriteConsole(0,'Throw key pressed (OnWeaponChange)!',Msg); end; end; [/code] The one in AppOnIdle does seem to work but GetKeyPress() in OnWeaponChange always returns false. I've added a little debug info to check whether pressing the throw key calls OnWeaponChange and it does. One more strange thing. If you have no weapon (thus OnWeaponChange won't be called) and press and hold the throw key the message in AppOnIdle will spam every second, which is correct. But if you got a weapon, press and hold the throw key (calling OnWeaponChange) you will only get one or zero messages from AppOnIdle. Like somehow after OnWeaponChange() result of GetKeyPress() is set to be always false. | ||||||||||||
Tags | No tags attached. | ||||||||||||
John | |||||||||||||
Attached Files | |||||||||||||
Issue History | |||
Date Modified | Username | Field | Change |
2012-05-19 02:02 | JotEmI | New Issue | |
2012-06-23 21:00 | Falcon | Status | new => acknowledged |
Copyright © 2000 - 2024 MantisBT Team |