/[enigma]/enigma/world.cc
ViewVC logotype

Diff of /enigma/world.cc

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

revision 1.21 by dheck, Wed Oct 23 19:29:40 2002 UTC revision 1.22 by dheck, Sun Nov 3 14:11:09 2002 UTC
# Line 138  namespace Line 138  namespace
138                    
139          V3 get_force(Actor *a, V3 x, V3 v, double time)          V3 get_force(Actor *a, V3 x, V3 v, double time)
140          {          {
141              if (a->is_flying() || a->is_dead())              int iplayer=0;
142                if (a->int_attrib("player", &iplayer) && iplayer != player::CurrentPlayer())
143                    return V3();
144    
145                if (a->is_flying() || a->is_dead() )
146                  return V3();                  return V3();
147    
148              double damping=options::MouseDamping;              double damping=options::MouseDamping;
# Line 296  get_accel (Actor *a, const V3 & x, const Line 300  get_accel (Actor *a, const V3 & x, const
300  static void  static void
301  advance_actor(Actor *a, double time, double h)  advance_actor(Actor *a, double time, double h)
302  {  {
303      const double MAXVEL = 25;      const double MAXVEL = 20;
304    
305      ActorInfo &ai = *a->get_actorinfo();      ActorInfo &ai = *a->get_actorinfo();
306      V3 accel = get_accel(a, ai.pos, ai.vel, time);      V3 accel = get_accel(a, ai.pos, ai.vel, time);
# Line 577  clear_world() Line 581  clear_world()
581      px::delete_sequence(forces.begin(), forces.end());      px::delete_sequence(forces.begin(), forces.end());
582      forces.clear();      forces.clear();
583    
584  //     for_each(actorlist.begin(), actorlist.end(), mem_fun_ref(&ActorInfo::dispose));      for_each(actorlist.begin(), actorlist.end(), mem_fun(&Actor::dispose));
585      actorlist.clear();      actorlist.clear();
586  }  }
587    
# Line 610  world::Load(const string &name) Line 614  world::Load(const string &name)
614          clear_world();          clear_world();
615          return;          return;
616      }      }
617        laser::RecalcLight();
618      laser::RecalcLightNow(); // recalculate laser beams if necessary      laser::RecalcLightNow(); // recalculate laser beams if necessary
619    
620        for (ActorList::iterator i=actorlist.begin();
621             i!=actorlist.end(); ++i)
622        {
623            int iplayer=-1;
624            Actor *a=*i;
625            if (a->int_attrib("player", &iplayer)) {
626                player::SetMainActor(iplayer,a);
627            }
628        }
629  }  }
630    
631  void  void

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

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