Skip to content

Commit

Permalink
disabled mouse if no controls
Browse files Browse the repository at this point in the history
  • Loading branch information
honzi committed Oct 19, 2024
1 parent f296e99 commit 88abaff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/webgl.js
Original file line number Diff line number Diff line change
Expand Up @@ -821,10 +821,14 @@ function webgl_controls_mouse(id){
if(level < -1){
return;
}
const controls = webgl_characters[id]['controls'];
if(controls.length === 0){
return
}

if(core_mouse['pointerlock-state']
|| core_mouse['down-2']
|| (core_mouse['down-0'] && webgl_characters[id]['controls'] !== 'rts')){
|| (core_mouse['down-0'] && controls !== 'rts')){
if(level !== -1 && webgl_properties['paused']){
return;
}
Expand Down

0 comments on commit 88abaff

Please sign in to comment.