Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix glide_gib_lifetime not respecting 0 #26

Merged
merged 2 commits into from
Dec 28, 2024
Merged

Conversation

DrVrej
Copy link
Contributor

@DrVrej DrVrej commented Dec 28, 2024

Convar glide_gib_lifetime states Lifetime of Glide Gibs, 0 for no despawning. however it doesn't actually respect the value of 0 due to how it's setup on initialize, this simple commit fixes it.

@wrefgtzweve
Copy link
Contributor

0 is checked here

if t > self.lifeTime and self.lifeTime ~= 0 then

@DrVrej
Copy link
Contributor Author

DrVrej commented Dec 28, 2024

0 is checked here

if t > self.lifeTime and self.lifeTime ~= 0 then

I know however it doesn't respect it because on initialize it's adding RealTime(), I tested this locally and setting the convar to 0 will make the corpse/gib instantly disappear.

@wrefgtzweve
Copy link
Contributor

Yeah you're right, you can probably remove the original self.lifeTime ~= 0 check then.

@DrVrej
Copy link
Contributor Author

DrVrej commented Dec 28, 2024

The check must stay there otherwise it will be removed instantly as 0 will be smaller than RealTime()

@DrVrej
Copy link
Contributor Author

DrVrej commented Dec 28, 2024

I applied a small optimization to it as there was no need for it to check against RealTime() constantly if the convar was set to 0

@StyledStrike StyledStrike merged commit fd022f0 into StyledStrike:main Dec 28, 2024
1 check passed
@StyledStrike StyledStrike added the bugfix Fixes issues label Dec 28, 2024
@StyledStrike
Copy link
Owner

Looks good to me, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants