Skip to content

fix(logic): Simplify timer management - #22

Merged
Rushaway merged 1 commit into
masterfrom
Rushaway-patch-1
Aug 7, 2026
Merged

fix(logic): Simplify timer management#22
Rushaway merged 1 commit into
masterfrom
Rushaway-patch-1

Conversation

@Rushaway

@Rushaway Rushaway commented Aug 7, 2026

Copy link
Copy Markdown
Member

Prevent SM 1.13 compilation error: void result cannot be used in an expression
delete already check if it's valid and set it to null.

Copilot AI lite review requested due to automatic review settings August 7, 2026 08:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the WeaponCleaner SourcePawn plugin to avoid a SourceMod 1.13 compilation error by simplifying timer cleanup logic to use delete (which safely handles invalid/null handles) instead of CloseHandle() in a boolean expression.

Changes:

  • Bump plugin version from 2.2.3 to 2.2.4.
  • Replace if (g_hTimer != INVALID_HANDLE && CloseHandle(g_hTimer)) ... with delete g_hTimer; in OnMapStart() and OnMapEnd().

@Rushaway
Rushaway merged commit 76c2c90 into master Aug 7, 2026
7 checks passed
@Rushaway
Rushaway deleted the Rushaway-patch-1 branch August 7, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants