Skip to content

fix(logic): natives (#29), fakeclients (#30) - #31

Merged
Rushaway merged 1 commit into
masterfrom
Rushaway-patch-1
Mar 27, 2026
Merged

fix(logic): natives (#29), fakeclients (#30)#31
Rushaway merged 1 commit into
masterfrom
Rushaway-patch-1

Conversation

@Rushaway

@Rushaway Rushaway commented Mar 27, 2026

Copy link
Copy Markdown
Member

Summary

This PR fixes two bugs affecting the ThirdPerson plugin's reliability:

Fix: Swapped native return values (#29)

Native_Mirror was returning g_bThirdPerson[client] and Native_ThirdPerson
was returning g_bMirror[client] — both were inverted. This caused any plugin
relying on these natives to receive incorrect state values.

Fix: Fakeclient guard on SendConVarValue (#30)

SendConVarValue was being called unconditionally in MirrorOn and MirrorOff,
including for bots (fake clients) which do not have a network connection.
This could lead to runtime errors or unexpected behavior on servers with bots.
Both calls are now wrapped in an !IsFakeClient(client) check.

Fix: Missing reset of g_bMirror in OnClientPutInServer

g_bMirror[client] was not being reset to false on client connect, unlike
g_bThirdPerson. This could leave stale state from a previous occupant of
the same client slot.

Version bump: 1.3.4 → 1.3.5

@Rushaway
Rushaway merged commit fd564d7 into master Mar 27, 2026
6 checks passed
@Rushaway
Rushaway deleted the Rushaway-patch-1 branch March 27, 2026 16:15
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.

1 participant