mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	Extend Thing_SetState
Second argument is now TID. Leaving it as 0 will still use the activator.
This commit is contained in:
		
							parent
							
								
									9f4c080964
								
							
						
					
					
						commit
						730d9a0a5b
					
				
					 1 changed files with 17 additions and 4 deletions
				
			
		
							
								
								
									
										21
									
								
								src/p_spec.c
									
										
									
									
									
								
							
							
						
						
									
										21
									
								
								src/p_spec.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -3163,11 +3163,24 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
 | 
			
		|||
			break;
 | 
			
		||||
 | 
			
		||||
		case 425: // Calls P_SetMobjState on calling mobj
 | 
			
		||||
			if (mo && !mo->player)
 | 
			
		||||
			{
 | 
			
		||||
				statenum_t state = stringargs[0] ? get_number(stringargs[0]) : S_NULL;
 | 
			
		||||
				if (state >= 0 && state < NUMSTATES)
 | 
			
		||||
					P_SetMobjState(mo, state);
 | 
			
		||||
				mobj_t *targetThing = NULL;
 | 
			
		||||
 | 
			
		||||
				while ((targetThing = P_FindMobjFromTID(args[1], targetThing, mo)) != NULL)
 | 
			
		||||
				{
 | 
			
		||||
					statenum_t state = S_NULL;
 | 
			
		||||
 | 
			
		||||
					if (targetThing->player != NULL)
 | 
			
		||||
					{
 | 
			
		||||
						continue;
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
					state = stringargs[0] ? get_number(stringargs[0]) : S_NULL;
 | 
			
		||||
					if (state >= 0 && state < NUMSTATES)
 | 
			
		||||
					{
 | 
			
		||||
						P_SetMobjState(targetThing, state);
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			break;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue