Sorry to bump this, but has anyone had any luck getting this to work on puffs spawned by rail or standard bullet attacks?
This doesn't work, even thought the graphical part of the puff spawns:
Code: Select all
Actor WeaponHit
{
+NOBLOCKMAP
+NOGRAVITY
+ALWAYSPUFF
+PUFFONACTORS
+HITTARGET
States
{
Spawn:
TNT1 A 0
XDeath:
UNKN A 35 A_GiveInventory("Disintegration", 1, AAPTR_TARGET)
Stop
}
}
I've tried all of the Master/Tracer/Target variants, and assigned the puff to both rail and bullet attacks, with no luck. The UNKNA0 sprite shows up, but nothing is given. Using the same technique on a true projectile works fine.
EDIT:
For P_LineAttack, lines 769-771 of p_map.cpp have:
Code: Select all
if (puffDefaults->flags7 && MF7_HITTARGET) puff->target = trace.Actor;
if (puffDefaults->flags7 && MF7_HITMASTER) puff->master = trace.Actor;
if (puffDefaults->flags7 && MF7_HITTRACER) puff->tracer = trace.Actor;
Too many '&'s!
EDIT2:
For P_RailAttack, Line 4214:
Code: Select all
P_SpawnPuff(source, puffclass, x, y, z, (source->angle + angleoffset) - ANG90, 1, puffflags);
This spawns the puff, but doesn't assign that puff as 'thepuff', so I think that's why the actor pointers don't get assigned to that spawned puff.
Though I'm also not quite sure what line 4182 is trying to do:
Code: Select all
if (puffclass != NULL) thepuff = Spawn(puffclass, source->x, source->y, source->z, ALLOW_REPLACE);
Is it supposed to spawn a puff at the rail origin?
Sorry to bump this, but has anyone had any luck getting this to work on puffs spawned by rail or standard bullet attacks?
This doesn't work, even thought the graphical part of the puff spawns:
[code]Actor WeaponHit
{
+NOBLOCKMAP
+NOGRAVITY
+ALWAYSPUFF
+PUFFONACTORS
+HITTARGET
States
{
Spawn:
TNT1 A 0
XDeath:
UNKN A 35 A_GiveInventory("Disintegration", 1, AAPTR_TARGET)
Stop
}
}[/code]
I've tried all of the Master/Tracer/Target variants, and assigned the puff to both rail and bullet attacks, with no luck. The UNKNA0 sprite shows up, but nothing is given. Using the same technique on a true projectile works fine.
EDIT:
For P_LineAttack, lines 769-771 of p_map.cpp have:[code]if (puffDefaults->flags7 && MF7_HITTARGET) puff->target = trace.Actor;
if (puffDefaults->flags7 && MF7_HITMASTER) puff->master = trace.Actor;
if (puffDefaults->flags7 && MF7_HITTRACER) puff->tracer = trace.Actor;[/code]Too many '&'s!
EDIT2:
For P_RailAttack, Line 4214:
[code]P_SpawnPuff(source, puffclass, x, y, z, (source->angle + angleoffset) - ANG90, 1, puffflags);
[/code] This spawns the puff, but doesn't assign that puff as 'thepuff', so I think that's why the actor pointers don't get assigned to that spawned puff.
Though I'm also not quite sure what line 4182 is trying to do:
[code]if (puffclass != NULL) thepuff = Spawn(puffclass, source->x, source->y, source->z, ALLOW_REPLACE);
[/code] Is it supposed to spawn a puff at the rail origin?