mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
- position in InitZillaRail
This commit is contained in:
parent
bd54c4e8e2
commit
6a9972938e
2 changed files with 6 additions and 13 deletions
|
@ -12931,9 +12931,6 @@ int InitRail(PLAYER* pp)
|
||||||
|
|
||||||
int InitZillaRail(DSWActor* actor)
|
int InitZillaRail(DSWActor* actor)
|
||||||
{
|
{
|
||||||
int nx, ny, nz;
|
|
||||||
int zvel;
|
|
||||||
|
|
||||||
if (SW_SHAREWARE) return false; // JBF: verify
|
if (SW_SHAREWARE) return false; // JBF: verify
|
||||||
|
|
||||||
PlaySound(DIGI_RAILFIRE, actor, v3df_dontpan|v3df_doppler);
|
PlaySound(DIGI_RAILFIRE, actor, v3df_dontpan|v3df_doppler);
|
||||||
|
@ -12941,22 +12938,18 @@ int InitZillaRail(DSWActor* actor)
|
||||||
// Make sprite shade brighter
|
// Make sprite shade brighter
|
||||||
actor->user.Vis = 128;
|
actor->user.Vis = 128;
|
||||||
|
|
||||||
nx = actor->int_pos().X;
|
auto pos = ActorVectOfTop(actor);
|
||||||
ny = actor->int_pos().Y;
|
|
||||||
|
|
||||||
nz = int_ActorZOfTop(actor);
|
|
||||||
|
|
||||||
// Spawn a shot
|
// Spawn a shot
|
||||||
// Inserting and setting up variables
|
// Inserting and setting up variables
|
||||||
|
|
||||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R1, &s_Rail[0][0], actor->sector(),
|
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R1, &s_Rail[0][0], actor->sector(), pos, actor->spr.angle, 1200);
|
||||||
nx, ny, nz, actor->int_ang(), 1200);
|
|
||||||
|
|
||||||
SetOwner(actor, actorNew);
|
SetOwner(actor, actorNew);
|
||||||
actorNew->spr.yrepeat = 52;
|
actorNew->spr.yrepeat = 52;
|
||||||
actorNew->spr.xrepeat = 52;
|
actorNew->spr.xrepeat = 52;
|
||||||
actorNew->spr.shade = -15;
|
actorNew->spr.shade = -15;
|
||||||
zvel = (100 * (HORIZ_MULT+17));
|
int zvel = (100 * (HORIZ_MULT+17));
|
||||||
|
|
||||||
actorNew->user.RotNum = 5;
|
actorNew->user.RotNum = 5;
|
||||||
NewStateGroup(actorNew, &sg_Rail[0]);
|
NewStateGroup(actorNew, &sg_Rail[0]);
|
||||||
|
@ -12972,7 +12965,7 @@ int InitZillaRail(DSWActor* actor)
|
||||||
// initial positioning
|
// initial positioning
|
||||||
auto oclipdist = actor->spr.clipdist;
|
auto oclipdist = actor->spr.clipdist;
|
||||||
actor->spr.clipdist = 0;
|
actor->spr.clipdist = 0;
|
||||||
actorNew->spr.clipdist = 32L>>2;
|
actorNew->spr.clipdist = 32 >> 2;
|
||||||
|
|
||||||
actorNew->spr.angle += DAngle90;
|
actorNew->spr.angle += DAngle90;
|
||||||
HelpMissileLateral(actorNew, 700);
|
HelpMissileLateral(actorNew, 700);
|
||||||
|
@ -12993,7 +12986,7 @@ int InitZillaRail(DSWActor* actor)
|
||||||
actorNew->spr.zvel = zvel >> 1;
|
actorNew->spr.zvel = zvel >> 1;
|
||||||
if (WeaponAutoAim(actor, actorNew, 32, false) == -1)
|
if (WeaponAutoAim(actor, actorNew, 32, false) == -1)
|
||||||
{
|
{
|
||||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 4));
|
actorNew->spr.angle -= DAngle::fromBuild(4);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
zvel = actorNew->spr.zvel; // Let autoaiming set zvel now
|
zvel = actorNew->spr.zvel; // Let autoaiming set zvel now
|
||||||
|
|
|
@ -30,7 +30,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
BEGIN_SW_NS
|
BEGIN_SW_NS
|
||||||
|
|
||||||
#define NEW_ELECTRO 1
|
#define NEW_ELECTRO 1
|
||||||
#define HORIZ_MULT 128L
|
#define HORIZ_MULT 128
|
||||||
|
|
||||||
inline int AngToSprite(DSWActor* actor, DSWActor* other)
|
inline int AngToSprite(DSWActor* actor, DSWActor* other)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue