mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	Merge branch 'wall-transfer-everything' into 'master'
Wall transfer Orbinauts, Jawz, Ballhogs (and literally every object) See merge request KartKrew/Kart!701
This commit is contained in:
		
						commit
						e8f75be938
					
				
					 2 changed files with 76 additions and 78 deletions
				
			
		|  | @ -13209,7 +13209,6 @@ void A_ItemPop(mobj_t *actor) | |||
| 
 | ||||
| void A_JawzChase(mobj_t *actor) | ||||
| { | ||||
| 	const fixed_t currentspeed = R_PointToDist2(0, 0, actor->momx, actor->momy); | ||||
| 	player_t *player; | ||||
| 	fixed_t thrustamount = 0; | ||||
| 	fixed_t frictionsafety = (actor->friction == 0) ? 1 : actor->friction; | ||||
|  | @ -13294,12 +13293,15 @@ void A_JawzChase(mobj_t *actor) | |||
| 			P_SetTarget(&actor->tracer, NULL); | ||||
| 	} | ||||
| 
 | ||||
| 	if (!P_IsObjectOnGround(actor)) | ||||
| 	if (!actor->tracer) | ||||
| 	{ | ||||
| 		// No friction in the air
 | ||||
| 		frictionsafety = FRACUNIT; | ||||
| 		actor->angle = K_MomentumAngle(actor); | ||||
| 	} | ||||
| 
 | ||||
| 	if (P_IsObjectOnGround(actor)) | ||||
| 	{ | ||||
| 		const fixed_t currentspeed = R_PointToDist2(0, 0, actor->momx, actor->momy); | ||||
| 
 | ||||
| 		if (currentspeed >= topspeed) | ||||
| 		{ | ||||
| 			// Thrust as if you were at top speed, slow down naturally
 | ||||
|  | @ -13312,12 +13314,8 @@ void A_JawzChase(mobj_t *actor) | |||
| 			thrustamount = beatfriction + FixedDiv(topspeed - currentspeed, frictionsafety); | ||||
| 		} | ||||
| 
 | ||||
| 	if (!actor->tracer) | ||||
| 	{ | ||||
| 		actor->angle = K_MomentumAngle(actor); | ||||
| 	} | ||||
| 
 | ||||
| 		P_Thrust(actor, actor->angle, thrustamount); | ||||
| 	} | ||||
| 
 | ||||
| 	if ((actor->tracer != NULL) && (actor->tracer->health > 0)) | ||||
| 		return; | ||||
|  |  | |||
							
								
								
									
										42
									
								
								src/p_mobj.c
									
										
									
									
									
								
							
							
						
						
									
										42
									
								
								src/p_mobj.c
									
										
									
									
									
								
							|  | @ -1594,21 +1594,7 @@ void P_XYMovement(mobj_t *mo) | |||
| 		else if (P_MobjWasRemoved(mo)) | ||||
| 			return; | ||||
| 
 | ||||
| 		//{ SRB2kart - Jawz
 | ||||
| 		if (mo->type == MT_JAWZ || mo->type == MT_JAWZ_DUD) | ||||
| 		{ | ||||
| 			if (mo->health == 1) | ||||
| 			{ | ||||
| 				// This Item Damage
 | ||||
| 				S_StartSound(mo, mo->info->deathsound); | ||||
| 				P_KillMobj(mo, NULL, NULL, DMG_NORMAL); | ||||
| 
 | ||||
| 				P_SetObjectMomZ(mo, 8*FRACUNIT, false); | ||||
| 				P_InstaThrust(mo, R_PointToAngle2(mo->x, mo->y, mo->x + xmove, mo->y + ymove)+ANGLE_90, 16*FRACUNIT); | ||||
| 			} | ||||
| 		} | ||||
| 		//}
 | ||||
