Page MenuHomeFeedback Tracker

Stamina Modifiers Not Resetting Correctly (1.08)
Need More Info, UrgentPublic

Description

When holding breath, the stamina modifier is now using a exponential function for holding breath.
The sm.GetStartTime() doesn't update when another stamina modifier is being used (before the cooldown timer executes).

Default behavior sm.GetStartTime() is being updated after every time when stamina is released (cooldown timer exectutes)
https://gfycat.com/DeadlyEveryAtlanticblackgoby

Bugged behaviour sm.GetStartTime() doesn't get updated
Holding breath for the first time:
https://gfycat.com/WelltodoHorribleGyrfalcon
Holding breath later:
https://gfycat.com/LegalFirsthandCollardlizard

Details

Severity
Minor
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
General
Steps To Reproduce
  1. Hold breath
  2. Quickly Sprint / jump (use any other stamina modifier (depleteStamina)
  3. Hold breath again
  4. The stamina modifier for holding breath was not reset
Additional Information

DEBUG code used in the example / video
`
override void DepleteStamina(EStaminaModifiers modifier, float dT = -1) {

		super.DepleteStamina(modifier,dT);
		
		StaminaModifier sm = m_StaminaModifiers.GetModifierData(modifier);

		print("mod: " + modifier + " s:" + sm.GetStartTime());

};
`

I think this is the issue;

The code in staminahandler which resets the starttime and set in use for stamina modifiers:
https://i.imgur.com/w0Zh5Eh.jpg

Every time the depletestamina function runs, the modifier of which to run the cooldown for is overwritten.
m_CooldownTimer.Run(time, this, "ResetCooldown", new Param1<int>( modifier ));

This happens because timer function Run, overwrites and doesn't stack the functions/params:
https://i.imgur.com/4S0NFUu.jpg

This causes the following code not to run for the hold breath stamian handler
`

			sm.SetStartTime(-1);
			sm.ResetRunTime();
			sm.SetInUse(false);

`

Event Timeline

nigel created this task.Jun 26 2020, 7:02 PM
Geez changed the task status from New to Assigned.Jun 29 2020, 11:20 AM
Geez changed the task status from Assigned to Need More Info.Jan 8 2021, 9:56 AM
Geez added a subscriber: Geez.

Hello nigel.
This issue should be possibly fixed now. Can you please let us know?
Regards,
Geez