diff --git a/modeldef.misc b/modeldef.misc index 8351332..ae2cd73 100644 --- a/modeldef.misc +++ b/modeldef.misc @@ -4,7 +4,7 @@ Model "UTTeleportFog" Model 0 "Tele2_d.3d" Skin 0 "JTele2_01.png" Scale 0.2 0.2 0.24 - ZOffset 10 + ZOffset 16 DONTCULLBACKFACES FrameIndex TELE A 0 0 diff --git a/models/TeleSoldier_a.3d b/models/TeleSoldier_a.3d new file mode 100644 index 0000000..7b8fed4 Binary files /dev/null and b/models/TeleSoldier_a.3d differ diff --git a/models/TeleSoldier_d.3d b/models/TeleSoldier_d.3d new file mode 100644 index 0000000..0b2bbaa Binary files /dev/null and b/models/TeleSoldier_d.3d differ diff --git a/models/bpak.png b/models/bpak.png index 45ef6fa..a1e7adb 100644 Binary files a/models/bpak.png and b/models/bpak.png differ diff --git a/models/telepo_a.3d b/models/telepo_a.3d new file mode 100644 index 0000000..8319019 Binary files /dev/null and b/models/telepo_a.3d differ diff --git a/models/telepo_d.3d b/models/telepo_d.3d new file mode 100644 index 0000000..38bb8ba Binary files /dev/null and b/models/telepo_d.3d differ diff --git a/sprites/DBEFA0.png b/sprites/DBEFA0.png new file mode 100644 index 0000000..528c159 Binary files /dev/null and b/sprites/DBEFA0.png differ diff --git a/sprites/TPEFA0.png b/sprites/TPEFA0.png new file mode 100644 index 0000000..d477e75 Binary files /dev/null and b/sprites/TPEFA0.png differ diff --git a/sprites/UTFLA0.png b/sprites/UTFLA0.png new file mode 100644 index 0000000..f0e283c Binary files /dev/null and b/sprites/UTFLA0.png differ diff --git a/sprites/UTFLB0.png b/sprites/UTFLB0.png new file mode 100644 index 0000000..1a01e08 Binary files /dev/null and b/sprites/UTFLB0.png differ diff --git a/sprites/UTFLC0.png b/sprites/UTFLC0.png new file mode 100644 index 0000000..c2454b3 Binary files /dev/null and b/sprites/UTFLC0.png differ diff --git a/sprites/UTFLD0.png b/sprites/UTFLD0.png new file mode 100644 index 0000000..1e46fc3 Binary files /dev/null and b/sprites/UTFLD0.png differ diff --git a/sprites/UTFLE0.png b/sprites/UTFLE0.png new file mode 100644 index 0000000..fc98a8c Binary files /dev/null and b/sprites/UTFLE0.png differ diff --git a/sprites/UTFLF0.png b/sprites/UTFLF0.png new file mode 100644 index 0000000..5d15eba Binary files /dev/null and b/sprites/UTFLF0.png differ diff --git a/sprites/UTFLG0.png b/sprites/UTFLG0.png new file mode 100644 index 0000000..d167068 Binary files /dev/null and b/sprites/UTFLG0.png differ diff --git a/sprites/UTFLH0.png b/sprites/UTFLH0.png new file mode 100644 index 0000000..29fcd83 Binary files /dev/null and b/sprites/UTFLH0.png differ diff --git a/zscript/healitems.zsc b/zscript/healitems.zsc index 541723f..1aa0eca 100644 --- a/zscript/healitems.zsc +++ b/zscript/healitems.zsc @@ -13,6 +13,10 @@ Class UTHealthPack : Health Inventory.PickupSound "misc/ut_keg"; Inventory.RespawnTics 3500; } + override String PickupMessage() + { + return String.Format("%s +%d",PickupMsg,Amount); + } States { Spawn: @@ -30,6 +34,10 @@ Class UTHealthBox : Health Inventory.PickupMessage "$I_HEALTHBOX"; Inventory.PickupSound "misc/ut_heal"; } + override String PickupMessage() + { + return String.Format("%s +%d",PickupMsg,Amount); + } States { Spawn: @@ -48,6 +56,10 @@ Class UTMedBox : Health Inventory.PickupSound "misc/ut_heal"; Inventory.RespawnTics 700; } + override String PickupMessage() + { + return String.Format("%s +%d",PickupMsg,Amount); + } States { Spawn: @@ -69,6 +81,10 @@ Class UTHealthBonus : Health Inventory.PickupSound "misc/ut_heal"; RenderStyle "Add"; } + override String PickupMessage() + { + return String.Format("%s +%d",PickupMsg,Amount); + } States { Spawn: diff --git a/zscript/translocator.zsc b/zscript/translocator.zsc index 945eb2a..b1191d3 100644 --- a/zscript/translocator.zsc +++ b/zscript/translocator.zsc @@ -241,8 +241,34 @@ Class TranslocatorModule : Actor } } +Class TranslocatorAfterimageParticle : Actor +{ + Default + { + RenderStyle "Add"; + Scale 0.6; + Alpha 0.4; + +NOCLIP; + +NOGRAVITY; + +DONTSPLASH; + +NOTELEPORT; + } + override void Tick() + { + Super.Tick(); + A_SetScale(.1+.2*alpha); + } + States + { + Spawn: + TPEF A 1 Bright A_FadeOut(.4/TICRATE); + Wait; + } +} + Class TranslocatorAfterimage : Actor { + Array particles; Vector3 spreaddir; Default { @@ -266,21 +292,47 @@ Class TranslocatorAfterimage : Actor return; } scale = target.scale; - angle = target.angle; - pitch = target.pitch; - roll = target.roll; - vel = (FRandom[Transloc](-.5,.5),FRandom[Transloc](-.5,.5),FRandom[Transloc](-.5,.5)); + angle = target.angle-90; + roll = -90; + Vector3 x, y, z; + [x, y, z] = dt_CoordUtil.GetAxes(0,angle,roll); + int lump = Wads.CheckNumForFullname("models/TeleSoldier_a.3d"); + String anivfile = Wads.ReadLump(lump); + int numframes = anivfile.ByteAt(0); + numframes |= anivfile.ByteAt(1)<<8; + int fsiz = anivfile.ByteAt(2); + fsiz |= anivfile.ByteAt(3)<<8; + particles.Resize(fsiz/4); + int cursor = 4; + for ( int i=0; i>11)&0x7ff)<<21, + az = ((avert>>22)&0x3ff)<<22; + Vector3 ppos = (ax/2097152.-5.,ay/2097152.+1.25,az/4194304.); + ppos.xy *= 0.0625; + ppos.z *= 0.125; + particles[i] = Spawn("TranslocatorAfterimageParticle",level.Vec3Offset(pos,ppos.x*x+ppos.y*y+ppos.z*z+(0,0,30))); + particles[i].vel = (FRandom[Transloc](-.25,.25),FRandom[Transloc](-.25,.25),FRandom[Transloc](-.25,.25)); + } } - action void A_Spread() + void A_Spread() { - vel += invoker.spreaddir*speed; - A_FadeOut(0.003); + for ( int i=0; i px, py, pz; + Array parts; + Class pclass; + int numframes, numverts; + double animframe, animrate; + + Default + { + Tag "telepo;UTMeshParticle"; + Args 28; // animation rate in fps + ReactionTime 35; // total lifespan + XScale 0.015; // scale of the model + YScale 0.03; // scale of the model + +NOGRAVITY; + +NOCLIP; + +DONTSPLASH; + +NOTELEPORT; + } + override void PostBeginPlay() + { + Super.PostBeginPlay(); + Array strs; + strs.Clear(); + GetTag().Split(strs,";"); + pclass = strs[1]; + int lump = Wads.CheckNumForFullname(String.Format("models/%s_a.3d",strs[0])); + String anivfile = Wads.ReadLump(lump); + numframes = anivfile.ByteAt(0); + numframes |= anivfile.ByteAt(1)<<8; + int fsiz = anivfile.ByteAt(2); + fsiz |= anivfile.ByteAt(3)<<8; + numverts = fsiz/4; + px.Resize(numverts*numframes); + py.Resize(numverts*numframes); + pz.Resize(numverts*numframes); + parts.Resize(numverts); + int cursor = 4; + for ( int i=0; i>11)&0x7ff)<<21, + az = ((avert>>22)&0x3ff)<<22; + px[i] = ax/2097152.; + py[i] = ay/2097152.; + pz[i] = az/4194304.; + } + Vector3 x, y, z; + [x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); + for ( int i=0; i= numframes) || (ReactionTime <= 0) ) + { + Destroy(); + return; + } + int framea = int(floor(animframe)), frameb = int(ceil(animframe)); + double theta = animframe-framea; + Vector3 posa, posb, ipos; + Vector3 x, y, z; + [x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); + for ( int i=0; i