8,451 Commits over 2,131 Days - 0.17cph!
Gang warfare test mode mostly working
Join gangs correctly, spawn in gang buildings
Got gang safes working as they used to
Gang warfare mode fallback for scenes with no gangs
Got gangs to serialize and deserialize correctly to clients. Gangs were overriding their NetworkEntityBehaviour ID with a custom gang ID, which meant the server wouldn't match the client, and the deserialize mask would stop it deserializing. Moved the gang ID to a separate var.
A potential fix for the spawn issue
Undone fix testing something
Add gang members properly
We have a problem where Gangs deserialize before their members, which means they aren't found when their IDs come though. I started fixing this by making gangs just reference members by ID, and it kinda works, but there end up being too many calls to get the member objects anyway - in effect just moving the problem around. Going to solve it a different way but saving this partial work first.
Gang member structure edit
Been trying some more gang stuff
Got rid of the NetworkGameMode singleton option. Better to integrate it with NetworkPeer. But I don't like how there's a short time where NetworkPeer exists and NetworkGameMode isn't assigned yet - need to think about options there.
FINALLY got gang members synchronising properly. Added gang member NetworkUsers as referenced entities for the gangs. On top of that, we needed to delay the member stuff that was in Deserialize until OnPostDeserialize because:
- User entities need to be deserialized and ready so we can use FindUser to find them by ID.
- Gangs set their members as Referenced entities so that they're sent along with the gang, making sure they're available.
- So everything gets deserialized, but the base thing (gang) gets deserialized first, so the members still aren't ready.
- OnPostDeserialize isn't called until after ALL referenced entities are deserialized, so it now works.
Fixed another gang member bug. And there's one more to come.
Fixed gang leader serialization. With any luck, gang sync is now good.
Gang warfare test mode edit - Leave gang on death. Plus NetworkGameMode method work.
Wrote a possibly stupid event class. Will think about this better on Monday.
UI work separating game mode client UI from server triggers. Moved game mode stuff to its own namespace.
Did some dumb things, fixing them up to make sense here. Also discovered why King Of The Hill UI scores broke in the first place - it was a bug with empty strings in the networking system. Tried to do a proper fix, but ended with a workaround fix.
Bots are a bit more likely to jump off plane
Change "didn't expect a Deserialize after Init" from error to warning
Fixed bugs on clients for players dying while in a vehicle
Fix issues that occurred if a character was synced to a client when already dead, and the NetworkEntity was destroyed before init completed. Happened fairly reproducibly on game modes with lots of characters dying frequently, like zombie mode (with zombies dying).
Needed some IsUnityNull() checks to replace simple null checks in interfaces that could be MonoBehaviours
Might have fixed the spectating bugs. There was an issue where the spectator entity didn't get destroyed on disconnect. The player would spawn a new character in a new round, but still have their spectator entity as well, which would grab the camera.
Never spectate disconnected players
Get rid of the loading screen slide animation
Weapon view punch is back. Not really doing much though, need to tweak it.
Going back though the repo, the later version of view punch never quite worked, but it looks like this is how it was MEANT to work.
Not sure why inaccuracy delta would use mag size, so reverting al ine to Bill F's original version.
Physics mats for my test map, so I can test stuff with decals
Building manager now caches at game load rather than level load. Needs testing.
Switched my singleton classes back to my old system of sub-methods - the WiseGuys-style virtual method override system was too risky in terms of requiring the user to know they had to call base.Method.
Weapon inaccuracy + recoil + view punch work.