View Issue Details

IDProjectCategoryView StatusLast Update
0005928The Dark ModCodingpublic27.03.2022 14:26
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeveritynormalReproducibilitysometimes
Status resolvedResolutionfixed 
Product VersionTDM 2.10 
Target VersionTDM 2.11Fixed in VersionTDM 2.11 
Summary0005928: Save game while bow is strung yields broken bow on fresh load
DescriptionSometimes bow enters such a state that trying to shoot it results in bow-release animation immediately.
As the result, you cannot shoot it.
Steps To Reproduce1) Select broadhead arrows.
2) String the bow and hold it.
3) Close TDM completely and state afresh.
4) Load savegame.
5) Try to shoot the bow (it fails).

If you select another weapon, then switch back --- than it works.
Also, after that it works even if you load the same game again.
Additional InformationReported by vozka:
  https://forums.thedarkmod.com/index.php?/topic/21345-210-crashes-may-be-bow-frontend-acceleration-related/&do=findComment&comment=472026
  https://forums.thedarkmod.com/index.php?/topic/21345-210-crashes-may-be-bow-frontend-acceleration-related/&do=findComment&comment=472248
TagsNo tags attached.

Activities

stgatilov

stgatilov

27.03.2022 13:43

administrator   ~0014785

Attached vozka's savegame for TDM 2.10 on "version 2" of Black Mage FM.
savegames.zip (2,382,118 bytes)
stgatilov

stgatilov

27.03.2022 13:48

administrator   ~0014786

In the following script code (weapon_arrow::Fire):
    //Set the time the player will get tired in
    current_time = sys.getTime();
    draw_start = current_time;
    draw_end = current_time + c_arrow_tired;
it turns out that c_arrow_tired = 0, hence the player gets tired immediately when you start shooting.

The reason is the "debug" flag which is for some reason turned on.
It saves all the constants into cvars (terrible hack!) when you select weapon, then loads all of them back every time you fire.
Obviously, that was done to simplify tweaking of the constants: it would be much better to more the constants into cvars completely though...
Note that cvars are not saved into savegame, but they persist if you load another save or restart current map.
So when we load the savegame afresh, cvars are missing, hence all constants are reset to zero on the next shot.
stgatilov

stgatilov

27.03.2022 14:25

administrator   ~0014787

Actually, the debug flag is turned on since initial commit 128 in year 2005 =)
stgatilov

stgatilov

27.03.2022 14:26

administrator   ~0014788

Fixed in svn rev 16482.

Issue History

Date Modified Username Field Change
27.03.2022 13:42 stgatilov New Issue
27.03.2022 13:42 stgatilov Status new => assigned
27.03.2022 13:42 stgatilov Assigned To => stgatilov
27.03.2022 13:43 stgatilov Note Added: 0014785
27.03.2022 13:43 stgatilov File Added: savegames.zip
27.03.2022 13:48 stgatilov Note Added: 0014786
27.03.2022 14:25 stgatilov Note Added: 0014787
27.03.2022 14:26 stgatilov Note Added: 0014788
27.03.2022 14:26 stgatilov Status assigned => resolved
27.03.2022 14:26 stgatilov Resolution open => fixed
27.03.2022 14:26 stgatilov Fixed in Version => TDM 2.11