-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Most Awesome PR! #182
base: develop-SoapyMan
Are you sure you want to change the base?
The Most Awesome PR! #182
Changes from 1 commit
d64948a
87c1acd
045e429
362a52f
55430ff
88fea59
ec43cc6
7a99d9e
0815106
4ef7f98
48c60d7
8453251
4fb2445
5ae9b7b
fb9443c
353072c
5f64034
cde81af
fa19818
04ef491
f1e2dfd
d51d5bb
066f9c6
7dd68b6
d48420c
c8ded05
c5a67d4
1733c23
283da52
b3efd1e
959ab52
0ae9be2
bcf089d
4300795
b8f6b19
a44a186
09dd49d
bd785cb
3a93223
26e947f
fa65031
320c0e5
f878b96
399cdba
4a058c9
0538d27
04cdce5
80439d4
ddf78dd
d60f169
f83cd21
fb7d70e
850ba2c
1a6f6a4
71d27ae
8797858
d19a88b
b6ed4d8
c1c5b52
809a8fb
718cc18
b227ae8
d53a172
31caa2b
b150b13
45f8792
4724a56
e127c58
f2e1a96
e77f9ba
4dd6279
2e34a8d
d2f6dcb
06e669b
49c37ee
f62a2b6
6de91ad
d790f3d
4abcb60
27a0999
761e6bf
963de5e
0287aa6
593cb7e
475e610
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -528,6 +528,32 @@ void AddWheelForcesDriver1(CAR_DATA* cp, CAR_LOCALS* cl) | |
else | ||
{ | ||
cp->hd.wheel_speed = cdz / 64 * (cl->vel[2] / 64) + cdx / 64 * (cl->vel[0] / 64); | ||
|
||
// [A] wibbly wobbly fuckery hack... | ||
if (car_cos->extraInfo & 4) | ||
{ | ||
if (cp->thrust == 0 && cp->handbrake && (cp->hd.speed > 0 && cp->hd.speed < 4)) | ||
{ | ||
cp->hd.speed--; | ||
cp->hd.wheel_speed >>= 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've attempted to make the slowing down effect as gradual as possible by not merely setting these values to zero. However, removing these steps entirely will result in a very bizarre effect that looks like the truck forever stuck being sucked into a vortex/whirlpool of sorts.. it's quite funny but also very annoying, lol. |
||
|
||
cp->hd.acc[0] >>= 1; | ||
cp->hd.acc[1] >>= 1; | ||
cp->hd.acc[2] >>= 1; | ||
|
||
cp->hd.aacc[0] >>= 2; | ||
cp->hd.aacc[1] >>= 2; | ||
cp->hd.aacc[2] >>= 2; | ||
|
||
//cp->st.n.linearVelocity[0] >>= 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are commented out because otherwise the car will come to a screeching halt and basically act like dead weight. |
||
//cp->st.n.linearVelocity[1] >>= 1; | ||
//cp->st.n.linearVelocity[2] >>= 1; | ||
|
||
cp->st.n.angularVelocity[0] >>= 2; | ||
cp->st.n.angularVelocity[1] >>= 2; | ||
cp->st.n.angularVelocity[2] >>= 2; | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SoapyMan Do you understand the physics enough to maybe know why the box truck in Vegas needs this hack? It usually happens when you drive a bit, then come to a hard stop using the brake + handbrake, and exit the vehicle. Very consistently, it will jitter like an absolute maniac. Seems to be related to how angular velocity is calculated? While this bug is happening, the car will stay at a constant speed of about 3, and the wheel speed goes all over the damn place.
The only way I've managed to get it to stop is to manually bring the acceleration/velocity values down manually. But I haven't found any other car that does this yet.. so WTF is going on?! It's driving me nuts! I hate hacks and would really like to fix this another way if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this technically resolves a bug where the trucks in Destroy the Yard may end up phasing out of the world by the time you arrive.. I was like WTF when I noticed it happen the first time!