mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	Merge branch 'fix-z-movement-discard-mom' into 'master'
Let P_ZMovement use momentum changes from P_CheckPosition call Closes #365 See merge request KartKrew/Kart!869
This commit is contained in:
		
						commit
						584b714e72
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -2379,9 +2379,6 @@ boolean P_ZMovement(mobj_t *mo)
 | 
			
		|||
		&& !(mo->flags & MF_NOCLIPHEIGHT))
 | 
			
		||||
	{
 | 
			
		||||
		vector3_t mom;
 | 
			
		||||
		mom.x = mo->momx;
 | 
			
		||||
		mom.y = mo->momy;
 | 
			
		||||
		mom.z = mo->momz;
 | 
			
		||||
 | 
			
		||||
		if (mo->eflags & MFE_VERTICALFLIP)
 | 
			
		||||
			mo->z = mo->ceilingz - mo->height;
 | 
			
		||||
| 
						 | 
				
			
			@ -2398,6 +2395,11 @@ boolean P_ZMovement(mobj_t *mo)
 | 
			
		|||
		if (P_MobjWasRemoved(mo)) // mobjs can be removed by P_CheckPosition -- Monster Iestyn 31/07/21
 | 
			
		||||
			return false;
 | 
			
		||||
 | 
			
		||||
		// Set these here since P_CheckPosition can alter object's momentum values
 | 
			
		||||
		mom.x = mo->momx;
 | 
			
		||||
		mom.y = mo->momy;
 | 
			
		||||
		mom.z = mo->momz;
 | 
			
		||||
 | 
			
		||||
		K_UpdateMobjTerrain(mo, ((mo->eflags & MFE_VERTICALFLIP) ? tm.ceilingpic : tm.floorpic));
 | 
			
		||||
 | 
			
		||||
		if (((mo->eflags & MFE_VERTICALFLIP) ? tm.ceilingslope : tm.floorslope) && (mo->type != MT_STEAM))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue