[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs hammer.cxx,1.6,1.7
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs hammer.cxx,1.6,1.7 |
Date: |
1 Oct 2002 23:10:43 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/worldobjs
In directory dark:/tmp/cvs-serv1737/src/worldobjs
Modified Files:
hammer.cxx
Log Message:
- fixed hammer
- added line numbers to a xml error message
- fixed trap parsing code
Index: hammer.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/hammer.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- hammer.cxx 1 Oct 2002 19:53:46 -0000 1.6
+++ hammer.cxx 1 Oct 2002 23:10:41 -0000 1.7
@@ -21,6 +21,7 @@
#include "../pingu.hxx"
#include "../pingu_holder.hxx"
#include "../world.hxx"
+#include "../pingu_action.hxx"
#include "../worldobjsdata/hammer_data.hxx"
#include "hammer.hxx"
@@ -78,11 +79,14 @@
void
Hammer::catch_pingu (Pingu* pingu)
{
- if (data->counter >= static_cast<int>(data->surface.get_num_frames() - 3)) {
- if ( pingu->get_x() > data->pos.x + 55 && pingu->get_x() < data->pos.x +
77
- && pingu->get_y() > data->pos.y + 146 && pingu->get_y() < data->pos.y
+ 185)
- pingu->set_action(Actions::Smashed);
- }
+ if (pingu->get_action()->get_type() != Actions::Smashed)
+ {
+ if (data->counter >= static_cast<int>(data->surface.get_num_frames() -
3)) {
+ if (pingu->get_x() > data->pos.x + 55 && pingu->get_x() < data->pos.x
+ 77
+ && pingu->get_y() > data->pos.y + 146 && pingu->get_y() <
data->pos.y + 185)
+ pingu->set_action(Actions::Smashed);
+ }
+ }
}
} // namespace WorldObjs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/worldobjs hammer.cxx,1.6,1.7,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/doc worldmap.xml,1.2,1.3
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus AUTHORS,1.24,1.25 configure.in,1.72,1.73
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/doc worldmap.xml,1.2,1.3
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus AUTHORS,1.24,1.25 configure.in,1.72,1.73
- Index(es):