RUS-T - #1020
Conversation
Nebby1999
left a comment
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Pardon my cluelessness, but what's the difference between just Ammo and Skill Stocks?
No description provided.