by Kzer-Za » Sun Dec 05, 2021 1:02 am
Create a mod with this zscript:
Code: Select all
version "3.3"
class TestBall : DoomImpBall replaces DoomImpBall
{
int SpawnTime;
bool Spawned;
override void PostBeginPlay()
{
super.PostBeginPlay();
if (!Spawned)
{
let misl = TestBall(Spawn("TestBall",pos));
if (misl)
{
misl.target = target;
misl.angle = angle;
misl.pitch = pitch;
misl.Vel3DFromAngle(speed, misl.angle, target.BulletSlope());
misl.SpawnTime = level.time;
SpawnTime = level.time;
misl.Spawned = true;
}
}
}
override void Tick()
{
Super.Tick();
if (!Spawned && (level.time - SpawnTime > 0))
{
SetStateLabel("null");
}
}
}
Start a game with this mod and summon DoomImp. Use the code "noclip2" and fly above the Imp's level. As he throws his balls at you, you will notice that some of them are not aimed at you vertically, but go below you, with strictly horizontal velocity. It is statistical, so sometimes you have to wait a lot of time before even one such miscalculated ball appears, but sometimes almost all of them go horizontally. So I advise also creating a MAPINFO with "Aggressiveness = 1.0" skill definition, so that the Imp throws the balls more often.
I'm gonna also upload a zip with both zscript and mapinfo, ready for testing.
Before you say that this mod this meaningless: I know that, this mod is this simple only for testing purposes. I found this issue with Vel3DFromAngle while doing something else. It really does have a chance to not affect the actor's vertical velocity, so other mods may be affected.
- Attachments
-
Test.zip
- (669 Bytes) Downloaded 37 times
Create a mod with this zscript:
[code]
version "3.3"
class TestBall : DoomImpBall replaces DoomImpBall
{
int SpawnTime;
bool Spawned;
override void PostBeginPlay()
{
super.PostBeginPlay();
if (!Spawned)
{
let misl = TestBall(Spawn("TestBall",pos));
if (misl)
{
misl.target = target;
misl.angle = angle;
misl.pitch = pitch;
misl.Vel3DFromAngle(speed, misl.angle, target.BulletSlope());
misl.SpawnTime = level.time;
SpawnTime = level.time;
misl.Spawned = true;
}
}
}
override void Tick()
{
Super.Tick();
if (!Spawned && (level.time - SpawnTime > 0))
{
SetStateLabel("null");
}
}
}
[/code]
Start a game with this mod and summon DoomImp. Use the code "noclip2" and fly above the Imp's level. As he throws his balls at you, you will notice that some of them are not aimed at you vertically, but go below you, with strictly horizontal velocity. It is statistical, so sometimes you have to wait a lot of time before even one such miscalculated ball appears, but sometimes almost all of them go horizontally. So I advise also creating a MAPINFO with "Aggressiveness = 1.0" skill definition, so that the Imp throws the balls more often.
I'm gonna also upload a zip with both zscript and mapinfo, ready for testing.
Before you say that this mod this meaningless: I know that, this mod is this simple only for testing purposes. I found this issue with Vel3DFromAngle while doing something else. It really does have a chance to not affect the actor's vertical velocity, so other mods may be affected.