// Blood Class UTBlood : Actor { Default { RenderStyle "Add"; Scale 1.1; +NOBLOCKMAP; +NOGRAVITY; +NOTELEPORT; +FORCEXYBILLBOARD; +PUFFGETSOWNER; } void A_Bleed( int str = 1 ) { Scale *= 0.7+0.3*str; vel *= 0; let b = Spawn("UTBloodSpurt",pos); b.angle = angle+FRandom[Blud](-15,15); b.pitch = pitch+FRandom[Blud](-15,15); b.translation = translation; b.args[0] = str; // transfer blood color for decals if ( target && target.bloodcolor ) b.SetShade(target.bloodcolor); else b.SetShade(gameinfo.defaultbloodcolor); } States { Spawn: TNT1 A 0 NoDelay A_Bleed(3); Goto Puff; TNT1 A 0 A_Bleed(2); Goto Puff; TNT1 A 0 A_Bleed(1); Goto Puff; Puff: TNT1 A 0 { int dec = Random[Blod](0,2); if ( dec == 1 ) return ResolveState("Puff1"); if ( dec == 2 ) return ResolveState("Puff2"); return ResolveState("Puff3"); } Puff1: BPF1 ABCDEFGHIJK 1; Stop; Puff2: BPF2 ABCDEFGH 1; Stop; Puff3: BPF3 ABCDEFGHIJ 1; Stop; } } // single drop of blod Class UTBloodDrop : Actor { Default { Scale 0.24; Radius 2; Height 2; RenderStyle "Translucent"; +MISSILE; +NOTELEPORT; +THRUACTORS; +FORCEXYBILLBOARD; } override void PostBeginPlay() { Super.PostBeginPlay(); SetState(FindState("Spawn")+Random[Blod](0,4)); Scale *= FRandom[Blod](0.6,1.4); } void A_BloodDie() { // TODO } States { Spawn: BDRP ABCDE -1; Stop; Death: TNT1 A 0 A_BloodDie(); Stop; } } // a burst of blod Class UTBloodSpurt : Actor { double str; Default { +NOBLOCKMAP; +NOGRAVITY; +NOTELEPORT; +THRUACTORS; } override void PostBeginPlay() { Super.PostBeginPlay(); str = FRandom[Blood](2.0,3.2)*args[0]; int sz = 7*args[0]; double ang, pt; for ( int i=0; i gibcls[] = {"UTGenericGib1","UTGenericGib2","UTGenericGib3","UTGenericGib4"}; Actor a; double ang, pt; Vector3 dir; bool dummy; for ( int i=0; i double.epsilon ) vel = (vel.unit()+(FRandom[Blod](-0.2,0.2),FRandom[Blod](-0.2,0.2),FRandom[Blod](-0.2,0.2))).unit()*vel.length(); A_PlaySound("misc/gibp"); double ang, pt; for ( int i=0; i<6; i++ ) { let d = Spawn("UTBloodDrop",pos); d.translation = bloodtranslation; if ( bloodcolor ) d.SetShade(bloodcolor); else d.SetShade(gameinfo.defaultbloodcolor); ang = FRandom[Blood](0,360); pt = FRandom[Blood](-90,90); Vector3 dir = -vel*0.4; dir += (cos(ang)*cos(pt),sin(ang)*cos(pt),-sin(pt))*1.3; d.vel = dir*FRandom[Blood](0.8,1.2); d.scale *= 0.75*FRandom[Blood](0.6,1.4); } rollvel = FRandom[Blod](5,15)*RandomPick[Blod](-1,1); anglevel = FRandom[Blod](5,15)*RandomPick[Blod](-1,1); pitchvel = FRandom[Blod](5,15)*RandomPick[Blod](-1,1); } States { Spawn: UGIB A 1 { roll += rollvel; angle += anglevel; pitch += pitchvel; } Wait; Bounce: UGIB A 0 A_HandleBounce(); Goto Spawn; Death: UGIB A 1 A_SetTics(Random[Blod](12,18)*15); UGIB A 1 A_FadeOut(0.05); Wait; } } Class UTGenericGib1 : UTGib {} Class UTGenericGib2 : UTGib {} Class UTGenericGib3 : UTGib {} Class UTGenericGib4 : UTGib {} Class UTThigh : UTGib {} Class UTFemaleArm : UTGib {} Class UTFemaleFoot : UTGib {} Class UTFemaleTorso : UTGib {} Class UTMaleArm : UTGib {} Class UTMaleFoot : UTGib {} Class UTMaleTorso : UTGib {} Class UTHeart : UTGib { States { Spawn: UGIB ABCDEF 2; Loop; Bounce: UGIB A 0; Goto Spawn; Death: UGIB ABCDEFABCDEFABCDEF 2; UGIB ABCDEFABCDEF 4; UGIB ABCDEF 8; UGIB A -1; Stop; } } Class UTLiver : UTGib {} Class UTStomach : UTGib {} Class UTHeadFemale : UTGib {} Class UTHeadMale : UTGib {}