mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	Obj_PlayerUFOCollide: Apply height checks even when boosting
This commit is contained in:
		
							parent
							
								
									205de5503f
								
							
						
					
					
						commit
						3fbede8eb2
					
				
					 1 changed files with 10 additions and 10 deletions
				
			
		| 
						 | 
					@ -723,6 +723,16 @@ void Obj_PlayerUFOCollide(mobj_t *ufo, mobj_t *other)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (other->z > ufo->z + ufo->height)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return; // overhead
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (other->z + other->height < ufo->z)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return; // underneath
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((other->player->sneakertimer > 0)
 | 
						if ((other->player->sneakertimer > 0)
 | 
				
			||||||
		&& !P_PlayerInPain(other->player)
 | 
							&& !P_PlayerInPain(other->player)
 | 
				
			||||||
		&& (other->player->flashing == 0))
 | 
							&& (other->player->flashing == 0))
 | 
				
			||||||
| 
						 | 
					@ -737,16 +747,6 @@ void Obj_PlayerUFOCollide(mobj_t *ufo, mobj_t *other)
 | 
				
			||||||
		const angle_t moveAngle = K_MomentumAngle(ufo);
 | 
							const angle_t moveAngle = K_MomentumAngle(ufo);
 | 
				
			||||||
		const angle_t clipAngle = R_PointToAngle2(ufo->x, ufo->y, other->x, other->y);
 | 
							const angle_t clipAngle = R_PointToAngle2(ufo->x, ufo->y, other->x, other->y);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (other->z > ufo->z + ufo->height)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
			return; // overhead
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (other->z + other->height < ufo->z)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
			return; // underneath
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (AngleDelta(moveAngle, clipAngle) < ANG60)
 | 
							if (AngleDelta(moveAngle, clipAngle) < ANG60)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			// in front
 | 
								// in front
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue