db0 / godot-card-game-framework

A framework which comes with prepared scenes and classes to kickstart your card game, as well as a powerful scripting engine to use to provide full rules enforcement.
http://dbzer0.com/projects/godot-card-game-framework/
GNU Affero General Public License v3.0
948 stars 100 forks source link

Resizing window can lead to crash #133

Closed ForGorNorPor closed 3 years ago

ForGorNorPor commented 3 years ago

Resizing the game window to the smallest width results in a crash when having a full hand. This happens in the function _get_oval_angle_by_index in line 2207 card_angle= rad2deg(atan(- ver_rad / hor_rad / tan(deg2rad(angle)))) because hor_rad is 0.

db0 commented 3 years ago

I just tried it myself, but I couldn't get it to crash. How exactly did you resize the game window? Also, which OS?

ForGorNorPor commented 3 years ago

The repro on my machine is:

  1. Run game from editor via F5
  2. Repeatedly click on the card stack in the lower left corner until you have the maximum of cards
  3. Drag the right window edge over to the left as far as you can

OS: Win 8.1

db0 commented 3 years ago

Great (or not so great 😄)! I can reproduce it now