diff options
Diffstat (limited to 'game/shared/entity/gravity.cc')
| -rw-r--r-- | game/shared/entity/gravity.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/game/shared/entity/gravity.cc b/game/shared/entity/gravity.cc index f1708aa..09bc379 100644 --- a/game/shared/entity/gravity.cc +++ b/game/shared/entity/gravity.cc @@ -1,20 +1,20 @@ -#include "shared/pch.hh" - -#include "shared/entity/gravity.hh" - -#include "shared/entity/stasis.hh" -#include "shared/entity/velocity.hh" - -#include "shared/world/dimension.hh" - -#include "shared/globals.hh" - -void entity::Gravity::fixed_update(world::Dimension* dimension) -{ - auto fixed_acceleration = globals::fixed_frametime * dimension->get_gravity(); - auto group = dimension->entities.group<entity::Gravity>(entt::get<entity::Velocity>, entt::exclude<entity::Stasis>); - - for(auto [entity, velocity] : group.each()) { - velocity.value.y += fixed_acceleration; - } -} +#include "shared/pch.hh"
+
+#include "shared/entity/gravity.hh"
+
+#include "shared/entity/stasis.hh"
+#include "shared/entity/velocity.hh"
+
+#include "shared/world/dimension.hh"
+
+#include "shared/globals.hh"
+
+void entity::Gravity::fixed_update(world::Dimension* dimension)
+{
+ auto fixed_acceleration = globals::fixed_frametime * dimension->get_gravity();
+ auto group = dimension->entities.group<entity::Gravity>(entt::get<entity::Velocity>, entt::exclude<entity::Stasis>);
+
+ for(auto [entity, velocity] : group.each()) {
+ velocity.value.y += fixed_acceleration;
+ }
+}
|
