Cataclysm-dda: Wearing leg clothing lowers temperature

Created on 30 Jul 2020  路  14Comments  路  Source: CleverRaven/Cataclysm-DDA

Description

Wearing more pieces of clothing lowers bodypart temperature

Steps To Reproduce

  1. optionally i was in lmao shelter
  2. start the game, legs are cold, found fur trousers
  3. wear trousers
  4. legs temp drop from -60 to -90

Expected behavior

duh...
i guess the opposite to the effect mentioned above

Versioning :

  • OS: gentoo linux
  • Game Version: - terminal, 0.E-4611-ga5b97a8087
  • Ingame language: system (english)
  • Mods loaded: [dda, no_npc_food, crt_expansion, blazeindustries, aftershock, alt_map_key, no_Fungi, stats_through_kills, speedydex]

screenshots:

general state

obraz
obraz

before

obraz

afrer

obraz

(S1 - Need confirmation) Character / Player Temperature stale

Most helpful comment

There's currently a bug with setting weather on save game load.
This workaround solves the issue in my tests, but I'm not sure yet if it's the right solution:
```diff --git a/src/game.cpp b/src/game.cpp
index d581bef62e..836221693b 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -2935,6 +2935,8 @@ bool game::load( const save_t &name )
validate_camps();
validate_linked_vehicles();
update_map( u );

  • weather.set_nextweather( calendar::turn );
    +
    for( auto &e : u.inv_dump() ) {
    e->set_owner( get_player_character() );
    }
    ```

All 14 comments

What are fur trousers? We do not have them in vanilla or in-repo mods.

It seems that as soon as you load a game you get temperatures way lower than what should. Sometimes I save with a part at 25 warmth and load with the same part at -60. It makes some food "cold" or even "frozen". Maybe this isn't this issue?

What are fur trousers? We do not have them in vanilla or in-repo mods.

pardon sir, "fur pants", i also say armour and colour :smirk:
and i was reporting from memory since i was unable to access my workstation
i am updating request
ah, and due to some compilation issues i had to remove gcc warnings,
i will recompile on freshest commit and check it again, but the issue persist for at least a week now.

issue persist on
0.E-4643-gb31fb27112
as @Duck13Tales mentioned this actually may be related to saving game since i just loaded it, but this cost me my leg and arm before save so i am not sure

There's currently a bug with setting weather on save game load.
This workaround solves the issue in my tests, but I'm not sure yet if it's the right solution:
```diff --git a/src/game.cpp b/src/game.cpp
index d581bef62e..836221693b 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -2935,6 +2935,8 @@ bool game::load( const save_t &name )
validate_camps();
validate_linked_vehicles();
update_map( u );

  • weather.set_nextweather( calendar::turn );
    +
    for( auto &e : u.inv_dump() ) {
    e->set_owner( get_player_character() );
    }
    ```

i am not sure if this will not have any long term side effets
however, good call :)
i will look into it tomorrow,

Have you tried using a towel to see if the clothes are wet and thus causing the infinite wetness/cold?

Have you tried using a towel to see if the clothes are wet and thus causing the infinite wetness/cold?

it deceases the amount of cold from -61 to -31, however there is no indicator what kind of clothing is actually wet? Also fur pants were spawned inside the shelter to debug the issue so i am sure those are not wet. There may be issue that some other parts of clothing can be wet and contribute to overall coldness.
I took everything covering my legs and i still have -54, after that wearing fur pants which should provide 80 warmth, makes my leg warmer but not much, from -54 to -30, however using tower in that setup actually makes my fur pants viable (to +14). i am guessing something is wrong in how the calculations are performed?

also this is very weird that only legs are affected, torso and others are mostly ok-ish

@Ramza13 Could I request your review on the proposed patch above? You've been in the weather code recently.

So this is probably related to my weather changes. I changed the way weather is updated and I think on game load that some values aren't getting updated. I'll try to fix it.

The patch above will fix the bug but break some json functionality. No one is using that functionality right now and I am actually working on a PR that will change it all anyway so I'm not sure it matters

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it

45482 looks like the same issue, but has a save and can be reproduced.

EDIT: Probably separate.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BorkBorkGoesTheCode picture BorkBorkGoesTheCode  路  3Comments

Asmageddon picture Asmageddon  路  3Comments

Coolthulhu picture Coolthulhu  路  3Comments

2birdie picture 2birdie  路  3Comments

Coolthulhu picture Coolthulhu  路  3Comments