mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	Add R_RelativeTeleportViewInterpolation
Adjusts pview_old for relative teleport to attempt a contigious motion
This commit is contained in:
		
							parent
							
								
									1b55c73a3c
								
							
						
					
					
						commit
						e5d1b39e30
					
				
					 3 changed files with 11 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -2387,6 +2387,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
 | 
			
		|||
								camera[i].y += y;
 | 
			
		||||
								camera[i].z += z;
 | 
			
		||||
								camera[i].subsector = R_PointInSubsector(camera[i].x, camera[i].y);
 | 
			
		||||
								R_RelativeTeleportViewInterpolation(i, x, y, z, 0);
 | 
			
		||||
								break;
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -216,6 +216,14 @@ void R_ResetViewInterpolation(UINT8 p)
 | 
			
		|||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void R_RelativeTeleportViewInterpolation(UINT8 p, fixed_t xdiff, fixed_t ydiff, fixed_t zdiff, angle_t angdiff)
 | 
			
		||||
{
 | 
			
		||||
	pview_old[p].x += xdiff;
 | 
			
		||||
	pview_old[p].y += ydiff;
 | 
			
		||||
	pview_old[p].z += zdiff;
 | 
			
		||||
	pview_old[p].angle += angdiff;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void R_SetViewContext(enum viewcontext_e _viewcontext)
 | 
			
		||||
{
 | 
			
		||||
	UINT8 i = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -126,6 +126,8 @@ void R_InterpolateViewRollAngle(fixed_t frac);
 | 
			
		|||
void R_UpdateViewInterpolation(void);
 | 
			
		||||
// Reset the view states (e.g. after level load) so R_InterpolateView doesn't interpolate invalid data
 | 
			
		||||
void R_ResetViewInterpolation(UINT8 p);
 | 
			
		||||
// Update old view for seamless relative teleport
 | 
			
		||||
void R_RelativeTeleportViewInterpolation(UINT8 p, fixed_t xdiff, fixed_t ydiff, fixed_t zdiff, angle_t angdiff);
 | 
			
		||||
// Set the current view context (the viewvars pointed to by newview)
 | 
			
		||||
void R_SetViewContext(enum viewcontext_e _viewcontext);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue