It seems to handle blood palette translation as well, but I cannot find the parts of code that does it,
I've looked into https://github.com/rheit/zdoom/blob/mas ... /p_map.cpp for it, but for no avail.
I'm attempting to make a customized melee attack combining DamageMobj() and (SpawnBlood() xor SpawnPuff()).
What doesn't work is the blood palette translations.
Actor A hits actor B whom Bloodcolor is set to "DarkGreen",
anyhow SpawnBlood doesn't take bloodcolor from actor B into account,
causing default blood color (red) to be spawned instead when struck.
My code looks like this:
Code: Select all
extend class AMonster
{
void A_AMonsterAttack()
{
if (target == null) return;
//... Unrelated attack code here...
//...
Vector3 bpos = target.pos;
double bangle = angle;
if (CheckMeleeRange())
{
SpawnPuff("Blood", bpos+(0, 0, target.height * 0.5), bangle, bangle, 1, 1, target); // <<- Spawning blood in middle height on "target"
}
}
}LineAttack spawns blood and translates it, but it's a hitscan attack which would screw up things in this situation.
If "AMonster" misses and hits a target far away instead, looks abit weird...
How do I translate the very blood spawned using either SpawnPuff(), SpawnBlood() or is there another way to make it?
Thanks in advance.