mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-11 05:01:09 +00:00
c880b26d98
This should for now conclude actor class scriptification. The remaining ten classes with the exception of MorphedMonster are all too essential or too closely tied to engine feature so they should remain native.
45 lines
749 B
Text
45 lines
749 B
Text
class MorphProjectile : Actor
|
|
{
|
|
|
|
Class<PlayerPawn> PlayerClass;
|
|
Class<Actor> MonsterClass, MorphFlash, UnMorphFlash;
|
|
int Duration, MorphStyle;
|
|
|
|
Default
|
|
{
|
|
Damage 1;
|
|
Projectile;
|
|
-ACTIVATEIMPACT
|
|
-ACTIVATEPCROSS
|
|
}
|
|
|
|
override int DoSpecialDamage (Actor target, int damage, Name damagetype)
|
|
{
|
|
if (target.player)
|
|
{
|
|
target.player.MorphPlayer (NULL, PlayerClass, Duration, MorphStyle, MorphFlash, UnMorphFlash);
|
|
}
|
|
else
|
|
{
|
|
target.MorphMonster (MonsterClass, Duration, MorphStyle, MorphFlash, UnMorphFlash);
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
class MorphedMonster : Actor native
|
|
{
|
|
native Actor UnmorphedMe;
|
|
native int UnmorphTime, MorphStyle;
|
|
native Class<Actor> MorphExitFlash;
|
|
|
|
Default
|
|
{
|
|
Monster;
|
|
-COUNTKILL
|
|
+FLOORCLIP
|
|
}
|
|
}
|
|
|