Skip to content
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

Open
wants to merge 85 commits into
base: develop-SoapyMan
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
d64948a
[Frontend] Add helper macros/defines for user functions
Fireboyd78 May 16, 2022
87c1acd
Fixed incorrect debris color bug.
Fireboyd78 May 26, 2022
045e429
Initial support for extra configuration data in profiles + replays/cu…
Fireboyd78 Jun 17, 2022
362a52f
Add full support for more than 32 cars on non-PSX builds.
Fireboyd78 Jun 18, 2022
55430ff
Improve draw performance of many cars at once.
Fireboyd78 Jun 18, 2022
88fea59
[Frontend] Refactor code + misc. improvements
Fireboyd78 Jun 18, 2022
ec43cc6
[Frontend] Add Traffic/Pedestrian Density screens.
Fireboyd78 Jun 18, 2022
7a99d9e
Add support for custom traffic/pedestrian densities.
Fireboyd78 Jun 18, 2022
0815106
Add support for fixing regressions w/ backwards compatibility.
Fireboyd78 Jun 18, 2022
4ef7f98
Add pedestrian density to debug information.
Fireboyd78 Jun 18, 2022
48c60d7
[Frontend] Fix incorrect density screen button selections.
Fireboyd78 Jun 18, 2022
8453251
Add regression fix for Tanner phasing through cars on foot.
Fireboyd78 Jun 18, 2022
4fb2445
Tried getting clippedPolygon working... at least it doesn't crash! xD
Fireboyd78 Jun 18, 2022
5ae9b7b
Remove all bug regression checks per Soapy's request.
Fireboyd78 Jun 18, 2022
fb9443c
Such minor grammar mistake
Fireboyd78 Jun 18, 2022
353072c
Replaced some inline code with equivalent function/macro.
Fireboyd78 Jun 18, 2022
5f64034
Added missing changes to remove bug regression stuff.
Fireboyd78 Jun 18, 2022
cde81af
Merge branch 'develop-SoapyMan' into develop-Fireboyd78
SoapyMan Jun 18, 2022
fa19818
Refactor extra data structure and add some more features.
Fireboyd78 Jun 19, 2022
04ef491
Fix a bug where the extra data magic gets overwritten.
Fireboyd78 Jun 19, 2022
f1e2dfd
Only load extra data if the header has correct magic.
Fireboyd78 Jun 19, 2022
d51d5bb
Haha oops
Fireboyd78 Jun 19, 2022
066f9c6
Flag cars with an ugly low LOD, increase some distances on PC.
Fireboyd78 Jun 19, 2022
7dd68b6
Merge branch 'develop-SoapyMan' into develop-Fireboyd78
SoapyMan Jul 12, 2022
d48420c
- fix PSX compile errors
SoapyMan Jul 12, 2022
c8ded05
Fixed bugs + cleaned up code related to noisy car sounds.
Fireboyd78 Jul 25, 2022
c5a67d4
Cleanup ResidentModelsBodge, MapCarIndexToBank
Fireboyd78 Jul 26, 2022
1733c23
Fix up some conditional operators for readability sake.
Fireboyd78 Aug 4, 2022
283da52
[Game:civ_ai] Minor code cleanup
Fireboyd78 Aug 4, 2022
b3efd1e
[Game:gamesnd] Some code cleanup and refactoring
Fireboyd78 Aug 4, 2022
959ab52
[Game:glaunch] Minor code cleanup
Fireboyd78 Aug 4, 2022
0ae9be2
[Game:handling] Some code cleanup and refactoring
Fireboyd78 Aug 4, 2022
bcf089d
[Game:job_fx] Cleaned up DrawExplosion, added reusable DrawGlobe func…
Fireboyd78 Aug 4, 2022
4300795
[Game:leadai] Corrected DIFF_ANGLES macro usage
Fireboyd78 Aug 4, 2022
b8f6b19
[Game:main] Minor code cleanup and refactoring
Fireboyd78 Aug 4, 2022
a44a186
[Game:main] Add missing reset value for Havana3DLevelMode
Fireboyd78 Aug 4, 2022
09dd49d
[Game:mc_snd] Code cleanup and refactoring
Fireboyd78 Aug 4, 2022
bd785cb
[Game:mdraw] Minor code cleanup and refactoring
Fireboyd78 Aug 4, 2022
3a93223
[Game:motion_c] Fixed sprite shadow drawing bugs, cleaned up code
Fireboyd78 Aug 5, 2022
26e947f
[Game:objanim] Fixed incorrect coordinates check for Vegas street lights
Fireboyd78 Aug 5, 2022
fa65031
[Game:pedest] Some code cleanup and refactoring
Fireboyd78 Aug 5, 2022
320c0e5
[Game:players] Minor code cleanup
Fireboyd78 Aug 5, 2022
f878b96
[Game:tile] Draw models unlit if no dynamic lights are available
Fireboyd78 Aug 5, 2022
399cdba
[Game:wheelforces] Minor code cleanup and refactoring
Fireboyd78 Aug 5, 2022
4a058c9
[redriver2_psxpc] Fixed a bug where FreeRoamer debug test cars may ha…
Fireboyd78 Aug 5, 2022
0538d27
Add missing MAX_PED_COLLISIONS define
Fireboyd78 Aug 5, 2022
04cdce5
[Game:cars] Draw cars unlit if no dynamic lights are available
Fireboyd78 Aug 5, 2022
80439d4
[Game:cars] Make use of gte_NormalColorCol macro
Fireboyd78 Aug 5, 2022
ddf78dd
Added support for more profile/mission data overrides.
Fireboyd78 Aug 5, 2022
d60f169
Added GetPlayerFelonyData and UpdatePlayerFelonyData functions.
Fireboyd78 Aug 5, 2022
f83cd21
[Game:felony] Minor code cleanup and refactoring
Fireboyd78 Aug 5, 2022
fb7d70e
[Game:draw] Minor code cleanup and refactoring
Fireboyd78 Aug 5, 2022
850ba2c
[Game:mission] Cleanup and refactor code; improved mission script dumps
Fireboyd78 Aug 5, 2022
1a6f6a4
[Game:pedest] Use PED_ACTION_TIME as the idle animation for a nicer l…
Fireboyd78 Aug 5, 2022
71d27ae
[Game:pres] Added support for custom text scaling values
Fireboyd78 Aug 5, 2022
8797858
Add missing data for new mission script dump code.
Fireboyd78 Aug 5, 2022
d19a88b
Added support for custom user mission threads/handlers.
Fireboyd78 Aug 5, 2022
b6ed4d8
[Game:cop_ai] Minor code cleanup and refactoring
Fireboyd78 Aug 5, 2022
c1c5b52
[Game:debris] Fixed some incorrect debris color entries
Fireboyd78 Aug 5, 2022
809a8fb
[Game:overlay] [PC] Added custom speedometer code
Fireboyd78 Aug 5, 2022
718cc18
Attempt to hackily fix yet another wibbly-wobbly car bug...
Fireboyd78 Aug 5, 2022
b227ae8
Add MORE missing code because I've gotten really good at this :D
Fireboyd78 Aug 5, 2022
d53a172
Added much-improved headlight drawing code.
Fireboyd78 Aug 5, 2022
31caa2b
[Game:event] Minor code cleanup and refactoring pass
Fireboyd78 Aug 5, 2022
b150b13
Created 'AddEvent' and 'NewEvent' functions for easier linked list op…
Fireboyd78 Aug 5, 2022
45f8792
[Game:event] Major code cleanup and refactoring
Fireboyd78 Aug 5, 2022
4724a56
Yet ANOTHER missing piece of code for my speedometer..sheesh!
Fireboyd78 Aug 5, 2022
e127c58
Make the pedestrians be more lively once in awhile!
Fireboyd78 Aug 5, 2022
f2e1a96
[Game:debris] Minor code cleanup and refactoring
Fireboyd78 Aug 5, 2022
e77f9ba
[Game:cars] Just a little code cleanup
Fireboyd78 Aug 5, 2022
4dd6279
Merge branch 'develop-SoapyMan' into develop-Fireboyd78
Fireboyd78 Aug 5, 2022
2e34a8d
Merge branch 'develop-SoapyMan' into develop-Fireboyd78
SoapyMan Sep 10, 2022
d2f6dcb
- fix rain drops
SoapyMan Aug 31, 2022
06e669b
- SetUpCivCollFlags regression fix causing height check to skip
SoapyMan Sep 13, 2022
49c37ee
Fixed some compiler errors :P
Fireboyd78 Sep 13, 2022
f62a2b6
[Game:mission] Fixed a code refactoring bug where chase hits were nev…
Fireboyd78 Sep 10, 2022
6de91ad
[Game:mission] Fixed a bug where palettes get overridden by mistake.
Fireboyd78 Sep 13, 2022
d790f3d
[Game:overmap] Fix speedometer overlap in minigames.
Fireboyd78 Sep 13, 2022
4abcb60
[Game:motion_c] Fixed OTHER_SPRITE's using TannerShadow by mistake.
Fireboyd78 Sep 13, 2022
27a0999
[Game:event] Disabled testing stuff for user event threads.
Fireboyd78 Sep 13, 2022
761e6bf
Improved fixes for wibbly wobbly cars.
Fireboyd78 Sep 13, 2022
963de5e
Merge branch 'develop-SoapyMan' into develop-Fireboyd78
SoapyMan Dec 13, 2022
0287aa6
Merge branch 'develop-Fireboyd78' of github.com:OpenDriver2/REDRIVER2…
SoapyMan Apr 21, 2023
593cb7e
Merge branch 'develop-SoapyMan' into develop-Fireboyd78
SoapyMan Apr 21, 2023
475e610
- support locale for Game graphics options menu
SoapyMan Apr 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src_rebuild/Game/C/handling.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,12 @@ void FixCarCos(CAR_COSMETICS* carCos, int externalModelNumber)
{
car_cosmetics[2].mass *= 3;
}

// [A] vegas box truck
if (GameLevel == 2 && externalModelNumber == 10)
{
carCos->extraInfo |= 4; // wibbly wobbly fuckery hack...
}
}

int ghost_mode = 0;
Expand Down
26 changes: 26 additions & 0 deletions src_rebuild/Game/C/wheelforces.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Collaborator Author

@Fireboyd78 Fireboyd78 Aug 5, 2022

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.

Copy link
Collaborator Author

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!

{
if (cp->thrust == 0 && cp->handbrake && (cp->hd.speed > 0 && cp->hd.speed < 4))
{
cp->hd.speed--;
cp->hd.wheel_speed >>= 1;
Copy link
Collaborator Author

@Fireboyd78 Fireboyd78 Aug 5, 2022

Choose a reason for hiding this comment

The 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;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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;
}
}
}
}

Expand Down