branchrust_reboot/main/Livestock_animalscancel
128 Commits over 30 Days - 0.18cph!
Make cpu affinity a warning instead of an error
Fix "death while running" anim never playing because speed was measured after stopping
Reduce the amount and size of comments in livestock fsm, instead move them to a separate document file
Fix agent velocity not always being accurate
Merge from livestock_hotfixes
Add a deterministic mode to NPCs for tests:
- one rng generator per npc, use it everywhere there is a random draw
- infinite budget and fixed time step during AI test
- fix warp causing an agent speed spike
- fix melee / voice sens lookups not checking their age
- fix tiger / croc / grenade using deltaTime instead of fsm time, or not respecting timescale
Prevent cows from picking destinations where they will clip with each other
Rework livestock personal space
- free range cows stop reproducing even if fully bonded when herd reach a cap
- indoor / pen cows, navmesh flood fill to get their exact area in m2, and derive the need directly off that, so that all cows shows the same thing and it's stable / reacts directly to players doing building changes (it's also cheaper that what we are doing now, as we don't need to re-query just check the cache)
- this gives fast feedback and stays stable over time, so players get a better idea of if something they are doing is working or not
Make cows actually line up with troughs to eat + play the correct animation
Make a system so that we can align any animal with props without turn in place (maybe handy for cars mounting/unmounting?)
Optimize path following further following Daniel's leads:
- support full batching, serial path no longer needed even if some NPCs can swim or open doors, move requests are queued for next batch
- better use of unity's TransformAccessArray to avoid native overhead (don't set to null, do not re-build every batch instead persistent w stable identities)
- iterate forward instead of backward (ListHashSet is slower backward, + has RemoveUnordered so iterating backward to delete is not really needed)
- skip IsUnityNull checks that's no longer needed
Merge from livestock_hotfixes
FIx weird animal behaviours around food, and disable food sensing for all animals and critters that don't need it
Makes livestock docile in safezones to prevent griefing, make npc livestock buyer react properly if livestock dies / flees during conversation
Prevent cows grazing on ice / sand
Streamline NPC team system, merges the competing systems into one
Fix junkpiles not rebuilding their navmesh tiles on spawn / despawn
Fix navmesh not building properly on player roofs / conditional roof models
Fix navmesh building on top of player boats
Fix navmesh not baking properly graveyard fence and frontier bar doors
- Fix livestock and old animals going underwater
- Fix bull stuck forever in charge mode when you move to its side
- Fix bull trying to headbutt even if target is unreachable
- Fix curious cow being so curious it lets itself starve
- Reduce bull damage
- Livestock leads now behave more like horse leads, slows down the player and break around 7m
- Fix cow sometimes snapping back to idle after a graze instead of playing the exit anim
Fix TestSheepShearing.BlowBesideWool_ShearsRatherThanCuts being broken after shearing changes
Update rust native libs for all platforms
- Move navmesh save to background thread (260ms -> 0.8ms for large map)
- Instead of re-saving all tiles, append only dirty tiles at end of save, and only do a full resave when the size cap is blown
Fix inbred cows looking wrong
Only change livestock hp in 5% increment when mood increases / drops, to avoid networking full entity snapshots everytime health changes because of mood
Remove adminUI from livestock convar, it's not necessary and massively grows the string sent to admin, one of the 3 parts that caused the staging OOM (shared stringBuffer in netWrite.string becomes massive)
Re-export tests after merge from main
Merrge from main (need to regen test list, not done yet)
Commit the sheep blendshapes instead of everyone having to regenerate and cache them on asset import
- Fix each new litter having a baby named after the parent (only firstborn carries name + suffix)
- Fix failing livestock tests
Fix animals pathing through doors at monuments / being able to steer through any door by accident
Mask sheep face when shaving (only disappear when fully shaved), have shaved areas more organic looking and wavy
Reverts my changes to odds for good and bad genes, instead make white sheep the good one
Fix non-inbred cows being more solid on the whole body instead of just masking/tinting specific parts
Make bad genes more common, most sheep / cows then look generic, and good genes ones eg black sheep become rarer to find (else because of dominant good genes we get a massive majority of black sheep)
Fix sheep material looking wrong when dung gene is maxed out
Experimental livestock name localizations
Make livestock more deterministic at high timescales, to be able to run long running tests faster
Add visual rope when leading livestock, same as horses, and fix leading interaction failing intermittently
Fix sheep using old material system mixed with procedural material, fix some ragdolls don't having same material as live animal
Livestock small fixes:
- increase livestock headbutt damage, you better dodge this sideways like croc or 2 shot naked
- fix "stop leading" prompt appearing when someone else is leading the cow
- fix grazing through walls
- fix bulls attacking in safezones
- make leading bull strop fighting others
- fix calves not having father genes if father dies between conception and birth
Make autotest_run refuse when another process already holds the game server port
Make navigation tests able to catch spinning agents
Fix bull trying to headbutt unreachable players
Fix animals circling around an obstacle forever when fleeing, or around the player when charging
Add another state ping pong test
Fix pregnant cow ping ponging between curious follow and play random anim