mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-01 05:20:43 +00:00
- floatified ghostSlashSeqCallback
This commit is contained in:
parent
2ba68df27f
commit
fbf49bc247
1 changed files with 11 additions and 12 deletions
|
@ -66,19 +66,18 @@ void ghostSlashSeqCallback(int, DBloodActor* actor)
|
||||||
auto target = actor->GetTarget();
|
auto target = actor->GetTarget();
|
||||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||||
DUDEINFO* pDudeInfoT = getDudeInfo(target->spr.type);
|
DUDEINFO* pDudeInfoT = getDudeInfo(target->spr.type);
|
||||||
int height = (actor->spr.yrepeat * pDudeInfo->eyeHeight) << 2;
|
double height = (actor->spr.yrepeat * pDudeInfo->eyeHeight) * REPEAT_SCALE;
|
||||||
int height2 = (target->spr.yrepeat * pDudeInfoT->eyeHeight) << 2;
|
double height2 = (target->spr.yrepeat * pDudeInfoT->eyeHeight) * REPEAT_SCALE;
|
||||||
int dz = height - height2;
|
DVector3 dv(actor->spr.angle.ToVector() * 64, height - height2);
|
||||||
int dx = bcos(actor->int_ang());
|
|
||||||
int dy = bsin(actor->int_ang());
|
|
||||||
sfxPlay3DSound(actor, 1406, 0, 0);
|
sfxPlay3DSound(actor, 1406, 0, 0);
|
||||||
actFireVector(actor, 0, 0, dx, dy, dz, kVectorGhost);
|
actFireVector(actor, 0, 0, dv, kVectorGhost);
|
||||||
int r1 = Random(50);
|
double r1 = RandomF(50, 8);
|
||||||
int r2 = Random(50);
|
double r2 = RandomF(50, 8);
|
||||||
actFireVector(actor, 0, 0, dx + r2, dy - r1, dz, kVectorGhost);
|
actFireVector(actor, 0, 0, dv + DVector2(r2, -r1), kVectorGhost);
|
||||||
r1 = Random(50);
|
r1 = RandomF(50, 8);
|
||||||
r2 = Random(50);
|
r2 = RandomF(50, 8);
|
||||||
actFireVector(actor, 0, 0, dx - r2, dy + r1, dz, kVectorGhost);
|
actFireVector(actor, 0, 0, dv + DVector2(-r2, r1), kVectorGhost);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ghostThrowSeqCallback(int, DBloodActor* actor)
|
void ghostThrowSeqCallback(int, DBloodActor* actor)
|
||||||
|
|
Loading…
Reference in a new issue