by AFADoomer » Sat Apr 13, 2024 10:26 am
After the Morph refactoring (1 March 24 and following commits), PowerMorph items no longer unmorph the player properly.
The PowerMorph item no longer shows up in the morphed player's inventory, so the player can no longer be unmorphed by removing the powerup from inventory.
If morphs are allowed to run to full duration, the player is "unmorphed" and the powerup is destroyed, EndEffect function is called etc., but health, viewheight, etc. are not reset.
If morphs are manually reverted via the 'morphme' cheat, the player is unmorphed properly, but the powerup is not destroyed and stays in the game but not in the player's inventory.
There's also no teleport fog when morphing or unmorphing anymore.
Sample .pk3 attached... Just 'give morphtest' and test as detailed above.
Spoiler: The test actor...
Code: Select all
version "4.11"
class MorphTest : PowerMorph
{
Default
{
PowerMorph.PlayerClass "PigPlayer";
Powerup.Duration -10;
}
override void Tick()
{
if (owner)
{
if (level.time % 35 == 0)
{
String msg = String.Format("Owner is %s", owner.GetClassName());
if (owner.alternative) { msg = msg .. String.Format(" with alternative %s", owner.alternative.GetClassName()); }
let morph = owner.FindInventory(self.GetClass());
if (!morph) { msg = msg .. ", but morph item is no longer in owner's inventory!"; }
console.printf(msg);
}
}
Super.Tick();
}
override void InitEffect()
{
console.printf("Start Morph");
Super.InitEffect();
}
override void EndEffect()
{
console.printf("End Morph");
Super.EndEffect();
}
}
For demo of this being broken in a released mod: You can no longer exit Blade of Agony's driveable tanks.
- Attachments
-
MorphTest.pk3
- (525 Bytes) Downloaded 16 times
After the Morph refactoring (1 March 24 and following commits), PowerMorph items no longer unmorph the player properly.
The PowerMorph item no longer shows up in the morphed player's inventory, so the player can no longer be unmorphed by removing the powerup from inventory.
If morphs are allowed to run to full duration, the player is "unmorphed" and the powerup is destroyed, EndEffect function is called etc., but health, viewheight, etc. are not reset.
If morphs are manually reverted via the 'morphme' cheat, the player is unmorphed properly, but the powerup is not destroyed and stays in the game but not in the player's inventory.
There's also no teleport fog when morphing or unmorphing anymore.
Sample .pk3 attached... Just 'give morphtest' and test as detailed above.
[spoiler=The test actor...][code]version "4.11"
class MorphTest : PowerMorph
{
Default
{
PowerMorph.PlayerClass "PigPlayer";
Powerup.Duration -10;
}
override void Tick()
{
if (owner)
{
if (level.time % 35 == 0)
{
String msg = String.Format("Owner is %s", owner.GetClassName());
if (owner.alternative) { msg = msg .. String.Format(" with alternative %s", owner.alternative.GetClassName()); }
let morph = owner.FindInventory(self.GetClass());
if (!morph) { msg = msg .. ", but morph item is no longer in owner's inventory!"; }
console.printf(msg);
}
}
Super.Tick();
}
override void InitEffect()
{
console.printf("Start Morph");
Super.InitEffect();
}
override void EndEffect()
{
console.printf("End Morph");
Super.EndEffect();
}
}[/code][/spoiler]
For demo of this being broken in a released mod: You can no longer exit Blade of Agony's driveable tanks.