[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r3680 - trunk/pingus/src
From: |
grumbel at BerliOS |
Subject: |
[Pingus-CVS] r3680 - trunk/pingus/src |
Date: |
Sat, 5 Jul 2008 04:43:34 +0200 |
Author: grumbel
Date: 2008-07-05 04:43:34 +0200 (Sat, 05 Jul 2008)
New Revision: 3680
Modified:
trunk/pingus/src/game_session.cpp
trunk/pingus/src/game_session.hpp
Log:
Merged update_server()
Modified: trunk/pingus/src/game_session.cpp
===================================================================
--- trunk/pingus/src/game_session.cpp 2008-07-05 02:39:50 UTC (rev 3679)
+++ trunk/pingus/src/game_session.cpp 2008-07-05 02:43:34 UTC (rev 3680)
@@ -138,10 +138,23 @@
// has been updated during this frame
int world_updates = 0;
- while ((world_updates+1)*update_time <= time_passed) {
- update_server();
- world_updates++;
- }
+ while ((world_updates+1)*update_time <= time_passed)
+ {
+ if (!pause)
+ {
+ if (fast_forward)
+ {
+ for (int i = 0; i < 4; ++i)
+ server->update();
+ }
+ else
+ {
+ server->update();
+ }
+ }
+
+ world_updates++;
+ }
// save how far behind is the world compared to the actual time
// so that we can account for that while updating in the next frame
world_delay = time_passed - (world_updates*update_time);
@@ -149,23 +162,6 @@
}
void
-GameSession::update_server()
-{
- if (!pause)
- {
- if (fast_forward)
- {
- for (int i = 0; i < 4; ++i)
- server->update();
- }
- else
- {
- server->update();
- }
- }
-}
-
-void
GameSession::draw_background (DrawingContext& gc)
{
Rect rect = playfield->get_rect();
Modified: trunk/pingus/src/game_session.hpp
===================================================================
--- trunk/pingus/src/game_session.hpp 2008-07-05 02:39:50 UTC (rev 3679)
+++ trunk/pingus/src/game_session.hpp 2008-07-05 02:43:34 UTC (rev 3680)
@@ -69,10 +69,7 @@
/** Pass a delta to the screen */
void update_server(float delta);
- void update_server();
- // -- Client stuff
-
Server* get_server() { return server.get(); }
Playfield* get_playfield() { return playfield; }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r3680 - trunk/pingus/src,
grumbel at BerliOS <=