[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs entrance.cxx,1.5,1.6
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs entrance.cxx,1.5,1.6 |
Date: |
4 Oct 2002 16:54:06 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/worldobjs
In directory dark:/tmp/cvs-serv3709/worldobjs
Modified Files:
entrance.cxx
Log Message:
cleaned up the whole goal condition section, worlds should exit now again
Index: entrance.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/entrance.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- entrance.cxx 4 Oct 2002 13:46:56 -0000 1.5
+++ entrance.cxx 4 Oct 2002 16:54:04 -0000 1.6
@@ -67,48 +67,51 @@
Pingu* pingu = world->get_pingus()->create_pingu(data->pos, data->owner_id);
- switch (data->direction)
+ if (pingu) // still pingus in the pool
{
- case WorldObjsData::EntranceData::LEFT:
- d.left();
- pingu->set_direction(d);
- break;
+ switch (data->direction)
+ {
+ case WorldObjsData::EntranceData::LEFT:
+ d.left();
+ pingu->set_direction(d);
+ break;
- case WorldObjsData::EntranceData::MISC:
- if (last_direction)
- {
- d.left();
- last_direction = 0;
- }
- else
- {
- d.right();
- last_direction = 1;
- }
- pingu->set_direction(d);
- break;
+ case WorldObjsData::EntranceData::MISC:
+ if (last_direction)
+ {
+ d.left();
+ last_direction = 0;
+ }
+ else
+ {
+ d.right();
+ last_direction = 1;
+ }
+ pingu->set_direction(d);
+ break;
- case WorldObjsData::EntranceData::RIGHT:
- d.right();
- pingu->set_direction(d);
- break;
+ case WorldObjsData::EntranceData::RIGHT:
+ d.right();
+ pingu->set_direction(d);
+ break;
- default:
- std::cout << "Entrance:: Warning direction is wrong: " <<
data->direction << std::endl;
- d.right();
- pingu->set_direction(d);
- break;
+ default:
+ std::cout << "Entrance:: Warning direction is wrong: " <<
data->direction << std::endl;
+ d.right();
+ pingu->set_direction(d);
+ break;
+ }
+ }
+ else
+ {
+ //std::cout << "Entrance: pingu couldn't get created" << std::endl;
}
-
}
void
Entrance::update ()
{
- if ( pingu_ready()
- && (world->get_pingus()->get_number_of_released()
- < static_cast<int>(world->get_allowed_pingus()))
- && (! world->check_armageddon()))
+ if (pingu_ready() && (! world->check_armageddon()))
{
create_pingu();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/worldobjs entrance.cxx,1.5,1.6,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.113,1.114 capture_rectangle.cxx,1.10,1.11 demo_session.cxx,1.2,1.3 level_result.cxx,1.4,1.5 pingu_enums.hxx,1.7,1.8 pingu_holder.cxx,1.13,1.14 pingu_holder.hxx,1.11,1.12 pingus_counter.cxx,1.8,1.9 pingus_counter_bar.cxx,1.2,1.3 playfield.cxx,1.25,1.26 server_event.cxx,1.2,1.3 smallmap.cxx,1.17,1.18 world.cxx,1.28,1.29 world.hxx,1.15,1.16
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src goal_manager.cxx,NONE,1.1 goal_manager.hxx,NONE,1.1 Makefile.am,1.114,1.115 action_button.cxx,1.15,1.16 action_button.hxx,1.13,1.14 button_panel.cxx,1.15,1.16 button_panel.hxx,1.12,1.13 client.cxx,1.27,1.28 client.hxx,1.22,1.23 game_session.cxx,1.16,1.17 game_session.hxx,1.12,1.13 hurry_up.cxx,1.3,1.4 level_result.cxx,1.5,1.6 multiplayer_client_child.cxx,1.12,1.13 multiplayer_client_child.hxx,1.7,1.8 pingu.cxx,1.32,1.33 pingu.hxx,1.20,1.21 pingu_holder.cxx,1.14,1.15 pingu_holder.hxx,1.12,1.13 pingus_counter.cxx,1.9,1.10 pingus_counter_bar.cxx,1.3,1.4 plf.cxx,1.10,1.11 server.cxx,1.21,1.22 server.hxx,1.11,1.12 smallmap.cxx,1.18,1.19 time_display.cxx,1.7,1.8 true_server.cxx,1.15,1.16 true_server.hxx,1.10,1.11 world.cxx,1.29,1.30 world.hxx,1.16,1.17
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.113,1.114 capture_rectangle.cxx,1.10,1.11 demo_session.cxx,1.2,1.3 level_result.cxx,1.4,1.5 pingu_enums.hxx,1.7,1.8 pingu_holder.cxx,1.13,1.14 pingu_holder.hxx,1.11,1.12 pingus_counter.cxx,1.8,1.9 pingus_counter_bar.cxx,1.2,1.3 playfield.cxx,1.25,1.26 server_event.cxx,1.2,1.3 smallmap.cxx,1.17,1.18 world.cxx,1.28,1.29 world.hxx,1.15,1.16
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src goal_manager.cxx,NONE,1.1 goal_manager.hxx,NONE,1.1 Makefile.am,1.114,1.115 action_button.cxx,1.15,1.16 action_button.hxx,1.13,1.14 button_panel.cxx,1.15,1.16 button_panel.hxx,1.12,1.13 client.cxx,1.27,1.28 client.hxx,1.22,1.23 game_session.cxx,1.16,1.17 game_session.hxx,1.12,1.13 hurry_up.cxx,1.3,1.4 level_result.cxx,1.5,1.6 multiplayer_client_child.cxx,1.12,1.13 multiplayer_client_child.hxx,1.7,1.8 pingu.cxx,1.32,1.33 pingu.hxx,1.20,1.21 pingu_holder.cxx,1.14,1.15 pingu_holder.hxx,1.12,1.13 pingus_counter.cxx,1.9,1.10 pingus_counter_bar.cxx,1.3,1.4 plf.cxx,1.10,1.11 server.cxx,1.21,1.22 server.hxx,1.11,1.12 smallmap.cxx,1.18,1.19 time_display.cxx,1.7,1.8 true_server.cxx,1.15,1.16 true_server.hxx,1.10,1.11 world.cxx,1.29,1.30 world.hxx,1.16,1.17
- Index(es):