Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UTGameContent.UTDmgType_BioGoo


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
/**
 * Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
 */

class UTDmgType_BioGoo extends UTDamageType
	abstract;

static function DoCustomDamageEffects(UTPawn ThePawn, class<UTDamageType> TheDamageType, const out TraceHitInfo HitInfo, vector HitLocation)
{
	local int i, Num;
	local MaterialInstanceConstant OldMIC, NewMIC;
	local int ValueIndex;
	local bool bFoundDiffuse;
	local Texture DiffuseTexture;

	//Char_Diffuse
	if (ThePawn.CurrFamilyInfo != None && ThePawn.CurrFamilyInfo.default.BioDeathMICParent != None)
	{
		Num = ThePawn.Mesh.GetNumElements();
		for (i = 0; i < Num; i++)
		{
			OldMIC = MaterialInstanceConstant(ThePawn.Mesh.GetMaterial(i));
			if (OldMIC != None)
			{
				// look up the chain until we find an MIC with the texture parameters that we need
				bFoundDiffuse = FALSE;
				//bFoundDiffuse = OldMic.GetTextureParameterValue( 'Char_Diffuse', DiffuseTexture );
				for( ValueIndex = 0;ValueIndex < OldMic.TextureParameterValues.Length;ValueIndex++)
				{
					if( OldMic.TextureParameterValues[ValueIndex].ParameterName == 'Char_Diffuse' )
					{
						OldMic.GetTextureParameterValue( 'Char_Diffuse', DiffuseTexture );
						bFoundDiffuse = TRUE;
						break;
					}
				}

				while( bFoundDiffuse != TRUE )
				{
					OldMic = MaterialInstanceConstant(OldMic.Parent);
					for( ValueIndex = 0;ValueIndex < OldMic.TextureParameterValues.Length;ValueIndex++)
					{
						if( OldMic.TextureParameterValues[ValueIndex].ParameterName == 'Char_Diffuse' )
						{
							OldMic.GetTextureParameterValue( 'Char_Diffuse', DiffuseTexture );
							bFoundDiffuse = TRUE;
							break;
						}
					}
				}

				OldMIC = MaterialInstanceConstant(ThePawn.Mesh.GetMaterial(i));
				OldMIC.SetTextureParameterValue( 'Char_Diffuse', DiffuseTexture );

				// duplicate the material (copying its parameter values)
				// then set the parent to the bio material
				NewMIC = new(ThePawn) OldMIC.Class(OldMic);
				NewMIC.SetParent(ThePawn.CurrFamilyInfo.default.BioDeathMICParent);
				ThePawn.Mesh.SetMaterial(i, NewMIC);
			}
		}

		ThePawn.Mesh.AttachComponent(ThePawn.BioBurnAway, ThePawn.TorsoBoneName);
		ThePawn.BioBurnAway.ActivateSystem();
		ThePawn.bKilledByBio = TRUE;
		ThePawn.bGibbed=TRUE; // this makes it so you can't then switch to a "gibbing" weapon and get chunks
		ThePawn.UpdateShadowSettings( FALSE );
	}
}

defaultproperties
{
   DamageBodyMatColor=(R=0.000000,G=50.000000,B=0.000000,A=1.000000)
   DamageOverlayTime=0.200000
   DeathOverlayTime=0.400000
   bUseDamageBasedDeathEffects=True
   bAnimateHipsForDeathAnim=False
   DamageWeaponClass=Class'UTGameContent.UTWeap_BioRifle_Content'
   DeathAnim="Death_Stinger"
   MotorDecayTime=1.000000
   DamageCameraAnim=CameraAnim'Camera_FX.BioRifle.C_WP_Bio_Hit'
   KillStatsName="KILLS_BIORIFLE"
   DeathStatsName="DEATHS_BIORIFLE"
   SuicideStatsName="SUICIDES_BIORIFLE"
   RewardCount=15
   RewardAnnouncementSwitch=4
   RewardEvent="REWARD_BIOHAZARD"
   CustomTauntIndex=1
   DeathString="`o was slimed by `k's Bio Goo."
   FemaleSuicide="`o suffocated in her own Goo."
   MaleSuicide="`o suffocated in his own Goo."
   VehicleDamageScaling=0.800000
   VehicleMomentumScaling=0.200000
   Name="Default__UTDmgType_BioGoo"
   ObjectArchetype=UTDamageType'UTGame.Default__UTDamageType'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: tr 31-1-2018 17:18:54.000 - Creation time: sk 18-3-2018 10:01:19.666 - Created with UnCodeX