398 |
// Friction |
// Friction |
399 |
double vv=length(v); |
double vv=length(v); |
400 |
if (vv > 0) { |
if (vv > 0) { |
401 |
V2 frictionf = v * enigma::FrictionFactor*friction; |
V2 frictionf = v * (enigma::FrictionFactor*friction); |
402 |
frictionf /= vv; |
frictionf /= vv; |
403 |
frictionf *= pow(vv, 0.8); |
frictionf *= pow(vv, 0.8); |
404 |
f -= frictionf; |
f -= frictionf; |
448 |
static void |
static void |
449 |
advance_actor(Actor *a, double time, double h) |
advance_actor(Actor *a, double time, double h) |
450 |
{ |
{ |
451 |
const double MAXVEL = 40; |
const double MAXVEL = 100; |
452 |
|
|
453 |
ActorInfo &ai = *a->get_actorinfo(); |
ActorInfo &ai = *a->get_actorinfo(); |
454 |
V2 accel = get_accel(a, ai.pos, ai.vel, time); |
V2 accel = get_accel(a, ai.pos, ai.vel, time); |