Skip to content

Optimize transmit hook and a fix for invisible equipped weapons - #1024

Open
Ferks-FK wants to merge 2 commits into
SirPlease:masterfrom
Ferks-FK:master
Open

Ferks-FK wants to merge 2 commits into
SirPlease:masterfrom
Ferks-FK:master

Conversation

@Ferks-FK

@Ferks-FK Ferks-FK commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Title.

int iMax = GetMaxEntities();

for (int i = (MaxClients + 1); i < iMax; i++) {
if (!IsValidEntity(i)) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

IdentifyWeapon already runs this check;

if (!entity || !IsValidEntity(entity) || !IsValidEdict(entity)) {
  	return WEPID_NONE; // 0
}

@SirPlease

Copy link
Copy Markdown
Owner

Looks good otherwise, fixes a minor yet inconvenient bug while being lighter 👍

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