mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 13:51:43 +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
|
* Oogaland
|
||||||
* Rob
|
* Rob
|
||||||
* Shadow Hog
|
* Shadow Hog
|
||||||
* Spherallic
|
* sphere
|
||||||
* SRB2-Playah
|
* SRB2-Playah
|
||||||
* SSNTails
|
* SSNTails
|
||||||
* SteelT
|
* SteelT
|
||||||
|
@ -2208,6 +2208,7 @@ linedeftypes
|
||||||
title = "Spawn Object";
|
title = "Spawn Object";
|
||||||
prefix = "(461)";
|
prefix = "(461)";
|
||||||
flags8text = "[3] Set delay by backside sector";
|
flags8text = "[3] Set delay by backside sector";
|
||||||
|
flags32text = "[5] Use line angle for object";
|
||||||
flags64text = "[6] Spawn inside a range";
|
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);
|
mobj = P_SpawnMobj(x, y, z, type);
|
||||||
if (mobj)
|
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.
|
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
|
else
|
||||||
CONS_Alert(CONS_ERROR,"Linedef Type %d - Spawn Object: Object did not spawn!\n", line->special);
|
CONS_Alert(CONS_ERROR,"Linedef Type %d - Spawn Object: Object did not spawn!\n", line->special);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue