mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- low level move functions now return a Collision struct.
# Conflicts: # source/games/sw/src/sprite.cpp
This commit is contained in:
parent
606ce997ac
commit
a073ef65e7
15 changed files with 105 additions and 138 deletions
|
@ -302,7 +302,7 @@ void DoDebrisCurrent(DSWActor* actor)
|
|||
nx = MulScale(DIV4(sectu->speed), bcos(sectu->ang), 14);
|
||||
ny = MulScale(DIV4(sectu->speed), bsin(sectu->ang), 14);
|
||||
|
||||
Collision ret(move_sprite(actor->GetSpriteIndex(), nx, ny, 0, u->ceiling_dist, u->floor_dist, 0, ACTORMOVETICS));
|
||||
Collision ret = move_sprite(actor, nx, ny, 0, u->ceiling_dist, u->floor_dist, 0, ACTORMOVETICS);
|
||||
|
||||
// attempt to move away from wall
|
||||
if (ret.type != kHitNone)
|
||||
|
@ -312,7 +312,7 @@ void DoDebrisCurrent(DSWActor* actor)
|
|||
nx = MulScale(DIV4(sectu->speed), bcos(sectu->ang + rang), 14);
|
||||
nx = MulScale(DIV4(sectu->speed), bsin(sectu->ang + rang), 14);
|
||||
|
||||
move_sprite(actor->GetSpriteIndex(), nx, ny, 0, u->ceiling_dist, u->floor_dist, 0, ACTORMOVETICS);
|
||||
move_sprite(actor, nx, ny, 0, u->ceiling_dist, u->floor_dist, 0, ACTORMOVETICS);
|
||||
}
|
||||
|
||||
sp->z = u->loz;
|
||||
|
@ -389,8 +389,8 @@ bool move_debris(DSWActor* actor, int xchange, int ychange, int zchange)
|
|||
{
|
||||
USERp u = actor->u();
|
||||
|
||||
SetCollision(u, move_sprite(actor->GetSpriteIndex(), xchange, ychange, zchange,
|
||||
u->ceiling_dist, u->floor_dist, 0, ACTORMOVETICS));
|
||||
u->coll = move_sprite(actor, xchange, ychange, zchange,
|
||||
u->ceiling_dist, u->floor_dist, 0, ACTORMOVETICS);
|
||||
|
||||
return u->coll.type == kHitNone;
|
||||
}
|
||||
|
|
|
@ -1543,7 +1543,7 @@ Collision move_scan(DSWActor* actor, short ang, int dist, int *stopx, int *stopy
|
|||
nx = MulScale(dist, bcos(sp->ang), 14);
|
||||
ny = MulScale(dist, bsin(sp->ang), 14);
|
||||
|
||||
Collision ret(move_sprite(u->SpriteNum, nx, ny, 0, u->ceiling_dist, u->floor_dist, cliptype, 1));
|
||||
Collision ret = move_sprite(actor, nx, ny, 0, u->ceiling_dist, u->floor_dist, cliptype, 1);
|
||||
// move_sprite DOES do a getzrange point?
|
||||
|
||||
// should I look down with a FAFgetzrange to see where I am?
|
||||
|
|
|
@ -855,8 +855,8 @@ int DoBunnyBeginJumpAttack(DSWActor* actor)
|
|||
|
||||
tang = getangle(psp->x - sp->x, psp->y - sp->y);
|
||||
|
||||
Collision coll(move_sprite(actor->GetSpriteIndex(), bcos(tang, -7), bsin(tang, -7),
|
||||
0L, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS));
|
||||
Collision coll = move_sprite(actor, bcos(tang, -7), bsin(tang, -7),
|
||||
0L, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
|
||||
|
||||
if (coll.type != kHitNone)
|
||||
sp->ang = NORM_ANGLE(sp->ang + 1024) + (RANDOM_NEG(256, 6) >> 6);
|
||||
|
|
|
@ -799,7 +799,7 @@ int DoCoolgDeath(DSWActor* actor)
|
|||
nx = MulScale(sp->xvel, bcos(sp->ang), 14);
|
||||
ny = MulScale(sp->xvel, bsin(sp->ang), 14);
|
||||
|
||||
SetCollision(u, move_sprite(actor->GetSpriteIndex(), nx, ny, 0L, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, ACTORMOVETICS));
|
||||
u->coll = move_sprite(actor, nx, ny, 0L, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, ACTORMOVETICS);
|
||||
DoFindGroundPoint(actor);
|
||||
|
||||
// on the ground
|
||||
|
|
|
@ -547,7 +547,7 @@ int DoEelDeath(DSWActor* actor)
|
|||
nx = MulScale(sp->xvel, bcos(sp->ang), 14);
|
||||
ny = MulScale(sp->xvel, bsin(sp->ang), 14);
|
||||
|
||||
SetCollision(u, move_sprite(actor->GetSpriteIndex(), nx, ny, 0L, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, ACTORMOVETICS));
|
||||
u->coll = move_sprite(actor, nx, ny, 0L, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, ACTORMOVETICS);
|
||||
DoFindGroundPoint(actor);
|
||||
|
||||
// on the ground
|
||||
|
|
|
@ -1901,8 +1901,8 @@ short AnimSetVelAdj(short anim_ndx, short vel_adj);
|
|||
void EnemyDefaults(DSWActor* actor, ACTOR_ACTION_SETp action, PERSONALITYp person);
|
||||
|
||||
void getzrangepoint(int x, int y, int z, short sectnum, int32_t* ceilz, int32_t* ceilhit, int32_t* florz, int32_t* florhit);
|
||||
int move_sprite(int spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics);
|
||||
int move_missile(int spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics);
|
||||
Collision move_sprite(DSWActor* , int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics);
|
||||
Collision move_missile(DSWActor*, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics);
|
||||
DSWActor* DoPickTarget(DSWActor*, uint32_t max_delta_ang, int skip_targets);
|
||||
|
||||
void change_actor_stat(DSWActor* actor, int stat, bool quick = false);
|
||||
|
|
|
@ -531,7 +531,7 @@ DoHornetDeath(DSWActor* actor)
|
|||
nx = MulScale(sp->xvel, bcos(sp->ang), 14);
|
||||
ny = MulScale(sp->xvel, bsin(sp->ang), 14);
|
||||
|
||||
SetCollision(u, move_sprite(actor->GetSpriteIndex(), nx, ny, 0L, u->ceiling_dist, u->floor_dist, 1, ACTORMOVETICS));
|
||||
u->coll = move_sprite(actor, nx, ny, 0L, u->ceiling_dist, u->floor_dist, 1, ACTORMOVETICS);
|
||||
|
||||
// on the ground
|
||||
if (sp->z >= u->loz)
|
||||
|
|
|
@ -394,8 +394,8 @@ int DoBloodSpray(DSWActor* actor)
|
|||
}
|
||||
else
|
||||
{
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
}
|
||||
|
||||
|
||||
|
@ -597,8 +597,8 @@ int DoPhosphorus(DSWActor* actor)
|
|||
u->zchange += u->Counter;
|
||||
}
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -815,8 +815,8 @@ int DoChemBomb(DSWActor* actor)
|
|||
u->zchange += u->Counter;
|
||||
}
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -1058,8 +1058,8 @@ int DoCaltrops(DSWActor* actor)
|
|||
u->zchange += u->Counter;
|
||||
}
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
|
|
@ -4621,7 +4621,7 @@ void DoPlayerDive(PLAYERp pp)
|
|||
nx = MOVEx((128+64), NORM_ANGLE(bp->ang + 1024));
|
||||
ny = MOVEy((128+64), NORM_ANGLE(bp->ang + 1024));
|
||||
|
||||
move_sprite(bubble->GetSpriteIndex(), nx, ny, 0L, u->ceiling_dist, u->floor_dist, 0, synctics);
|
||||
move_sprite(bubble, nx, ny, 0L, u->ceiling_dist, u->floor_dist, 0, synctics);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6013,7 +6013,7 @@ void DoPlayerDeathMoveHead(PLAYERp pp)
|
|||
dax = MOVEx(u->slide_vel, u->slide_ang);
|
||||
day = MOVEy(u->slide_vel, u->slide_ang);
|
||||
|
||||
SetCollision(u, move_sprite(pp->PlayerSprite, dax, day, 0, Z(16), Z(16), 1, synctics));
|
||||
u->coll = move_sprite(pp->Actor(), dax, day, 0, Z(16), Z(16), 1, synctics);
|
||||
{
|
||||
switch (u->coll.type)
|
||||
{
|
||||
|
|
|
@ -1080,8 +1080,8 @@ int DoRipperBeginJumpAttack(DSWActor* actor)
|
|||
|
||||
tang = getangle(psp->x - sp->x, psp->y - sp->y);
|
||||
|
||||
Collision coll(move_sprite(actor->GetSpriteIndex(), bcos(tang, -7), bsin(tang, -7),
|
||||
0L, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS));
|
||||
Collision coll = move_sprite(actor, bcos(tang, -7), bsin(tang, -7),
|
||||
0L, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
|
||||
|
||||
if (coll.type != kHitNone)
|
||||
sp->ang = NORM_ANGLE((sp->ang + 1024) + (RANDOM_NEG(256, 6) >> 6));
|
||||
|
|
|
@ -1090,8 +1090,8 @@ int DoRipper2BeginJumpAttack(DSWActor* actor)
|
|||
|
||||
// Always jump at player if mad.
|
||||
|
||||
Collision coll(move_sprite(actor->GetSpriteIndex(), bcos(tang, -7), bsin(tang, -7),
|
||||
0, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS));
|
||||
Collision coll = move_sprite(actor, bcos(tang, -7), bsin(tang, -7),
|
||||
0, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
|
||||
if (coll.type != kHitNone)
|
||||
sp->ang = NORM_ANGLE((sp->ang + 1024) + (RANDOM_NEG(256, 6) >> 6));
|
||||
else
|
||||
|
|
|
@ -269,7 +269,7 @@ int DoSkullMove(DSWActor* actor)
|
|||
day = MOVEy(sp->xvel, sp->ang);
|
||||
daz = sp->zvel;
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), dax, day, daz, Z(16), Z(16), CLIPMASK_MISSILE, ACTORMOVETICS));
|
||||
u->coll = move_missile(actor, dax, day, daz, Z(16), Z(16), CLIPMASK_MISSILE, ACTORMOVETICS);
|
||||
|
||||
DoFindGroundPoint(actor);
|
||||
return 0;
|
||||
|
@ -674,7 +674,7 @@ int DoBettyMove(DSWActor* actor)
|
|||
day = MOVEy(sp->xvel, sp->ang);
|
||||
daz = sp->zvel;
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), dax, day, daz, Z(16), Z(16), CLIPMASK_MISSILE, ACTORMOVETICS));
|
||||
u->coll = move_missile(actor, dax, day, daz, Z(16), Z(16), CLIPMASK_MISSILE, ACTORMOVETICS);
|
||||
|
||||
DoFindGroundPoint(actor);
|
||||
return 0;
|
||||
|
|
|
@ -5001,8 +5001,8 @@ int move_actor(DSWActor* actor, int xchange, int ychange, int zchange)
|
|||
hi_sectp = u->hi_sectp;
|
||||
sectnum = sp->sectnum;
|
||||
|
||||
SetCollision(u, move_sprite(SpriteNum, xchange, ychange, zchange,
|
||||
u->ceiling_dist, u->floor_dist, cliptype, ACTORMOVETICS));
|
||||
u->coll = move_sprite(actor, xchange, ychange, zchange,
|
||||
u->ceiling_dist, u->floor_dist, cliptype, ACTORMOVETICS);
|
||||
|
||||
ASSERT(sp->sectnum >= 0);
|
||||
|
||||
|
@ -6729,10 +6729,8 @@ SpriteControl(void)
|
|||
|
||||
*/
|
||||
|
||||
int
|
||||
move_sprite(int spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics)
|
||||
Collision move_sprite(DSWActor* actor, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics)
|
||||
{
|
||||
auto actor = &swActors[spritenum];
|
||||
int retval=0, zh;
|
||||
int dasectnum;
|
||||
short tempshort;
|
||||
|
@ -6781,7 +6779,7 @@ move_sprite(int spritenum, int xchange, int ychange, int zchange, int ceildist,
|
|||
}
|
||||
|
||||
if ((dasectnum != spr->sectnum) && (dasectnum >= 0))
|
||||
changespritesect(spritenum, dasectnum);
|
||||
ChangeActorSect(actor, dasectnum);
|
||||
|
||||
// took this out - may not be to relevant anymore
|
||||
//ASSERT(inside(spr->x,spr->y,dasectnum));
|
||||
|
@ -6805,7 +6803,7 @@ move_sprite(int spritenum, int xchange, int ychange, int zchange, int ceildist,
|
|||
|
||||
// !AIC - puts getzrange results into USER varaible u->loz, u->hiz, u->lo_sectp, u->hi_sectp, etc.
|
||||
// Takes info from global variables
|
||||
DoActorGlobZ(spritenum);
|
||||
DoActorGlobZ(actor->GetSpriteIndex());
|
||||
|
||||
clippos.z = spr->z + ((zchange * numtics) >> 3);
|
||||
|
||||
|
@ -6830,14 +6828,14 @@ move_sprite(int spritenum, int xchange, int ychange, int zchange, int ceildist,
|
|||
|
||||
// extra processing for Stacks and warping
|
||||
if (FAF_ConnectArea(spr->sectnum))
|
||||
setspritez(spritenum, &spr->pos);
|
||||
SetActorZ(actor, &spr->pos);
|
||||
|
||||
if (TEST(sector[spr->sectnum].extra, SECTFX_WARP_SECTOR))
|
||||
{
|
||||
DSWActor* sp_warp;
|
||||
if ((sp_warp = WarpPlane(&spr->x, &spr->y, &spr->z, &dasectnum)))
|
||||
{
|
||||
ActorWarpUpdatePos(spritenum, dasectnum);
|
||||
ActorWarpUpdatePos(actor->GetSpriteIndex(), dasectnum);
|
||||
ActorWarpType(actor, sp_warp);
|
||||
}
|
||||
|
||||
|
@ -6845,40 +6843,13 @@ move_sprite(int spritenum, int xchange, int ychange, int zchange, int ceildist,
|
|||
{
|
||||
if ((sp_warp = Warp(&spr->x, &spr->y, &spr->z, &dasectnum)))
|
||||
{
|
||||
ActorWarpUpdatePos(spritenum, dasectnum);
|
||||
ActorWarpUpdatePos(actor->GetSpriteIndex(), dasectnum);
|
||||
ActorWarpType(actor, sp_warp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
// not used - SLOW!
|
||||
|
||||
int pushmove_sprite(short SpriteNum)
|
||||
{
|
||||
auto actor = &swActors[SpriteNum];
|
||||
SPRITEp sp = &sprite[SpriteNum];
|
||||
USERp u = User[SpriteNum].Data();
|
||||
int sectnum, ret;
|
||||
|
||||
sp->z -= u->zclip;
|
||||
sectnum = sp->sectnum;
|
||||
ret = pushmove(&sp->pos, §num,
|
||||
(((int)sp->clipdist)<<2)-GETZRANGE_CLIP_ADJ, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR);
|
||||
|
||||
if (sectnum != sp->sectnum && sectnum >= 0)
|
||||
ChangeActorSect(actor, sectnum);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
//DSPRINTF(ds,"Pushed out!!!!! sp->sectnum %d", sp->sectnum);
|
||||
MONO_PRINT(ds);
|
||||
}
|
||||
|
||||
sp->z += u->zclip;
|
||||
return 0;
|
||||
return Collision(retval);
|
||||
}
|
||||
|
||||
void MissileWarpUpdatePos(short SpriteNum, short sectnum)
|
||||
|
@ -6977,10 +6948,8 @@ MissileZrange(short SpriteNum)
|
|||
}
|
||||
|
||||
|
||||
int
|
||||
move_missile(int spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics)
|
||||
Collision move_missile(DSWActor* actor, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics)
|
||||
{
|
||||
DSWActor* actor = &swActors[spritenum];
|
||||
USERp u = actor->u();
|
||||
SPRITEp sp = &actor->s();
|
||||
int retval, zh;
|
||||
|
@ -7024,7 +6993,7 @@ move_missile(int spritenum, int xchange, int ychange, int zchange, int ceildist,
|
|||
//ASSERT(inside(sp->x,sp->y,dasectnum));
|
||||
|
||||
if ((dasectnum != sp->sectnum) && (dasectnum >= 0))
|
||||
changespritesect(spritenum, dasectnum);
|
||||
ChangeActorSect(actor, dasectnum);
|
||||
|
||||
// Set the blocking bit to 0 temporarly so FAFgetzrange doesn't pick
|
||||
// up its own sprite
|
||||
|
@ -7036,7 +7005,7 @@ move_missile(int spritenum, int xchange, int ychange, int zchange, int ceildist,
|
|||
|
||||
sp->cstat = tempshort;
|
||||
|
||||
DoActorGlobZ(spritenum);
|
||||
DoActorGlobZ(actor->GetSpriteIndex());
|
||||
|
||||
// getzrangepoint moves water down
|
||||
// missiles don't need the water to be down
|
||||
|
@ -7067,7 +7036,7 @@ move_missile(int spritenum, int xchange, int ychange, int zchange, int ceildist,
|
|||
}
|
||||
|
||||
if (FAF_ConnectArea(sp->sectnum))
|
||||
setspritez(spritenum, &sp->pos);
|
||||
SetActorZ(actor, &sp->pos);
|
||||
|
||||
if (TEST(sector[sp->sectnum].extra, SECTFX_WARP_SECTOR))
|
||||
{
|
||||
|
@ -7075,7 +7044,7 @@ move_missile(int spritenum, int xchange, int ychange, int zchange, int ceildist,
|
|||
|
||||
if ((sp_warp = WarpPlane(&sp->x, &sp->y, &sp->z, &dasectnum)))
|
||||
{
|
||||
MissileWarpUpdatePos(spritenum, dasectnum);
|
||||
MissileWarpUpdatePos(actor->GetSpriteIndex(), dasectnum);
|
||||
MissileWarpType(actor, sp_warp);
|
||||
}
|
||||
|
||||
|
@ -7083,7 +7052,7 @@ move_missile(int spritenum, int xchange, int ychange, int zchange, int ceildist,
|
|||
{
|
||||
if ((sp_warp = Warp(&sp->x, &sp->y, &sp->z, &dasectnum)))
|
||||
{
|
||||
MissileWarpUpdatePos(spritenum, dasectnum);
|
||||
MissileWarpUpdatePos(actor->GetSpriteIndex(), dasectnum);
|
||||
MissileWarpType(actor, sp_warp);
|
||||
}
|
||||
}
|
||||
|
@ -7107,14 +7076,12 @@ move_missile(int spritenum, int xchange, int ychange, int zchange, int ceildist,
|
|||
}
|
||||
}
|
||||
|
||||
return retval;
|
||||
return Collision(retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
move_ground_missile(short spritenum, int xchange, int ychange, int ceildist, int flordist, uint32_t cliptype, int numtics)
|
||||
Collision move_ground_missile(DSWActor* actor, int xchange, int ychange, int ceildist, int flordist, uint32_t cliptype, int numtics)
|
||||
{
|
||||
DSWActor* actor = &swActors[spritenum];
|
||||
USERp u = actor->u();
|
||||
SPRITEp sp = &actor->s();
|
||||
int daz;
|
||||
|
@ -7242,7 +7209,7 @@ move_ground_missile(short spritenum, int xchange, int ychange, int ceildist, int
|
|||
}
|
||||
#endif
|
||||
|
||||
changespritesect(spritenum, dasectnum);
|
||||
ChangeActorSect(actor, dasectnum);
|
||||
}
|
||||
|
||||
getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
|
||||
|
@ -7265,7 +7232,7 @@ move_ground_missile(short spritenum, int xchange, int ychange, int ceildist, int
|
|||
|
||||
if ((sp_warp = WarpPlane(&sp->x, &sp->y, &sp->z, &dasectnum)))
|
||||
{
|
||||
MissileWarpUpdatePos(spritenum, dasectnum);
|
||||
MissileWarpUpdatePos(actor->GetSpriteIndex(), dasectnum);
|
||||
MissileWarpType(actor, sp_warp);
|
||||
}
|
||||
|
||||
|
@ -7273,13 +7240,13 @@ move_ground_missile(short spritenum, int xchange, int ychange, int ceildist, int
|
|||
{
|
||||
if ((sp_warp = Warp(&sp->x, &sp->y, &sp->z, &dasectnum)))
|
||||
{
|
||||
MissileWarpUpdatePos(spritenum, dasectnum);
|
||||
MissileWarpUpdatePos(actor->GetSpriteIndex(), dasectnum);
|
||||
MissileWarpType(actor, sp_warp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return retval;
|
||||
return Collision(retval);
|
||||
}
|
||||
|
||||
#include "saveable.h"
|
||||
|
|
|
@ -3778,7 +3778,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
|
|||
nz = sp->zvel * locktics;
|
||||
}
|
||||
|
||||
SetCollision(u, move_sprite(actor->GetSpriteIndex(), nx, ny, nz, u->ceiling_dist, u->floor_dist, 0, locktics));
|
||||
u->coll = move_sprite(actor, nx, ny, nz, u->ceiling_dist, u->floor_dist, 0, locktics);
|
||||
|
||||
|
||||
if (u->coll.type != kHitNone)
|
||||
|
|
|
@ -46,7 +46,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
BEGIN_SW_NS
|
||||
|
||||
void SpawnZombie2(DSWActor*);
|
||||
int move_ground_missile(short spritenum, int xchange, int ychange, int ceildist, int flordist, uint32_t cliptype, int numtics);
|
||||
Collision move_ground_missile(DSWActor* actor, int xchange, int ychange, int ceildist, int flordist, uint32_t cliptype, int numtics);
|
||||
void DoPlayerBeginDie(PLAYERp);
|
||||
void VehicleSetSmoke(SECTOR_OBJECTp sop, ANIMATORp animator);
|
||||
ANIMATOR DoBettyBeginDeath;
|
||||
|
@ -3742,7 +3742,7 @@ AutoShrap:
|
|||
|
||||
nx = bcos(sp->ang, -6);
|
||||
ny = bsin(sp->ang, -6);
|
||||
move_missile(actor->GetSpriteIndex(), nx, ny, 0, Z(8), Z(8), CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
move_missile(actor, nx, ny, 0, Z(8), Z(8), CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
if (RANDOM_P2(1024)<700)
|
||||
u->ID = 0;
|
||||
|
@ -3802,7 +3802,7 @@ void DoShrapMove(DSWActor* actor)
|
|||
{
|
||||
USERp u = actor->u();
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, 0, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, 0, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2);
|
||||
}
|
||||
|
||||
int DoVomit(DSWActor* actor)
|
||||
|
@ -7780,7 +7780,7 @@ int DoStar(DSWActor* actor)
|
|||
}
|
||||
}
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -7960,7 +7960,7 @@ int DoCrossBolt(DSWActor* actor)
|
|||
|
||||
DoBlurExtend(actor, 0, 2);
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, Z(16), Z(16), CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, Z(16), Z(16), CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -8429,7 +8429,7 @@ int DoPlasma(DSWActor* actor)
|
|||
day = MOVEy(sp->xvel, sp->ang);
|
||||
daz = sp->zvel;
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), dax, day, daz, Z(16), Z(16), CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, dax, day, daz, Z(16), Z(16), CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
{
|
||||
// this sprite is supposed to go through players/enemys
|
||||
|
@ -8451,7 +8451,7 @@ int DoPlasma(DSWActor* actor)
|
|||
sp->z = oz;
|
||||
|
||||
RESET(hsp->cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), dax, day, daz, Z(16), Z(16), CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, dax, day, daz, Z(16), Z(16), CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
hsp->cstat = hcstat;
|
||||
}
|
||||
}
|
||||
|
@ -8491,7 +8491,7 @@ int DoCoolgFire(DSWActor* actor)
|
|||
USER* u = actor->u();
|
||||
SPRITEp sp = &actor->s();
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
if (TEST(u->Flags, SPR_UNDERWATER) && (RANDOM_P2(1024 << 4) >> 4) < 256)
|
||||
|
@ -8657,8 +8657,8 @@ int DoGrenade(DSWActor* actor)
|
|||
u->zchange += u->Counter;
|
||||
}
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -8886,8 +8886,8 @@ int DoVulcanBoulder(DSWActor* actor)
|
|||
u->Counter += 40;
|
||||
u->zchange += u->Counter;
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
int32_t const vel = ksqrt(SQ(u->xchange) + SQ(u->ychange));
|
||||
|
||||
|
@ -9276,8 +9276,8 @@ int DoMine(DSWActor* actor)
|
|||
u->zchange += u->Counter;
|
||||
}
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9453,7 +9453,7 @@ int DoBoltThinMan(DSWActor* actor)
|
|||
day = MOVEy(sp->xvel, sp->ang);
|
||||
daz = sp->zvel;
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), dax, day, daz, CEILING_DIST, FLOOR_DIST, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, dax, day, daz, CEILING_DIST, FLOOR_DIST, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9484,7 +9484,7 @@ int DoTracer(DSWActor* actor)
|
|||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9511,7 +9511,7 @@ int DoEMP(DSWActor* actor)
|
|||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9598,7 +9598,7 @@ int DoTankShell(DSWActor* actor)
|
|||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9619,8 +9619,8 @@ int DoTankShell(DSWActor* actor)
|
|||
int DoTracerStart(DSWActor* actor)
|
||||
{
|
||||
USER* u = actor->u();
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9648,7 +9648,7 @@ int DoLaser(DSWActor* actor)
|
|||
|
||||
while (true)
|
||||
{
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9689,7 +9689,7 @@ int DoLaserStart(DSWActor* actor)
|
|||
|
||||
if (SW_SHAREWARE) return false; // JBF: verify
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9718,7 +9718,7 @@ int DoRail(DSWActor* actor)
|
|||
|
||||
while (true)
|
||||
{
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9799,7 +9799,7 @@ int DoRailStart(DSWActor* actor)
|
|||
|
||||
if (SW_SHAREWARE) return false; // JBF: verify
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9837,7 +9837,7 @@ int DoRocket(DSWActor* actor)
|
|||
VectorMissileSeek(actor, 30, 16, 128, 768);
|
||||
}
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9904,7 +9904,7 @@ int DoMicroMini(DSWActor* actor)
|
|||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9966,8 +9966,8 @@ int DoMicro(DSWActor* actor)
|
|||
|
||||
if (SW_SHAREWARE) return false; // JBF: verify
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -10048,7 +10048,7 @@ int DoUziBullet(DSWActor* actor)
|
|||
|
||||
sx = sp->x;
|
||||
sy = sp->y;
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), dax, day, daz, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, dax, day, daz, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
u->Dist += Distance(sx, sy, sp->x, sp->y);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
@ -10110,7 +10110,7 @@ int DoBoltSeeker(DSWActor* actor)
|
|||
day = MOVEy(sp->xvel, sp->ang);
|
||||
daz = sp->zvel;
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), dax, day, daz, CEILING_DIST, FLOOR_DIST, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, dax, day, daz, CEILING_DIST, FLOOR_DIST, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
if (TEST(u->Flags, SPR_UNDERWATER) && (RANDOM_P2(1024 << 4) >> 4) < 256)
|
||||
|
@ -10154,7 +10154,7 @@ int DoElectro(DSWActor* actor)
|
|||
day = MOVEy(sp->xvel, sp->ang);
|
||||
daz = sp->zvel;
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), dax, day, daz, CEILING_DIST, FLOOR_DIST, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, dax, day, daz, CEILING_DIST, FLOOR_DIST, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
if (TEST(u->Flags, SPR_UNDERWATER) && (RANDOM_P2(1024 << 4) >> 4) < 256)
|
||||
|
@ -10196,8 +10196,8 @@ int DoLavaBoulder(DSWActor* actor)
|
|||
{
|
||||
USER* u = actor->u();
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
if (TEST(u->Flags, SPR_UNDERWATER) && (RANDOM_P2(1024 << 4) >> 4) < 256)
|
||||
|
@ -10223,8 +10223,8 @@ int DoSpear(DSWActor* actor)
|
|||
{
|
||||
USER* u = actor->u();
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -10675,8 +10675,8 @@ void SpawnNuclearSecondaryExp(DSWActor* actor, short ang)
|
|||
eu->xchange = MOVEx(vel, ang);
|
||||
eu->ychange = MOVEy(vel, ang);
|
||||
eu->Radius = 200; // was NUKE_RADIUS
|
||||
SetCollision(eu, move_missile(expActor->GetSpriteIndex(), eu->xchange, eu->ychange, 0,
|
||||
eu->ceiling_dist, eu->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
eu->coll = move_missile(expActor, eu->xchange, eu->ychange, 0,
|
||||
eu->ceiling_dist, eu->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
if (FindDistance3D(exp->x - sp->x, exp->y - sp->y, exp->z - sp->z) < 1024)
|
||||
{
|
||||
|
@ -10985,8 +10985,8 @@ void SpawnGrenadeSecondaryExp(DSWActor* actor, int ang)
|
|||
eu->xchange = MOVEx(vel, ang);
|
||||
eu->ychange = MOVEy(vel, ang);
|
||||
|
||||
SetCollision(eu, move_missile(expActor->GetSpriteIndex(), eu->xchange, eu->ychange, 0,
|
||||
eu->ceiling_dist, eu->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
eu->coll = move_missile(expActor, eu->xchange, eu->ychange, 0,
|
||||
eu->ceiling_dist, eu->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
if (FindDistance3D(exp->x - sp->x, exp->y - sp->y, exp->z - sp->z) < 1024)
|
||||
{
|
||||
|
@ -11328,7 +11328,7 @@ int DoFireball(DSWActor* actor)
|
|||
}
|
||||
}
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -11513,7 +11513,7 @@ int DoNapalm(DSWActor* actor)
|
|||
oy = sp->y;
|
||||
oz = sp->z;
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -11536,7 +11536,7 @@ int DoNapalm(DSWActor* actor)
|
|||
sp->z = oz;
|
||||
|
||||
RESET(hsp->cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
hsp->cstat = hcstat;
|
||||
}
|
||||
}
|
||||
|
@ -11603,7 +11603,7 @@ int DoBloodWorm(DSWActor* actor)
|
|||
int amt;
|
||||
int sectnum;
|
||||
|
||||
SetCollision(u, move_ground_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_ground_missile(actor, u->xchange, u->ychange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
if (u->coll.type != kHitNone)
|
||||
{
|
||||
|
@ -11699,7 +11699,7 @@ int DoSerpMeteor(DSWActor* actor)
|
|||
if (sp->xrepeat > 80)
|
||||
sp->xrepeat = 80;
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
if (u->coll.type != kHitNone)
|
||||
{
|
||||
|
@ -11719,7 +11719,7 @@ int DoSerpMeteor(DSWActor* actor)
|
|||
sp->z = oz;
|
||||
|
||||
RESET(hsp->cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
hsp->cstat = hcstat;
|
||||
}
|
||||
}
|
||||
|
@ -11744,7 +11744,7 @@ int DoMirvMissile(DSWActor* actor)
|
|||
if (sp->xrepeat > 80)
|
||||
sp->xrepeat = 80;
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
if (TEST(u->Flags, SPR_UNDERWATER) && (RANDOM_P2(1024 << 4) >> 4) < 256)
|
||||
SpawnBubble(actor);
|
||||
|
@ -11767,7 +11767,7 @@ int DoMirv(DSWActor* actor)
|
|||
SPRITEp sp = &actor->s(), np;
|
||||
USERp nu;
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -12692,7 +12692,7 @@ int InitSwordAttack(PLAYERp pp)
|
|||
nx = MOVEx((1024 + 256) * 3, NORM_ANGLE(bp->ang + dangs[i] + random_amt));
|
||||
ny = MOVEy((1024 + 256) * 3, NORM_ANGLE(bp->ang + dangs[i] + random_amt));
|
||||
|
||||
move_missile(bubble->GetSpriteIndex(), nx, ny, 0L, u->ceiling_dist, u->floor_dist, CLIPMASK_PLAYER, 1);
|
||||
move_missile(bubble, nx, ny, 0L, u->ceiling_dist, u->floor_dist, CLIPMASK_PLAYER, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12872,7 +12872,7 @@ int InitFistAttack(PLAYERp pp)
|
|||
nx = MOVEx((1024+256)*3, NORM_ANGLE(bp->ang + dangs[i] + random_amt));
|
||||
ny = MOVEy((1024+256)*3, NORM_ANGLE(bp->ang + dangs[i] + random_amt));
|
||||
|
||||
move_missile(bubble->GetSpriteIndex(), nx, ny, 0L, u->ceiling_dist, u->floor_dist, CLIPMASK_PLAYER, 1);
|
||||
move_missile(bubble, nx, ny, 0L, u->ceiling_dist, u->floor_dist, CLIPMASK_PLAYER, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15742,7 +15742,7 @@ int InitCoolgFire(DSWActor* actor)
|
|||
nx = MulScale(728, bcos(nang), 14);
|
||||
ny = MulScale(728, bsin(nang), 14);
|
||||
|
||||
move_missile(actorNew->GetSpriteIndex(), nx, ny, 0, wu->ceiling_dist, wu->floor_dist, 0, 3L);
|
||||
move_missile(actorNew, nx, ny, 0, wu->ceiling_dist, wu->floor_dist, 0, 3L);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -17897,7 +17897,7 @@ int HelpMissileLateral(DSWActor* actor, int dist)
|
|||
|
||||
sp->clipdist = 32L >> 2;
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), xchange, ychange, 0, Z(16), Z(16), 0, 1));
|
||||
u->coll = move_missile(actor, xchange, ychange, 0, Z(16), Z(16), 0, 1);
|
||||
|
||||
sp->xvel = old_xvel;
|
||||
sp->clipdist = old_clipdist;
|
||||
|
@ -19417,8 +19417,8 @@ int DoShrapVelocity(DSWActor* actor)
|
|||
u->zchange += u->Counter;
|
||||
}
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -19748,8 +19748,8 @@ int DoItemFly(DSWActor* actor)
|
|||
u->zchange += u->Counter;
|
||||
}
|
||||
|
||||
SetCollision(u, move_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2));
|
||||
u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange,
|
||||
u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
|
Loading…
Reference in a new issue