Closed JJJohan closed 5 years ago
I checked it out, looks good! I want to merge this. However I had to make one small modification. I see you added an Instance property to the CacheManager which sets itself on Start(). This won't work on my machine (tm), the CacheManager Start() is not executed until later, so the RoadManager tries to invoke something on CacheManager.Instance which is null. This causes a race condition, maybe this works better for you but not here.
I removed the Instance property and went back to the way it was, just querying for the CacheManger in the RoadManager with GameObject.FIndObjectOfType
Can you make this modification and submit the pull request again? I could do it but then I can't use the shiny green "Merge" button above :)
No problem.
Also wanted to say the radio playback seems to work very well for me. So far it's respecting the order, and there's no clicking issues as mentioned for the other sound effects (although I suspect I messed something up there) and they actually drop right in - when I set the player's health to 0 the mission state machine, out of the box, handled playing the death scream which was a pleasant surprise.
Added a Radio Manager, and updated the FSMActionDelegator to support cbPrior, stopCB and isCbEmpty actions (there's also cbFrom, cbFromPrior and cb - not sure what the differences are yet)
Updated InputManager to ignore car input while a cutscene is active.
Small cleanup to the gizmo drawing of the AI pathfinding so we don't try and draw mystery paths when there's no actual waypoints set for the AI, whoops!
Added a Camera Manager (one level higher than Camera Controller) that correctly deals with camPush and camPop actions (so that the player's first/third person camera persists after cutscenes etc.)
Load all damage levels of car in third person.
Added a test key to kill the player (K). This changes the player to the wreck model and plays the explode sound effect. No fire yet!
Changed FSMRunner to use LateUpdate instead of FixedUpdate so the cars don't appear to 'stutter' during cutscenes.
Added a small fix to the MSN parser to fix a crash when loading multiplayer missions on the GoG version of the game. There is a small change in the release version of the game and the patched one:
Original game, empty FSM (bunch of 0 length integers): FSM 0 (action table length) 0 (entity table length) 0 (sound clip table length) 0 (paths length) 0 (stack machines length) 0 (constants length) 0 (byte code length) EXIT
Patched game, empty FSM: FSM EXIT