mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- DoActorBeginSlide
This commit is contained in:
parent
ad0ed0c377
commit
9e438b4042
4 changed files with 9 additions and 9 deletions
|
@ -612,10 +612,9 @@ void KeepActorOnFloor(DSWActor* actor)
|
|||
|
||||
}
|
||||
|
||||
int
|
||||
DoActorBeginSlide(int SpriteNum, short ang, short vel, short dec)
|
||||
int DoActorBeginSlide(DSWActor* actor, short ang, short vel, short dec)
|
||||
{
|
||||
USERp u = User[SpriteNum].Data();
|
||||
USERp u = actor->u();
|
||||
|
||||
SET(u->Flags, SPR_SLIDING);
|
||||
|
||||
|
|
|
@ -2639,7 +2639,7 @@ DriveCrush(PLAYERp pp, int *x, int *y)
|
|||
int32_t const vel = FindDistance2D(pp->xvect>>8, pp->yvect>>8);
|
||||
if (vel < 9000)
|
||||
{
|
||||
DoActorBeginSlide(i, getangle(pp->xvect, pp->yvect), vel/8, 5);
|
||||
DoActorBeginSlide(actor, getangle(pp->xvect, pp->yvect), vel/8, 5);
|
||||
if (DoActorSlide(actor))
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -5503,7 +5503,8 @@ ActorStdMissile(short SpriteNum, short Weapon)
|
|||
int
|
||||
ActorDamageSlide(int SpriteNum, int damage, int ang)
|
||||
{
|
||||
USERp u = User[SpriteNum].Data();
|
||||
auto actor = &swActors[SpriteNum];
|
||||
USERp u = actor->u();
|
||||
int slide_vel,slide_dec;
|
||||
|
||||
if (TEST(u->Flags, SPR_CLIMBING))
|
||||
|
@ -5516,12 +5517,12 @@ ActorDamageSlide(int SpriteNum, int damage, int ang)
|
|||
|
||||
if (damage <= 10)
|
||||
{
|
||||
DoActorBeginSlide(SpriteNum, ang, 64, 5);
|
||||
DoActorBeginSlide(actor, ang, 64, 5);
|
||||
return true;
|
||||
}
|
||||
else if (damage <= 20)
|
||||
{
|
||||
DoActorBeginSlide(SpriteNum, ang, 128, 5);
|
||||
DoActorBeginSlide(actor, ang, 128, 5);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
@ -5534,7 +5535,7 @@ ActorDamageSlide(int SpriteNum, int damage, int ang)
|
|||
if (slide_vel < -1000) slide_vel = -1000;
|
||||
slide_dec = 5;
|
||||
|
||||
DoActorBeginSlide(SpriteNum, ang, slide_vel, slide_dec);
|
||||
DoActorBeginSlide(actor, ang, slide_vel, slide_dec);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ extern short target_ang;
|
|||
bool SpriteOverlap(short, short);
|
||||
|
||||
int SpawnShotgunSparks(PLAYERp pp, short hit_sect, short hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang);
|
||||
int DoActorBeginSlide(int SpriteNum, short ang, short vel, short dec);
|
||||
int DoActorBeginSlide(DSWActor* actor, short ang, short vel, short dec);
|
||||
int GetOverlapSector(int x, int y, short *over, short *under);
|
||||
bool MissileHitDiveArea(short SpriteNum);
|
||||
|
||||
|
|
Loading…
Reference in a new issue