mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	Fix sonic boom colorization
This commit is contained in:
		
							parent
							
								
									8ce90ff211
								
							
						
					
					
						commit
						c087c8bacc
					
				
					 1 changed files with 20 additions and 13 deletions
				
			
		
							
								
								
									
										33
									
								
								src/p_mobj.c
									
										
									
									
									
								
							
							
						
						
									
										33
									
								
								src/p_mobj.c
									
										
									
									
									
								
							|  | @ -8208,6 +8208,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj) | |||
| 				invinc_rotation_delay = 8; | ||||
| 			} | ||||
| 
 | ||||
| 			boolean updatecolor = false; | ||||
| 			if ((trans >= NUMTRANSMAPS) || mobj->target->player->flamedash || mobj->target->player->tripwirePass < TRIPWIRE_BOOST) | ||||
| 			{ | ||||
| 				// never show for flameshield dash, below tripwire minimum or transparency invalid
 | ||||
|  | @ -8227,6 +8228,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj) | |||
| 					// < 150% flickering normally
 | ||||
| 					mobj->renderflags |= RF_DONTDRAW; | ||||
| 				} | ||||
| 				updatecolor = true; | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
|  | @ -8239,6 +8241,24 @@ static boolean P_MobjRegularThink(mobj_t *mobj) | |||
| 				} | ||||
| 				mobj->renderflags |= (mobj->target->renderflags & RF_DONTDRAW); | ||||
| 
 | ||||
| 				updatecolor = true; | ||||
| 
 | ||||
| 				if (blastermode == !(mobj->flags2 & MF2_AMBUSH)) | ||||
| 				{ | ||||
| 					mobj->flags2 ^= MF2_AMBUSH; | ||||
| 					if (blastermode) | ||||
| 					{ | ||||
| 						P_SetMobjState(mobj, (mobj->extravalue1) ? S_TRIPWIREBOOST_BLAST_BOTTOM : S_TRIPWIREBOOST_BLAST_TOP); | ||||
| 					} | ||||
| 					else | ||||
| 					{ | ||||
| 						P_SetMobjState(mobj, (mobj->extravalue1) ? S_TRIPWIREBOOST_BOTTOM : S_TRIPWIREBOOST_TOP); | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
| 
 | ||||
| 			if (updatecolor) | ||||
| 			{ | ||||
| 				if (mobj->target->player->invincibilitytimer > 0) | ||||
| 				{ | ||||
| 					if (mobj->target->player->invincibilitytimer > itemtime+(2*TICRATE)) | ||||
|  | @ -8261,19 +8281,6 @@ static boolean P_MobjRegularThink(mobj_t *mobj) | |||
| 					mobj->color = SKINCOLOR_NONE; | ||||
| 					mobj->colorized = false; | ||||
| 				} | ||||
| 
 | ||||
| 				if (blastermode == !(mobj->flags2 & MF2_AMBUSH)) | ||||
| 				{ | ||||
| 					mobj->flags2 ^= MF2_AMBUSH; | ||||
| 					if (blastermode) | ||||
| 					{ | ||||
| 						P_SetMobjState(mobj, (mobj->extravalue1) ? S_TRIPWIREBOOST_BLAST_BOTTOM : S_TRIPWIREBOOST_BLAST_TOP); | ||||
| 					} | ||||
| 					else | ||||
| 					{ | ||||
| 						P_SetMobjState(mobj, (mobj->extravalue1) ? S_TRIPWIREBOOST_BOTTOM : S_TRIPWIREBOOST_TOP); | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Eidolon
						Eidolon