1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-31 21:57:12 +00:00
freebsd-ports/games/xspringies/files/patch-01
1997-02-16 10:33:44 +00:00

24 lines
458 B
Plaintext

--- phys.c.orig Mon Mar 29 06:26:52 1993
+++ phys.c Sat Feb 15 16:54:26 1997
@@ -212,11 +212,15 @@
mass1 = m1->mass;
mass2 = m2->mass;
-
- m1->ax += forcex / mass1;
- m1->ay += forcey / mass1;
- m2->ax -= forcex / mass2;
- m2->ay -= forcey / mass2;
+
+ if (mass1 != 0) {
+ m1->ax += forcex / mass1;
+ m1->ay += forcey / mass1;
+ }
+ if (mass2 != 0) {
+ m2->ax -= forcex / mass2;
+ m2->ay -= forcey / mass2;
+ }
}
}
}