branchrust_reboot/main/shieldscancel
102 Commits over 153 Days - 0.03cph!
Fix shield viewmodel getting culled when offscreen
Fixed blocking state getting reset every tick
Cleanup
Show damage protection % when inspecting shields in the inventory
Set some starting values per shield for testing
Added indicators to the item information panel if a wepaon is compatible with shields
Move the shield to the back while reloading a projectile weapon
Recache the viewmodel renderers
Added a deploy delay so the player can't block immediately while the deploy anim is playing
Added melee and ranged shield impact slots to player model and viewmodel animators
Can no longer sprint while blocking with a shield
Fixed blocking flag not being applied on server
Added ShieldBlocking state to hands layer (inside Idle_StateMachine)
Show the current shield health with the health/hunger/vitals
Move the player vitals into a FlexLayout, remove a bunch of hardcoded layout code as a result
Fixed shields not getting properly initialised when using spawn.shielddummy command
Added a damage mitigation factor to all shields, shields will absorb this percentage of damage and then pass the rest of the damage onto the player.
This is applied after the Protection properties are applied, so we can still vary how different shield materials affect damage
Setup reinforced wooden shield prefab
Add melee attack state on 3rd person animator
Added admire to viewmodel animator
Added override controllers for each shield viewmodel
Hook up deploy on 3rd person shield layer
Fixed viewmodel renderers on non metal shields
Disable shield collider while the shield is on the players back
Fixed some duplicate arms
Reworked shield viewmodel coding to live on a new self contained component
Updated viewmodels with new assets
Fixed shield inputs being processed while inventory is open
Fixed shield deploying when it shouldn't if the shield was placed in the backpack slot while an incompatible held entity is equipped
Fixed holstered shields parenting to the spine bone with a 70m offset
Wooden shield variant setup
Set up improvised shield prefab variants
Added a ServerTick method to HeldEntity, called when the player is holding it
Added server side shield positioning to approximately map where the shield will be on the server to match the client (as held entities just get parented to the root on the server but we need accurate positioning for this)
Shields can now take hits from server side projectiles like auto turrets and NPC's
Some folder restructuring now that we have actual assets
Merge from main (stomp PlayerAnimation, will need to redo changes)
Fixed shields not getting OnHolster callbacks
spawn.shielddummy command can now be passed true to make the dummy holster the shield
Placeholder shield idle to fix foot IK
Fixed gibs spawning parented to the player
Reworked how we handle broken state, entity is now properly destroyed when a shield is broken rather than just becoming invisible
Added debug.breakshield convar
Drop the shield when a player dies if it's equipped (like the current held entity)
World model
Compile fixes
Fixed some parts of ADS still working when a shield is equipped
Remove shield viewmodel component, set up placeholder animator states and surface logic there instead
Player model cleanup
Added a blocking state to the 3rd person animator
Added spawn.shielddummy command that spawns a bot with a shield equipped for testing
First pass on damage logic
Shields can take hits and the hits are absorbed by the items condition
Shields can have different ProtectionProperties like a BaseCombatEntity
Shields can take hits when mounted on the back and abosrb the damage like they were held
Broken shields won't appear at all
Converted the isGestureViewmodel field on viewmodel into a new viewmodel type variable, also has a shield type
Fixes bullet casings ejecting from the players camera while a shield is equipped as well as some clothing issues
Temp model
Added a new shield hands layer to the 3p animator that only masks the left arm, just has an idle for now
Hold RMB to block with the shield (only visible in first person right now)
Cannot attack while blocking
Hide the left arm of viewmodels when a shield is active (rotated off screen)
Hide the viewmodel shield while reloading weapons
Made a simple shield viewmodel, seems to just work as expected as the shield entity is getting the correct OnDeploy/OnHolster client events
Added a shields inventory loadout for testing
Can now use M92 with shields
Can no longer ADS while a shield is equipped