13,135 Commits over 2,800 Days - 0.20cph!
Merge TrainWorkContinued -> Main
Trains now check for available space BEFORE spawning, and try a new position if needed
Updated wagon gibs to the new wagon colours
Fixed up gibs for WagonA/WagonB/WagonC
Added death screen names and icons for modular car deaths, and for snowmobile deaths
Added missing train entity in death screen list
- Added death screen icons and names for all the new train components.
- Fixed a couple of bugs with train wagon gibs.
OnPostFill virtual method fix
Spawn some extra train engines if there aren't enough to fill all sidings
Spawn one train engine at every siding before moving on to spawning the rest of them randomly. At low spawn populations, there may still not be enough engines to have one per siding
Merge Main -> TrainWorkContinued
Merge TrainWorkContinued -> Main (general bug fixes)
Code review: Added divide-by-zero check.
Code review: Save GC with orePlaneRenderers.
Merge Main -> TrainWorkContinued
Disable the ore plane gameobjects when the transform scale is at zero (less efficient than disabling just the renderers, but since there are multiple LODs this keeps it simple)
Merge MoreTrainFixes -> TrainWorkContinued
Added traincar.decayminutes and traincarunloadable.decayminutesafterunload convars for decay times
Fixed not being able to enter the locomotive's rear door on upward inclines
Fixed wagon unload animation not ending if the wagon moved away from the vacuum while being unloaded
Additional null check in SpaceIsClear. Fixes NRE when a train spawns inside a collider which isn't an entity
Improved wagons flying away too fast when uncoupled, or after collisions
Fixed two situations where train cars would end up with the reverse of the speed they should have after coupling or uncoupling
Test map update for testing coupling/uncoupling forces
Fixed NRE spam if a train car was uncoupled while the last car in a moving train was passing under the unloader
If the current train car is unloadable, but not quite lined up right, and if it'd need to move in the specified shunt direction to be lined up, then line up the current traincar instead of moving right over to the next one
Merge WagonDecayChange -> Main
Reset decay time after unloading happens
DON'T do the faster decay on the loot wagon
Remove the usual couple-engine decay rule if the unloadable wagon is empty
Prevent emptied unloadable ore and fuel wagons from falling apart while being used in a moving train.
This required a bit of a code refactor. Instead of dying and going into corpse state, they change how they decay, which lets them stay alive longer if needed, and doesn't prevent damage from players destroying them in a moving train.
Fixed server-side unloadable wagons not setting the ore collider height correctly after loading from save.
Fixed 'fixcars 1' admin wagon unloading also not setting the server-side collider correctly.
Removed unnecessary Flag_HasLoot.
Fixed several bugs with wagon vehicle_world colliders
Unfortunately, one more fix for coaling tower loot wagon detection
One more fix for checking the parent of the loot crates
Fixed coaling tower not detecting loot wagons well after
73343. Look at the parent entity.
Fixed incorrect collision layers for vehicle use on the loot wagon crates. Sometimes during high-speed collisions between a train and a loot wagon, this would cause the train to think the crates were a static object and cause the train to come to a complete stop.
The TrainCar SpaceIsClear check now also ignores colliders on child entities, since otherwise it would now detect the crates as objects in the way.
Fixed loot wagon only showing as 1/3 full
GameUI prefab. No changes, but my earlier change to GameTip formatting has made the GameUI prefab want to adjust slightly
Separated Main and End colliders on the non-unloadable wagons. Fixes the coaling tower not detecting them correctly due to TriggerBase not handling multiple colliders on one object.
Disabled vertex compression on Position. Everything else still turned on.
Fixed TrainTrackSpline SetAll not copying the hierarchy value
Turned vertex compression back on
Turned vertex compression off