pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.119,1.120 pingu_action.


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.119,1.120 pingu_action.cxx,1.14,1.15 world.cxx,1.32,1.33
Date: 3 Nov 2002 14:37:22 -0000

Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv10630

Modified Files:
        Makefile.am pingu_action.cxx world.cxx 
Log Message:
if you can't fix it, remove it... bye,bye forces_vector

Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/Makefile.am,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- Makefile.am 2 Nov 2002 19:03:40 -0000       1.119
+++ Makefile.am 3 Nov 2002 14:37:20 -0000       1.120
@@ -133,8 +133,6 @@
 fade_out.hxx \
 fonts.hxx \
 fonts.cxx \
-force_vector.cxx \
-force_vector.hxx \
 fps_counter.cxx \
 fps_counter.hxx \
 game_counter.cxx \

Index: pingu_action.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_action.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- pingu_action.cxx    3 Nov 2002 13:41:29 -0000       1.14
+++ pingu_action.cxx    3 Nov 2002 14:37:20 -0000       1.15
@@ -19,8 +19,8 @@
 
 #include <assert.h>
 #include <math.h>
+#include "vector.hxx"
 #include "col_map.hxx"
-#include "force_vector.hxx"
 #include "world.hxx"
 #include "pingu.hxx"
 #include "pingu_action.hxx"
@@ -103,12 +103,9 @@
 void
 PinguAction::move_with_forces ()
 {
-  Vector force_to_apply = pingu->get_velocity();
-
-  // Put the force together with any existing forces, including gravity
-  pingu->set_velocity( ForcesHolder::apply_forces(pingu->get_pos(),
-                                                 force_to_apply) );
-
+  // Apply gravity
+  pingu->set_velocity(pingu->get_velocity() + Vector(0.0f, 1.0f));
+    
   Vector resultant_force = pingu->get_velocity();
 
   // Strictly speaking x_numerator should be initialised with
@@ -142,9 +139,9 @@
 
   // Keep moving the Pingu until there is only a fraction left
   while (   force_counter.x <= -1 
-            || force_counter.x >=  1
-            || force_counter.y <= -1
-            || force_counter.y >=  1)
+         || force_counter.x >=  1
+         || force_counter.y <= -1
+         || force_counter.y >=  1)
     {
       x_numerator += x_inc;
 

Index: world.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/world.cxx,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- world.cxx   10 Oct 2002 12:25:53 -0000      1.32
+++ world.cxx   3 Nov 2002 14:37:20 -0000       1.33
@@ -20,7 +20,6 @@
 #include <algorithm>
 #include <assert.h>
 #include <iostream>
-#include "force_vector.hxx"
 #include "plf.hxx"
 #include "pingu_holder.hxx"
 #include "sound.hxx"
@@ -99,11 +98,6 @@
   // objects want to do
   for(WorldObjIter obj = world_obj.begin(); obj != world_obj.end(); ++obj)
     (*obj)->on_startup();
-
-  // Setup the gravity force
-  // Clear all old forces
-  ForcesHolder::clear_all_forces();
-  ForcesHolder::add_force(GravityForce(grav));
 }
 
 World::~World()
@@ -192,9 +186,6 @@
 
   // FIXME: Why is the particle holder still a seperate object?
   particle_holder->update();
-
-  // Clear the explosion force list
-  ForcesHolder::clear_explo_list();
 }
 
 PinguHolder*





reply via email to

[Prev in Thread] Current Thread [Next in Thread]