branchwiseguys/main/Network_Refactorcancel
129 Commits over 31 Days - 0.17cph!
Change load order so city stuff that's spawning can use the managers.
Spawn points work again + some other work.
Working on per-level scripting stuff. Looks like lots of changes but a lot of it is renaming.
Fixed gun issues stemming from itemcontainer deserialization
Fixed problems with helditem spawning
ItemManager and everything that uses it converted to the new ServerClientSingleton. HeldItems not showing up anymore, need to work out why.
You can use ItemManagerClient or ItemManagerServer calls if you KNOW method calls will be be server or client origin specifically. If you're not sure which it'll be called from, methods in the base class let you pass an isServer bool.
Reducing the server/client split singleton types to one for simplicity. This should be enough for now at least. In summary:
- The old singleton types are fine if you're only going to have one even in listen server mode
- If you're going to have one on client and another of the same type on server, use ServerClientSingleton
New singleton classes that support two copies of the same singleton on listen servers, one for server and one for client.
Collision masking for twin entities.
Fixed some deserialization errors.
Fixing up errors in C/S only modes. Unfortunately means a few #if defines are back in for now.
Revert my serialization changes to health and belt as they seemed to break things. Not sure why yet.
More stuff. Things a bit broken right now
Character state send (see Character.Server changes). Still need to update it to not use the ProtoBuf-based CharacterState object.
Moe conversion. Belt seems to be broken in particular. I can send 236 bytes out and only get 2 bytes back. Not serializing to ItemContainer sub-entity maybe?
Connection token provider.
Character interface stuff
Needed to add some #if SERVER flags around serializing to remove errors when in Client-only mode. We may be able to remove these later. Also fixed a bug in SingleUserInteractableEntity.
Character still has a bunch to do but not kinda works. You can walk around. Switching the default spawn to character instead of spectator.
Character conversion work. See notes above 'Action subLateUpdate' in Character.cs for more info.
Ported the rest of the serialization methods. all untested.
Converted PlayableCharacterInventory
Converted PlayerBelt (untested)
Undone some item serialization
Actually revert that commit for now because it breaks things in client/server only modes.
More character conversion work
- Work on Character, not completed yet
- Moved NetworkEntity back out of its (accidental?) sub-folder, fixing all the missing NetworkEntity references in the project
- Took some stuff out of GameModeUniversal that's now loaded separately by Bill's system
Add the csproj files for the new code generator. I think these were missed because Plastic was set to ignore *.csproj files, but the code gen won't run without them. I've stolen these from the test project.