This repository was archived by the owner on Jan 5, 2024. It is now read-only.
forked from DataRealms/CCOSS
-
Notifications
You must be signed in to change notification settings - Fork 38
Cf 143 Wounds, Attachables, Force Transfer, etc. #216
Merged
garethyr
merged 157 commits into
development
from
cf-143-refactor-remove-any-random-wounds
Feb 15, 2021
Merged
Cf 143 Wounds, Attachables, Force Transfer, etc. #216
garethyr
merged 157 commits into
development
from
cf-143-refactor-remove-any-random-wounds
Feb 15, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ith still. Minor naming change in HDFirearm to make it match.
…nd having separate break wounds for the attachable and the parent. Mostly not implemented yet though. Cleaned up terrain collision handling so there's only one member variable m_CollidesWithTerrainWhileAttached, and a helper method to organize parent atoms. Cleaned up various junk code and unused RotTarget since it didn't work/wasn't used and doesn't really make sense IMO. Removed Attach and Detach, now SetParent does what they did. It's protected access since it should only really be used by MOSRotating (which is now a Friend class of Attachable)
…ded template function and unordered_set to clean up hardcoded attachable handling while still avoiding duplicates Removed the m_DamageMultiplierRedefined flag and used -1 to define default instead Fixed various method comments and other minor stuff
… clone create. Made hardcoded attachables get set to transfer damage in INI, this property can be unset with lua. Cleaned up and slightly renamed getters for ACrab hardcoded attachables. Made lua bindings for them read/write (property name hasn't changed to match renamed getters) Generally cleaned up ACrab clone Create and ReadProperty
…uring clone create. Made hardcoded attachables get set to transfer damage in INI, this property can be unset with lua. Cleaned up and slightly renamed getters for ACDropShip hardcoded attachables. Made lua bindings for them read/write (property name hasn't changed to match renamed getters) Generally cleaned up ACDropShip clone Create and ReadProperty Added TODOs to ACrab and ACDropShip to rename some member variables when they're cleaned up
…and it can recursively deal with wounds from damage transferring or non damage transferring attachables. This applies to getting wounds, getting wound limits and removing wounds. Cleaned up MOSRotating::AddWound and completely got rid of RemoveAnyRandomWounds, GetTotalWoundCount and GetTotalWoundLimit since they're all handled better by these changes (note, ACDropship.cpp looks a little weird in git diff here for some reason) Modified lua bindings to match the new wound stuff
…AHuman head Also fixing some incorrect comments in Attachable.h
…nce its damage multiplier handling is now accounted for in MOSRotating
…tParent override now deals with reloading like they did
…ucked up Fixed bad spacing in AudioMan.h
# Conflicts: All conflicts were resolved manually, except Attachable.h and Attachable.cpp which were resolved using mine. # CHANGELOG.md # Entities/ACDropShip.h # Entities/ACRocket.h # Entities/ACrab.h # Entities/ADoor.h # Entities/AHuman.h # Entities/Attachable.cpp # Entities/Attachable.h # Entities/HDFirearm.h # Entities/MOSRotating.h
Added clear for m_AlreadyCopiedAttachableUniqueIDs in MOSRotating
…t from ACraft Added and used setters (and for legs, getters) for ACRocket hardcoded attachables, and made them all transfer damage to parent Fixed and added lua bindings for ACDropship and ACRocket hardcoded attachable getting and setting
…ua binding for it.
…and lua bindings for them. Set TransfersDamageToParent property for relevant AHuman hardcoded attachables. Also cleaned up GetHeadBitmap while I was there Reorganized ACrab hardcoded attachable setters slightly and fixed some method comments. Also moved GetTurret into the cpp
Fixed CloneHardcodedAttachable calls in ACDropship, ACRocket, ADoor, ACrab, AHuman so they cast the member function to std::function Moved ACrab::GetTurret back into cpp file cause I'd need to include Turret in the header otherwise. Also cleaned up some comments and included Leg in ACrab.h Included Arm in AHuman
…er variables protected cause it's easier Removed AEmitter Create that does nothing. Cleaned up some improper float definitions in AEmitter Clear, added Flash setter and used it, fixed use of Attach in ReadProperty, removed deletion of Flash in destroy, fixed variable name to match change from attachable Added luabinding to get and set AEmitter flash
Added and used HDFirearm Magazine and Flash setters, changed Flash Attach to AddAttachable and did AddAttachable for magazine in ReadProperty Got rid of Flash and Magazine deletion in Destroy, since they're handled by MOSR destroy Cleaned up variable names and changed Detach and Attach to RemoveAttachable and AddAttachable in SetNextMagazineName and Update
… commit. We may not actually want this though, we'll see Cleaned up HeldDevice variable names and such
…ook an MO and needs to be refactored sometime, this one just wraps it Changed various uses of Attach and Detach to AddAttachable and RemoveAttachable in Arm. Cleaned up variable names and deletion of attachable in Destroy
Cleaned up leg Create, variable names, foot deletion, added as attachable during read property Forgot to save removing heldMO deletion in Arm before committing before Added lua foot setter property binding
…ate function Fixed lua bindings for mosr wound to use const, matching method definitions
…chables during destroy in Turret Added setter for mounted MO and used it Added luabinding for turret getter and setter
Fixed deleting hardcoded attachables in ACrab, ACDropship, ACRocket, ADoor, AHuman
…et. Also cleaned up ReadProperty in these Fixed missing IsAttachahed check in Turret Fixed backwards equality check in MOSR attachable copying
…to MountedDevice cause having it as an MO was incredibly stupid Set aside some of the stuff that needs cleaning up in Turret for a future commit. Did clean up some stuff (e.g. attachable update) though. Fixed ACrab and LuaMan to match changes in Turret Cleaned up a few comments in Attachable header
…etMOIDs, IsOnScenePoint, UpdateChildMOIDs, GibThis and Draw Cleaned up RegMOID in MO so it's not totally stupid when makeNewMOID is false Changed SetID to SetAsNoID cause that's all it was used for, and directly setting ID like this fucks up collisions with attachables
… extra ini boilerplate
…orresponding footgroup should be disabled. The name sucks but this all needs renaming anyway.
Added AtomGroup::RemoveAllAtoms and LimbPath::GetCurrentSegmentNumber, which do what one would expect
Closed
Added name to AHuman FGROUND and BGROUND enum to match lua binding Added AHuman GetLimbPath method that lets you get a limbpath by passing in its layer and movement state Added LimbPath start offset setter and cleaned up getter, and added method to get a segment by its index Used these AHuman and LimbPath methods to add appropriate lua bindings
…ked things slightly in both so it's cleaner
Added lua binding for acrab getlimbpath Cleaned up variable names and comments for ahuman getlimbpath
…rnt movement states Added ini properties for setting rot angle targets. These are the only ones that work currently Added lua bindings for getting and setting ahuman RotAngleTarget
…ll propagate it back up through the chain and to the top level parent. Also made attachable setmass do nothing if the new mass is the same as the current, for efficiency purposes
…r parent. It actually double draws, which is a waste, but that'll be fixed in the future sometime.
…s generally clearer what's going on in here
…ersed its use. Used this to ensure that wounds added will cleanly have a 1.0 damage multiplier if they don't have one set, either by lua or ini Corrected the various actor subclasses that force damage multipliers on their hardcoded attachables
…n it and radius that includes attachables. Same thing with diameter Added MOSRotating method GetIndividualRadius that returns sprite radius, and made it override GetRadius with one that uses attachable distance and radius to determine the true radius. Same thing with diameter Added MOSRotating radius handling when adding or removing attachables and supporting method for it Made Attachable parent and joint offset setters update position and joint position right away, and update parent radius if applicable. To handle luabind being a pain, parent and joint offsets are also stored and checked against, in order to properly update parent radius as needed Cleaned up things that use radius and diameter to either use sprite radius/diameter or getradius/diameter based on what I think makes sense. Also minor cleanup of data forgetting to account for scene wrapping :ju: Cleaned up TODO is SLTerrain for using Diameter since GetDiameter should now work
# Conflicts: # CHANGELOG.md - Solved manually, no real conflicts
…rent. Bit of manual draw order fiddling to keep things unchanged
Radius calc will now not include flashes on hdfirearms or emitters Radius recalc will proliferate up through parents, so the full object chain can recalc as needed Radius recalc will work properly when handling the radius affecting attachable after its distance and radius has decreased, and it's the only attachable on its parent
…ttached, to prevent them from quietly growing giant angular vels and blowing up cause they're considered too fast Rejiggered arm rot angle setting logic a bit so it better fits what was there before. I don't think it actually makes a difference, but might as well be correct with it
…ffset setting, so it's all handled in the update check. Simplified check for changed parent offset to just be vector equality and clenaed up a bit of stuff
…ap IsWound flag Fix a typo in AHuman method comment
MaximDude
suggested changes
Feb 14, 2021
…that was ugly multilined
MaximDude
approved these changes
Feb 15, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Source Companion Pull Request to CF-143
Finally ready to review and test.
The 100 lines of changelog entries will hopefully explain things fairly well, but the general gist of things is that attachable handling has been greatly reworked and force transferal from attachables to their parents has been revamped a lot. It's gonna need as much playtesting as we can give it and I'm sure there are bugs I've missed.
Also, when it's time to playtest, you'll need to use the companion branch linked at the top of this message, otherwise you'll get ini and lua errors.
Known oddities and problems:
None!
Closes #7
Closes #8 - HDFirearm forces will be transferred to the
Armand from there to theAHuman. They are currently at an offset, there's a flag that could let them not be at one, though it'd have to apply to all forces on theArmright now (since it's not preserved through multiple levels ofAttachables).Closes #29 - Turrets act like any other Attachable in this regard.
InheritsRotAngle = 0should make them not normally rotate.Closes #59 - Only partly closes this, cause it doesn't currently let you turn off collisions for non-attachables
Closes #143
Closes #74
Closes #18