Fix the bug where using the X and Y axes of local and velocity spaces in add_velocity would lead to undefined behavior
Add client and server fields to both actions, true by default; if set false, the action will be cancelled when executed on a player on that side
local_horizontal is now unnormalized, the old one is now named local_horizontal_normalized
Clean up the code (switch moved from EntityActions to Space)
Tested all edge cases I could remember of, and more generic cases as well (the times are slightly underestimated):
The transformVectorToBase method is made public for access in the bi-entity action. It doesn't feel very encapsulated but - in my opinion - it's not worth creating a toGlobal static method that accepts two entities just for this purpose.
add_velocity
would lead to undefined behaviorclient
andserver
fields to both actions, true by default; if set false, the action will be cancelled when executed on a player on that sidelocal_horizontal
is now unnormalized, the old one is now namedlocal_horizontal_normalized
Tested all edge cases I could remember of, and more generic cases as well (the times are slightly underestimated):
The transformVectorToBase method is made public for access in the bi-entity action. It doesn't feel very encapsulated but - in my opinion - it's not worth creating a toGlobal static method that accepts two entities just for this purpose.
Optimized code by the way :P
@eggohito I have a documentation page draft, if and when this is merged, DM me