Generic gib models (for now).

This commit is contained in:
Mari the Deer 2024-04-10 12:40:45 +02:00
commit c757acf7aa
5 changed files with 36 additions and 8 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1122 \cu(Wed Apr 10 12:40:30 CEST 2024)\c-";
SWWM_SHORTVER="\cw1.3pre r1122 \cu(2024-04-10 12:40:30)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1123 \cu(Wed Apr 10 12:40:45 CEST 2024)\c-";
SWWM_SHORTVER="\cw1.3pre r1123 \cu(2024-04-10 12:40:45)\c-";

View file

@ -119,6 +119,30 @@ Model "mkBloodDrop"
FrameIndex SBLD M 0 0
}
Model "mkFlyingGib"
{
Path "models"
Model 0 "ChunkyMeat.md3"
Skin 0 "ChunkyMeat.png"
Scale 0.05 0.05 0.05
USEROTATIONCENTER
USEACTORPITCH
USEACTORROLL
CORRECTPIXELSTRETCH
Rotation-Center 0 0 1
ZOffset 2
FrameIndex XZW1 A 0 0
FrameIndex XZW1 B 0 1
FrameIndex XZW1 C 0 2
FrameIndex XZW1 D 0 3
FrameIndex XZW1 E 0 4
FrameIndex XZW1 F 0 5
FrameIndex XZW1 G 0 6
FrameIndex XZW1 H 0 7
}
Model "RadiusDebugSphere"
{
Path "models/extra"

BIN
models/ChunkyMeat.md3 Normal file

Binary file not shown.

BIN
models/ChunkyMeat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -509,7 +509,7 @@ Class mkFlyingGib : Actor
int lastbleed;
color shadecol;
bool bleeding;
double rollvel;
double rollvel, pitchvel;
mkFlyingGib prevmeat, nextmeat;
Vector3 oldpos;
TextureID pufftex[8];
@ -523,7 +523,7 @@ Class mkFlyingGib : Actor
puff.lifetime = 40;
puff.accel = (0,0,-.25);
puff.fadestep = -1;
frame = Random[Blood](0,5);
frame = Random[Blood](0,7);
double ang = FRandom[Gibs](0,360);
double pt = FRandom[Gibs](-60,20);
Vector3 dir = SWWMUtility.Vec3FromAngles(ang,pt);
@ -534,6 +534,7 @@ Class mkFlyingGib : Actor
CopyBloodColor(master);
}
rollvel = FRandom[Gibs](10,50)*RandomPick[Gibs](-1,1)*clamp(vel.length()/10.,.25,4.);
pitchvel = FRandom[Gibs](10,50)*RandomPick[Gibs](-1,1)*clamp(vel.length()/10.,.25,4.);
scale *= FRandom[Gibs](.5,1.5);
if ( master && master.bloodcolor ) shadecol = Color(master.bloodcolor.r/2,master.bloodcolor.g/2,master.bloodcolor.b/2);
else shadecol = Color(80,0,0);
@ -562,9 +563,11 @@ Class mkFlyingGib : Actor
return;
}
roll += rollvel;
pitch += pitchvel;
if ( waterlevel > 0 )
{
rollvel *= .99;
pitchvel *= .99;
return;
}
if ( !bleeding ) return;
@ -602,6 +605,7 @@ Class mkFlyingGib : Actor
vel = dir*spd;
}
rollvel = FRandom[Gibs](10,50)*RandomPick[Gibs](-1,1)*clamp(vel.length()/10.,.25,4.);
pitchvel = FRandom[Gibs](10,50)*RandomPick[Gibs](-1,1)*clamp(vel.length()/10.,.25,4.);
if ( lastbleed > level.maptime ) return;
lastbleed = level.maptime+5;
TraceBleedAngle(int(vel.length()),angle+180,-pitch);
@ -632,10 +636,10 @@ Class mkFlyingGib : Actor
States
{
Spawn:
FGIB # 1;
XZW1 # 1;
Wait;
Bounce:
FGIB # 0
XZW1 # 0
{
A_Bleed();
A_StartSound("misc/gibhit",CHAN_BODY,CHANF_OVERLAP);
@ -645,10 +649,10 @@ Class mkFlyingGib : Actor
}
Goto Spawn;
Death:
FGIB # 1 A_JumpIf(pos.z<=floorz,"Death2");
XZW1 # 1 A_JumpIf(pos.z<=floorz,"Death2");
Wait;
Death2:
FGIB # -1
XZW1 # -1
{
A_StartSound("misc/gibhit",CHAN_BODY,CHANF_OVERLAP);
pitch = Random[Gibs](-5,5);