Skip to content

RUS-T - #1020

Open
WarmBuns wants to merge 8 commits into
mainfrom
nemesis-mul-t
Open

RUS-T#1020
WarmBuns wants to merge 8 commits into
mainfrom
nemesis-mul-t

Conversation

@WarmBuns

Copy link
Copy Markdown
Collaborator

No description provided.

@Nebby1999 Nebby1999 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I am requesting changes regarding the NemToolbotController, i'm leaving someone else to do a health check on the entity state code, there's some networking concerns i have about the main controller.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

General comment regarding SyncVar.

SyncVar only works if you do not specify custom Networking Serialization methods (OnSerialize and OnDeserialize)

When HLAPI weaves the assembly, if it finds those methods, any fields you put syncvar manually will not be weaved automatically because it assumes youre doing some custom networking setup.

Either stay with the manual networking dirtying or stick to syncvar, but don't use both, i think that might be something that'll shoot us in the foot.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Basically, requesting change to either stick with SyncVar, or stick with custom networking handling (writing your own OnSerialize/OnDeserialize)

/// <summary>
/// Sets the current weapon. Server-only.
/// </summary>
public void SetWeapon(WeaponType weapon)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You can apply the [Server] attribute and Weaver will automatically add the Debug.LogError and then return.

_isBallForm = newBallForm;
}

public override bool OnSerialize(NetworkWriter writer, bool forceAll)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this code you decided to write from looking at HLAPI decompiled? or did you see a custom networking setup video?

Regardless, the syncvar hooks wont be called here.

/// <summary>
/// Returns the current ammo for a given weapon type. Client-readable.
/// </summary>
public int GetAmmo(WeaponType weapon)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pardon my cluelessness, but what's the difference between just Ammo and Skill Stocks?

@Nebby1999 Nebby1999 mentioned this pull request Apr 15, 2026
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