You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The NW2 System seems to break clientside, if you create the same entity twice but delayed by a few ticks and then creating an Entity that is based on that entity.
I don't know how to describe it the best, but it seems like the Client gets somehow confused with the NW2 Vars, and starts screwing them up. The example provided shows the Entity class changing and the same NW2Var getting updated multiple times clientside. It can also happen that the NW2Vars of other entities get set on the Bugged one, or the other way around.
This Bug won't exist, if you host the server. (But only for you.)
Steps to reproduce
Files needed
You can create all files yourself, or you could just download the folder from this repo
entities/testing.lua
ifSERVERthenAddCSLuaFile() endENT.Type="anim"functionENT:NW()
self:SetNW2String("Baum", "Haus")
self:SetNW2Int("Hi", 1)
endfunctionENT:Initialize()
self:SetModel("models/props_junk/PlasticCrate01a.mdl")
self:NW()
end
entites/testing_2.lua
ifSERVERthenAddCSLuaFile() endENT.Type="anim"ENT.Base="testing"functionENT:NW()
self:SetNW2String("Test2", "NW2-Bug")
end
Five seconds after spawning, you're going to see something like this in your console:
Entity [85][testing] BaumnilHaus-- First EntityEntity [85][testing] Hinil1Entity [89][testing] BaumnilHaus-- Second EntityEntity [89][testing] Hinil1Entity [90][testing_2] Test2nilNW2-Bug-- Fist Entity based of the testing EntityEntity [85][testing_2] Test2nilNW2-Bug-- Second Entity based of the testing Entity. (This one will break)Entity [85][testing] BaumnilHausEntity [85][testing] Hinil1Entity [85][testing_2] Test2nilNW2-BugEntity [85][testing] BaumnilHausEntity [85][testing] Hinil1Entity [85][testing_2] Test2nilNW2-BugEntity [85][testing] BaumnilHausEntity [85][testing] Hinil1Entity [85][testing_2] Test2nilNW2-Bug
The text was updated successfully, but these errors were encountered:
It should be noted that hosting a local server and then connecting to the server allows you to easily reproduce it.
Maybe this makes it easier to find the cause.
Details
The NW2 System seems to break clientside, if you create the same entity twice but delayed by a few ticks and then creating an Entity that is based on that entity.
I don't know how to describe it the best, but it seems like the Client gets somehow confused with the NW2 Vars, and starts screwing them up. The example provided shows the Entity class changing and the same NW2Var getting updated multiple times clientside. It can also happen that the NW2Vars of other entities get set on the Bugged one, or the other way around.
This Bug won't exist, if you host the server. (But only for you.)
Steps to reproduce
Files needed
You can create all files yourself, or you could just download the folder from this repo
entities/testing.lua
entites/testing_2.lua
autorun/bug.lua
Five seconds after spawning, you're going to see something like this in your console:
The text was updated successfully, but these errors were encountered: