mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	Merge branch 'the-big-large-slope-physics' into 'the-scary-22-merge'
The big large slope physics See merge request KartKrew/Kart!320
This commit is contained in:
		
						commit
						bceffa9c2f
					
				
					 2 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -953,7 +953,7 @@ void P_ButteredSlope(mobj_t *mo)
 | 
			
		|||
			return; // Allow the player to stand still on slopes below a certain steepness
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	thrust = FINESINE(mo->standingslope->zangle>>ANGLETOFINESHIFT) * 4 / 5 * (mo->eflags & MFE_VERTICALFLIP ? 1 : -1);
 | 
			
		||||
	thrust = FINESINE(mo->standingslope->zangle>>ANGLETOFINESHIFT) * 5 / 4 * (mo->eflags & MFE_VERTICALFLIP ? 1 : -1);
 | 
			
		||||
 | 
			
		||||
	if (mo->player) {
 | 
			
		||||
		fixed_t mult = FRACUNIT;
 | 
			
		||||
| 
						 | 
				
			
			@ -963,7 +963,7 @@ void P_ButteredSlope(mobj_t *mo)
 | 
			
		|||
			if (P_MobjFlip(mo) * mo->standingslope->zdelta < 0)
 | 
			
		||||
				angle ^= ANGLE_180;
 | 
			
		||||
 | 
			
		||||
			mult = FRACUNIT + (FRACUNIT + FINECOSINE(angle>>ANGLETOFINESHIFT))*3/2;
 | 
			
		||||
			mult = FRACUNIT + (FRACUNIT + FINECOSINE(angle>>ANGLETOFINESHIFT))*4/3;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		thrust = FixedMul(thrust, mult);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1855,6 +1855,11 @@ static void P_3dMovement(player_t *player)
 | 
			
		|||
	totalthrust.x = totalthrust.y = 0; // I forget if this is needed
 | 
			
		||||
	totalthrust.z = FRACUNIT*P_MobjFlip(player->mo)/3; // A bit of extra push-back on slopes
 | 
			
		||||
 | 
			
		||||
	if (player->kartstuff[k_sneakertimer] > 0)
 | 
			
		||||
	{
 | 
			
		||||
		totalthrust.z = -(totalthrust.z);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Get the old momentum; this will be needed at the end of the function! -SH
 | 
			
		||||
	oldMagnitude = R_PointToDist2(player->mo->momx - player->cmomx, player->mo->momy - player->cmomy, 0, 0);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue