| 2766 | } |
| 2767 | |
| 2768 | static inline void ApplyConstantForce(object *objp, vector *new_pos, vector *force, float delta_time) { |
| 2769 | const vector velocity = objp->mtype.phys_info.velocity; |
| 2770 | const float drag = objp->mtype.phys_info.drag; |
| 2771 | const float mass = objp->mtype.phys_info.mass; |
| 2772 | |
| 2773 | // Standard motion with a linear air drag (drag is proportional to velocity) |
| 2774 | *new_pos = objp->pos + (*force / drag) * (delta_time) + |
| 2775 | (mass / drag) * (velocity - (*force / drag)) * (1 - exp(-(drag / mass) * delta_time)); |
| 2776 | } |
| 2777 | |
| 2778 | bool AIDetermineAimPoint(object *robot, object *target, vector *aim_pt, float weapon_speed) { |
| 2779 | if (DIFF_LEVEL == DIFFICULTY_TRAINEE && ((robot->ai_info->flags & AIF_TEAM_MASK) != AIF_TEAM_REBEL)) { |
no outgoing calls
no test coverage detected