mirror of
https://github.com/phoboslab/wipeout-rewrite
synced 2024-12-26 09:59:04 +01:00
Fix check for projectiles - acceleration in either horizontal axis is sufficient
This commit is contained in:
parent
d7204cad0f
commit
5fcf2feec8
1 changed files with 1 additions and 1 deletions
|
@ -168,7 +168,7 @@ void weapons_update() {
|
|||
(weapon->update_func)(weapon);
|
||||
|
||||
// Handle projectiles
|
||||
if (weapon->acceleration.x != 0 && weapon->acceleration.z != 0) {
|
||||
if (weapon->acceleration.x != 0 || weapon->acceleration.z != 0) {
|
||||
weapon->velocity = vec3_add(weapon->velocity, vec3_mulf(weapon->acceleration, 30 * system_tick()));
|
||||
weapon->velocity = vec3_sub(weapon->velocity, vec3_mulf(weapon->velocity, weapon->drag * 30 * system_tick()));
|
||||
weapon->position = vec3_add(weapon->position, vec3_mulf(weapon->velocity, 30 * system_tick()));
|
||||
|
|
Loading…
Reference in a new issue