Index: ./Games/Pingus/src/actions/faller.cxx =================================================================== RCS file: /var/lib/cvs/Games/Pingus/src/actions/faller.cxx,v retrieving revision 1.37 diff -u -r1.37 faller.cxx --- ./Games/Pingus/src/actions/faller.cxx 9 Mar 2003 20:41:30 -0000 1.37 +++ ./Games/Pingus/src/actions/faller.cxx 25 Mar 2003 00:01:17 -0000 @@ -26,6 +26,7 @@ #include "../movers/linear_mover.hxx" #include "../pingu.hxx" #include "../string_converter.hxx" +#include "../world.hxx" #include "../worldobj.hxx" #include "faller.hxx" @@ -64,7 +65,8 @@ return; // Apply gravity - pingu->set_velocity(pingu->get_velocity() + Vector(0.0f, 1.0f)); + pingu->set_velocity(pingu->get_velocity() + + Vector(0.0f, WorldObj::get_world()->get_gravity()) ); bool collided; @@ -76,7 +78,7 @@ do { // Move the Pingu as far is it can go - mover.update(move, Colliders::PinguCollider(velocity, pingu_height)); + mover.update(move, Colliders::PinguCollider(pingu_height)); pingu->set_pos(mover.get_pos()); Index: ./Games/Pingus/src/particles/pingu_particle_holder.cxx =================================================================== RCS file: /var/lib/cvs/Games/Pingus/src/particles/pingu_particle_holder.cxx,v retrieving revision 1.7 diff -u -r1.7 pingu_particle_holder.cxx --- ./Games/Pingus/src/particles/pingu_particle_holder.cxx 16 Mar 2003 23:06:12 -0000 1.7 +++ ./Games/Pingus/src/particles/pingu_particle_holder.cxx 25 Mar 2003 00:01:18 -0000 @@ -83,7 +83,7 @@ float tmp_y_add = 0.0f; // Simulated gravity - it->velocity.y += 0.2f; + it->velocity.y += WorldObj::get_world()->get_gravity(); if (it->velocity.y > 0) { Index: ./Games/Pingus/src/pingu_enums.cxx =================================================================== RCS file: /var/lib/cvs/Games/Pingus/src/pingu_enums.cxx,v retrieving revision 1.3 diff -u -r1.3 pingu_enums.cxx --- ./Games/Pingus/src/pingu_enums.cxx 12 Feb 2003 22:40:47 -0000 1.3 +++ ./Games/Pingus/src/pingu_enums.cxx 25 Mar 2003 00:01:19 -0000 @@ -19,9 +19,10 @@ #include "pingu_enums.hxx" -// Pingu "globals" +// Pingu "globals". Make [deadly_velocity = 20 * sqrt("normal gravity")] so +// that the "deadly distance" is the same and therefore doesn't break levels. +const float deadly_velocity = 10.0f; const int pingu_height = 26; -const float deadly_velocity = 20.0f; namespace Actions { Index: ./Games/Pingus/src/world.cxx =================================================================== RCS file: /var/lib/cvs/Games/Pingus/src/world.cxx,v retrieving revision 1.41 diff -u -r1.41 world.cxx --- ./Games/Pingus/src/world.cxx 4 Mar 2003 13:59:44 -0000 1.41 +++ ./Games/Pingus/src/world.cxx 25 Mar 2003 00:01:20 -0000 @@ -63,7 +63,8 @@ snow_particle_holder(new Particles::SnowParticleHolder()), pingus(new PinguHolder(plf)), colmap(gfx_map->get_colmap()), - view(0) + view(0), + gravitational_acceleration(0.25f) { start_x_pos = plf->get_startx(); start_y_pos = plf->get_starty(); @@ -297,6 +298,11 @@ World::get_game_time () { return game_time; +} + +float World::get_gravity() +{ + return gravitational_acceleration; } /* EOF */ Index: ./Games/Pingus/src/world.hxx =================================================================== RCS file: /var/lib/cvs/Games/Pingus/src/world.hxx,v retrieving revision 1.26 diff -u -r1.26 world.hxx --- ./Games/Pingus/src/world.hxx 3 Mar 2003 20:32:18 -0000 1.26 +++ ./Games/Pingus/src/world.hxx 25 Mar 2003 00:01:21 -0000 @@ -94,6 +94,9 @@ void init_worldobjs (PLF* plf); + /** Acceleration due to gravity in the world */ + const float gravitational_acceleration; + public: World(PLF*); virtual ~World(); @@ -171,6 +174,10 @@ int get_start_x() const { return start_x_pos; } int get_start_y() const { return start_y_pos; } + + /** Get the acceleration due to gravity in the world */ + float get_gravity(); + private: World (const World&); World& operator= (const World&);