2,811 Commits over 1,918 Days - 0.06cph!
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.
Needed some IsUnityNull() checks to replace simple null checks in interfaces that could be MonoBehaviours
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).
Fixed bugs on clients for players dying while in a vehicle
Change "didn't expect a Deserialize after Init" from error to warning
Bots are a bit more likely to jump off plane
Wrote a possibly stupid event class. Will think about this better on Monday.
Gang warfare test mode edit - Leave gang on death. Plus NetworkGameMode method work.
Fixed gang leader serialization. With any luck, gang sync is now good.
Fixed another gang member bug. And there's one more to come.
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.
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.
Gang member structure edit
Add gang members properly
Undone fix testing something
A potential fix for the spawn issue
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.
Gang warfare mode fallback for scenes with no gangs
Got gang safes working as they used to
Join gangs correctly, spawn in gang buildings
Gang warfare test mode mostly working
Working on adding a gang warfare game mode for testing gangs
Fixed menu clicks not swallowing input
Working on getting gang support back in
Trello task complete: Game modes can define their own colour correction.
Plus added callbacks to game mode creation + round start + round end.
Trello task complete: Show game state when in pre-game wait
Fixed loading screen glitch when there was no image
Game menu options can be added and removed per game mode
Give WiseGuysTools two scene quickslots so it's easy to switch between them
New loading screen background image
Added support for custom loading screen images for game mode.
Got payer characters to de destroyable without ragdoll etc as well.
NPCs don't generate ragdolls at end of round anymore either
Got rid of vehicle wreckage at end of round