[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Enigma-cvs] enigma/src stones.cc,1.23,1.24
From: |
Daniel Heck <address@hidden> |
Subject: |
[Enigma-cvs] enigma/src stones.cc,1.23,1.24 |
Date: |
Wed, 26 Nov 2003 08:15:15 +0000 |
Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv9514/src
Modified Files:
stones.cc
Log Message:
- Emit cannonball only if state==IDLE
Index: stones.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/stones.cc,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** stones.cc 21 Nov 2003 09:27:50 -0000 1.23
--- stones.cc 26 Nov 2003 08:15:13 -0000 1.24
***************
*** 226,230 ****
! /* -------------------- SpitStone -------------------- */
namespace
--- 226,230 ----
! /* -------------------- SpitterStone -------------------- */
namespace
***************
*** 235,247 ****
enum State { IDLE, LOADING, SPITTING };
State state;
V2 ball_velocity;
- public:
- SpitterStone () : Stone("st-spitter"), state (IDLE) {
- }
void animcb();
-
void actor_hit (const StoneContact &sc);
};
}
--- 235,249 ----
enum State { IDLE, LOADING, SPITTING };
+ // Variables
State state;
V2 ball_velocity;
+ // Functions.
void animcb();
void actor_hit (const StoneContact &sc);
+
+ public:
+ SpitterStone () : Stone("st-spitter"), state (IDLE) {
+ }
};
}
***************
*** 270,273 ****
--- 272,278 ----
void SpitterStone::actor_hit (const StoneContact &sc) {
+ if (state != IDLE)
+ return;
+
if (player::Inventory *inv = player::GetInventory(sc.actor)) {
int lifepos = inv->find("it-extralife");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Enigma-cvs] enigma/src stones.cc,1.23,1.24,
Daniel Heck <address@hidden> <=