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

The Most Awesome PR! #182

wants to merge 85 commits into from

Conversation

Fireboyd78
Copy link
Collaborator

It's 4:20am and I can't be bothered to document everything right now.

Fireboyd78 added 17 commits May 16, 2022 14:12
…tscenes.

- Uses the padding reserved at the end of replay/profile data

- Backwards compatible with older replays by using zero/empty values

- Added parameter to RestoreGameVars

- Added StoreGameVars + Load/SaveExtraData

- Moved some code out of RestoreGameVars to where its intended usage is

- Misc styling changes
- Use 8-bit char arrays in place of bitfields as needed

- Slightly optimized car noise logic

- Added several macros

- Added collision debugging support for carsOnBoat
- PRIMTAB_SIZE has also been increased due to this change
- Added enum for all screen types

- PC version of button struct makes use of unused field

- Setup some custom colors for PC version of buttons

- Fixed flickering of 'Time of Day/Condition' text

- Time of Day/Condition is now restored when returning from car select screen
Draw code doesn't seem to do anything.

There goes 4 hours of my life I'll never get back.
@Fireboyd78 Fireboyd78 added the enhancement New feature or request label Jun 18, 2022
@SoapyMan SoapyMan self-requested a review June 18, 2022 12:29
Copy link
Contributor

@SoapyMan SoapyMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all good to me, just need to test the game with and without the changes.

Fireboyd78 and others added 6 commits June 18, 2022 22:05
- Time of Day and Weather now properly stored in extra data

- Added support for custom spawn point data

- Added future support for extra profile data

- Moved ACTIVE_FLAGS structure into anonymous union

- TODO: Ability to select a spawn point in Take a Ride

static char *density_names[] = {
"Traffic Density",
"Peds Density",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should declare new translation value in GameStrId and use G_LTXT_ID

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely planned, just need final feedback on the new dynamic menus I've added before setting up language entries.

"Medium",
"High",
"Ultra",
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, new ids for GameStrId and a G_LTXT_ID

@@ -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!

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants