mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Merge branch 'angle-for-spawn-object' into 'next'
Make the Spawn Object linedef executor able to set the object's angle. See merge request STJr/SRB2!877
This commit is contained in:
commit
cbe181c66d
2 changed files with 6 additions and 1 deletions
|
@ -15,7 +15,7 @@
|
|||
* Oogaland
|
||||
* Rob
|
||||
* Shadow Hog
|
||||
* Spherallic
|
||||
* sphere
|
||||
* SRB2-Playah
|
||||
* SSNTails
|
||||
* SteelT
|
||||
|
@ -2208,6 +2208,7 @@ linedeftypes
|
|||
title = "Spawn Object";
|
||||
prefix = "(461)";
|
||||
flags8text = "[3] Set delay by backside sector";
|
||||
flags32text = "[5] Use line angle for object";
|
||||
flags64text = "[6] Spawn inside a range";
|
||||
}
|
||||
|
||||
|
|
|
@ -4027,7 +4027,11 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
|
||||
mobj = P_SpawnMobj(x, y, z, type);
|
||||
if (mobj)
|
||||
{
|
||||
if (line->flags & ML_EFFECT1)
|
||||
mobj->angle = R_PointToAngle2(line->v1->x, line->v1->y, line->v2->x, line->v2->y);
|
||||
CONS_Debug(DBG_GAMELOGIC, "Linedef Type %d - Spawn Object: %d spawned at (%d, %d, %d)\n", line->special, mobj->type, mobj->x>>FRACBITS, mobj->y>>FRACBITS, mobj->z>>FRACBITS); //TODO: Convert mobj->type to a string somehow.
|
||||
}
|
||||
else
|
||||
CONS_Alert(CONS_ERROR,"Linedef Type %d - Spawn Object: Object did not spawn!\n", line->special);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue