/[enigma]/enigma/src/actors.cc
ViewVC logotype

Diff of /enigma/src/actors.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by reallysoft, Mon May 19 12:14:35 2003 UTC revision 1.20 by reallysoft, Mon May 26 09:37:46 2003 UTC
# Line 294  BasicBall::BasicBall(const char *kind, d Line 294  BasicBall::BasicBall(const char *kind, d
294    
295  void BasicBall::message(const string &m, const Value &)  void BasicBall::message(const string &m, const Value &)
296  {  {
 //     enigma::Log << get_kind() << ": msg("<<m<<") in state "<<state<< '\n';  
 //     warning("%s: msg '%s' in state '%i'", get_kind(), m.c_str(), state);  
297      if (state == NORMAL) {      if (state == NORMAL) {
298          if (m == "shatter")         change_state(SHATTERING);          if (m == "shatter")         change_state(SHATTERING);
299          else if (m == "laserhit")   change_state(SHATTERING);          else if (m == "laserhit")   change_state(SHATTERING);
# Line 330  void BasicBall::think(double dtime) { Line 328  void BasicBall::think(double dtime) {
328    
329          sinkDepth += sinkSpeed*dtime;          sinkDepth += sinkSpeed*dtime;
330    
 //         fprintf(stderr, "dtime=%f absVelocity=%f sinkSpeed=%f sinkDepth=%f\n",  
 //                 dtime, absVelocity, sinkSpeed, sinkDepth);  
   
331          if (sinkDepth >= maxSinkDepth) {          if (sinkDepth >= maxSinkDepth) {
 //             sound::PlaySound("shatter");  
332              set_model(string(get_kind())+"-sunk");              set_model(string(get_kind())+"-sunk");
333              ai->vel = V2();     // stop!              ai->vel = V2();     // stop!
334              sound::PlaySound("suck2");              sound::PlaySound("swamped");
335              change_state(BUBBLING);              change_state(BUBBLING);
336          }          }
337          else {          else {
# Line 351  void BasicBall::animcb() Line 345  void BasicBall::animcb()
345  {  {
346      string kind=get_kind();      string kind=get_kind();
347    
 //    enigma::Log << get_kind() << ": animcb(" << state<<endl;  
   
348      switch (state) {      switch (state) {
349      case SHATTERING:      case SHATTERING:
350          set_model(kind+"-shattered");          set_model(kind+"-shattered");
# Line 360  void BasicBall::animcb() Line 352  void BasicBall::animcb()
352          break;          break;
353      case DROWNING:      case DROWNING:
354      case BUBBLING:      case BUBBLING:
         // sound::PlaySound("groan");  
355          set_model("invisible");          set_model("invisible");
356          change_state(DEAD);          change_state(DEAD);
357          break;          break;

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26