View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005928||The Dark Mod||Coding||public||27.03.2022 13:42||27.03.2022 14:26|
|Product Version||TDM 2.10|
|Target Version||TDM 2.11||Fixed in Version||TDM 2.11|
|Summary||0005928: Save game while bow is strung yields broken bow on fresh load|
|Description||Sometimes 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 Reproduce||1) 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 Information||Reported by vozka:|
|Tags||No tags attached.|
Attached vozka's savegame for TDM 2.10 on "version 2" of Black Mage FM.
savegames.zip (2,382,118 bytes)
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.
|Actually, the debug flag is turned on since initial commit 128 in year 2005 =)|
|Fixed in svn rev 16482.|
|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|