HACK: Activate the pushable ending only if it's doing the Object pushable animations.
Reason is because the block animations, have a long pause between the pushable movement and the end of the animation.
This fix is temporal and need a better solution for these kind of cases.
* Revert "Late electric cleaner formatting"
This reverts commit 4db8e8ca69.
* Update functions names
* Removal of the old functions for pushables
From now on, the EC will relies in the floor Stoppable flag to don't pass through pushables. (As pushables got refactored to manage these better).
* Reformat: Comments and Initialize
* Reformat: From header to static methods
Changed the auxiliar functions to static methods defined uniquely in the source code. And deleted from the header code.
As these functions are unique for the Electric Cleaner and don't need to be known by external codes. So are moved away from the header.
For this, the order of the functions in the source code also has been changed, so now Control and Collide functions are at the bottom.
* Reformat: IsNextSectorValid
- Reformatted code from the IsNextSectorValid function
- Added also the GetCollision overload:
CollisionResult GetCollision(const Vector3i& pos, int roomNumber, const Vector3& dir, float dist);
* Reformat: Minor functions
* Reformat: ControlElectricCleaner
* Update comments
* Minor formatting
* Update Slopes alignments
GetShortestAngle is converting the diferenceof slopeAngle and dirAngle to short type, (What will not take the value 32768 anymore)
Therefore the next if have been modified to check only the forward (angle 0) and backwards (angle 180).
Note: ANGLE (180) and ANGLE (-180) gives both the same result, -32768, Although ANGLE 180 is positive, the short type rounds it back to the negative side. However in the code I think will be easier to read using the positive 180 angle.
* Update ElectricCleaner.cpp
---------
Co-authored-by: Sezz <sezzary@outlook.com>
* Convert loose state function lists to maps
* Simplify
* Shorten names
* Unity functions
* Convert to array
* Update function name
* Remove duplicate include
* Simplify switch case
* Update PlayerStateMachine.cpp
* Add comments
* Use clearer names