mirror of
https://github.com/izzy2lost/wipeout-rewrite.git
synced 2026-07-06 00:20:05 -07:00
Fix check for projectiles - acceleration in either horizontal axis is sufficient
This commit is contained in:
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user