| 		else if (mo->flags & MF_MISSILE) | ||||
| 		if (mo->flags & MF_MISSILE) | ||||
| 		{ | ||||
| 			// explode a missile
 | ||||
| 			if (P_CheckSkyHit(mo)) | ||||
|  | @ -1671,7 +1657,7 @@ void P_XYMovement(mobj_t *mo) | |||
| 		{ | ||||
| 			boolean walltransferred = false; | ||||
| 
 | ||||
| 			if (player || mo->flags & MF_SLIDEME) | ||||
| 			//if (player || mo->flags & MF_SLIDEME)
 | ||||
| 			{ // try to slide along it
 | ||||
| 				// Wall transfer part 1.
 | ||||
| 				pslope_t *transferslope = NULL; | ||||
|  | @ -1745,15 +1731,20 @@ void P_XYMovement(mobj_t *mo) | |||
| 						fx->scale = mo->scale; | ||||
| 					} | ||||
| 
 | ||||
| 					if (mo->type == MT_ORBINAUT) // Orbinaut speed decreasing
 | ||||
| 					switch (mo->type) | ||||
| 					{ | ||||
| 						case MT_ORBINAUT: // Orbinaut speed decreasing
 | ||||
| 							if (mo->health > 1) | ||||
| 							{ | ||||
| 								S_StartSound(mo, mo->info->attacksound); | ||||
| 								mo->health--; | ||||
| 								mo->threshold = 0; | ||||
| 							} | ||||
| 						else if (mo->health == 1) | ||||
| 							/*FALLTHRU*/ | ||||
| 
 | ||||
| 						case MT_JAWZ: | ||||
| 						case MT_JAWZ_DUD: | ||||
| 							if (mo->health == 1) | ||||
| 							{ | ||||
| 								// This Item Damage
 | ||||
| 								S_StartSound(mo, mo->info->deathsound); | ||||
|  | @ -1762,6 +1753,10 @@ void P_XYMovement(mobj_t *mo) | |||
| 								P_SetObjectMomZ(mo, 8*FRACUNIT, false); | ||||
| 								P_InstaThrust(mo, R_PointToAngle2(mo->x, mo->y, mo->x + xmove, mo->y + ymove)+ANGLE_90, 16*FRACUNIT); | ||||
| 							} | ||||
| 							break; | ||||
| 
 | ||||
| 						default: | ||||
| 							break; | ||||
| 					} | ||||
| 
 | ||||
| 					// Bubble bounce
 | ||||
|  | @ -6738,13 +6733,18 @@ static boolean P_MobjRegularThink(mobj_t *mobj) | |||
| 			} | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			mobj_t *ghost = P_SpawnGhostMobj(mobj); | ||||
| 			ghost->colorized = true; // already has color!
 | ||||
| 
 | ||||
| 			mobj->angle = K_MomentumAngle(mobj); | ||||
| 
 | ||||
| 			if (P_IsObjectOnGround(mobj)) | ||||
| 			{ | ||||
| 				fixed_t finalspeed = mobj->movefactor; | ||||
| 				const fixed_t currentspeed = R_PointToDist2(0, 0, mobj->momx, mobj->momy); | ||||
| 				fixed_t thrustamount = 0; | ||||
| 				fixed_t frictionsafety = (mobj->friction == 0) ? 1 : mobj->friction; | ||||
| 			mobj_t *ghost = P_SpawnGhostMobj(mobj); | ||||
| 			ghost->colorized = true; // already has color!
 | ||||
| 
 | ||||
| 				if (!grounded) | ||||
| 				{ | ||||
|  | @ -6752,7 +6752,6 @@ static boolean P_MobjRegularThink(mobj_t *mobj) | |||
| 					frictionsafety = FRACUNIT; | ||||
| 				} | ||||
| 
 | ||||
| 			mobj->angle = K_MomentumAngle(mobj); | ||||
| 				if (mobj->health <= 5) | ||||
| 				{ | ||||
| 					INT32 i; | ||||
|  | @ -6773,6 +6772,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj) | |||
| 				} | ||||
| 
 | ||||
| 				P_Thrust(mobj, mobj->angle, thrustamount); | ||||
| 			} | ||||
| 
 | ||||
| 			if (P_MobjTouchingSectorSpecial(mobj, 3, 1, true)) | ||||
| 				K_DoPogoSpring(mobj, 0, 1); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Oni
						Oni