mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	Merge branch 'cascade-cleanup' into 'master'
Cascade Cleanup See merge request KartKrew/Kart!1128
This commit is contained in:
		
						commit
						d73b91bc81
					
				
					 5 changed files with 37 additions and 13 deletions
				
			
		| 
						 | 
				
			
			@ -2763,7 +2763,7 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
 | 
			
		|||
	}
 | 
			
		||||
	else if (fastcmp(params[0], "TRIGGER"))
 | 
			
		||||
	{
 | 
			
		||||
		PARAMCHECK(2); // strictly speaking at LEAST two
 | 
			
		||||
		PARAMCHECK(1);
 | 
			
		||||
		ty = UCRP_TRIGGER;
 | 
			
		||||
		re = atoi(params[1]);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -2791,9 +2791,9 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
 | 
			
		|||
				*spos = ' ';
 | 
			
		||||
			spos = params[--i];
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
		stringvar = Z_StrDup(params[2]);
 | 
			
		||||
#endif
 | 
			
		||||
	}
 | 
			
		||||
	else if ((offset=0) || fastcmp(params[0], "FALLOFF")
 | 
			
		||||
	||        (++offset && fastcmp(params[0], "TOUCHOFFROAD"))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										19
									
								
								src/g_game.c
									
										
									
									
									
								
							
							
						
						
									
										19
									
								
								src/g_game.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -3202,6 +3202,17 @@ void G_ExitLevel(void)
 | 
			
		|||
		UINT8 i;
 | 
			
		||||
		boolean doretry = false;
 | 
			
		||||
 | 
			
		||||
		if (grandprixinfo.gp == true)
 | 
			
		||||
		{
 | 
			
		||||
			for (i = 0; i < MAXPLAYERS; i++)
 | 
			
		||||
			{
 | 
			
		||||
				if (playeringame[i] && !players[i].spectator)
 | 
			
		||||
				{
 | 
			
		||||
					K_PlayerFinishGrandPrix(&players[i]);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (!G_GametypeUsesLives())
 | 
			
		||||
			; // never force a retry
 | 
			
		||||
		else if (specialstageinfo.valid == true || (gametyperules & GTR_BOSS))
 | 
			
		||||
| 
						 | 
				
			
			@ -3221,14 +3232,6 @@ void G_ExitLevel(void)
 | 
			
		|||
		}
 | 
			
		||||
		else if (grandprixinfo.gp == true && grandprixinfo.eventmode == GPEVENT_NONE)
 | 
			
		||||
		{
 | 
			
		||||
			for (i = 0; i < MAXPLAYERS; i++)
 | 
			
		||||
			{
 | 
			
		||||
				if (playeringame[i] && !players[i].spectator)
 | 
			
		||||
				{
 | 
			
		||||
					K_PlayerFinishGrandPrix(&players[i]);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			doretry = (grandprixinfo.wonround != true);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2242,9 +2242,21 @@ void M_DrawCupSelect(void)
 | 
			
		|||
						else
 | 
			
		||||
						{
 | 
			
		||||
							UINT16 col = SKINCOLOR_CHAOSEMERALD1 + (templevelsearch.cup->emeraldnum-1) % 7;
 | 
			
		||||
							patch_t *em;
 | 
			
		||||
 | 
			
		||||
							colormap = R_GetTranslationColormap(TC_DEFAULT, col, GTC_MENUCACHE);
 | 
			
		||||
 | 
			
		||||
							V_DrawFixedPatch((x + 26 - rankx)*FRACUNIT, (y + icony + 13)*FRACUNIT, FRACUNIT, 0, W_CachePatchName("K_EMERC", PU_CACHE), colormap);
 | 
			
		||||
							if (templevelsearch.cup->emeraldnum > 7)
 | 
			
		||||
							{
 | 
			
		||||
								em = W_CachePatchName("K_SUPER1", PU_CACHE);
 | 
			
		||||
								rankx += 2;
 | 
			
		||||
							}
 | 
			
		||||
							else
 | 
			
		||||
							{
 | 
			
		||||
								em = W_CachePatchName("K_EMERC", PU_CACHE);
 | 
			
		||||
							}
 | 
			
		||||
 | 
			
		||||
							V_DrawFixedPatch((x + 26 - rankx)*FRACUNIT, (y + icony + 13)*FRACUNIT, FRACUNIT, 0, em, colormap);
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1268,7 +1268,10 @@ static const char *M_GetConditionString(condition_t *cn)
 | 
			
		|||
		case UCRP_ISCHARACTER:
 | 
			
		||||
			if (cn->requirement < 0 || !skins[cn->requirement].realname[0])
 | 
			
		||||
				return va("INVALID CHAR CONDITION \"%d:%d\"", cn->type, cn->requirement);
 | 
			
		||||
			return va("as %s", skins[cn->requirement].realname);
 | 
			
		||||
			work = (R_SkinUsable(-1, cn->requirement, false))
 | 
			
		||||
				? skins[cn->requirement].realname
 | 
			
		||||
				: "???";
 | 
			
		||||
			return va("as %s", work);
 | 
			
		||||
		case UCRP_ISENGINECLASS:
 | 
			
		||||
			return va("with engine class %c", 'A' + cn->requirement);
 | 
			
		||||
		case UCRP_ISDIFFICULTY:
 | 
			
		||||
| 
						 | 
				
			
			@ -1374,7 +1377,7 @@ static const char *M_GetConditionString(condition_t *cn)
 | 
			
		|||
				G_TicsToCentiseconds(cn->requirement));
 | 
			
		||||
 | 
			
		||||
		case UCRP_TRIGGER:
 | 
			
		||||
			return cn->stringvar;
 | 
			
		||||
			return "do something special";
 | 
			
		||||
 | 
			
		||||
		case UCRP_FALLOFF:
 | 
			
		||||
			return (cn->requirement == 1) ? "fall off the course" : "without falling off";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -397,6 +397,12 @@ void M_ChallengesTick(void)
 | 
			
		|||
			// We got one!
 | 
			
		||||
			M_ChallengesAutoFocus(newunlock, false);
 | 
			
		||||
		}
 | 
			
		||||
		else if (gamedata->pendingkeyrounds > 0
 | 
			
		||||
			&& (gamedata->chaokeys < GDMAX_CHAOKEYS))
 | 
			
		||||
		{
 | 
			
		||||
			// Get ready to finish with pending chao key round tallying.
 | 
			
		||||
			challengesmenu.chaokeyadd = true;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			// All done! Let's save the unlocks we've busted open.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue