mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- fishy grenade stuff
This commit is contained in:
parent
163146250d
commit
c0c74fca84
2 changed files with 10 additions and 9 deletions
|
@ -98,13 +98,13 @@ void AIFishLimb::Tick(RunListEvent* ev)
|
|||
}
|
||||
}
|
||||
|
||||
int FloorZ = pActor->sector()->int_floorz();
|
||||
double FloorZ = pActor->sector()->floorz;
|
||||
|
||||
if (FloorZ <= pActor->int_pos().Z)
|
||||
if (FloorZ <= pActor->spr.pos.Z)
|
||||
{
|
||||
pActor->spr.pos.Z++;
|
||||
|
||||
if ((pActor->int_pos().Z - FloorZ) > 25600)
|
||||
if ((pActor->spr.pos.Z - FloorZ) > 100)
|
||||
{
|
||||
pActor->spr.zvel = 0;
|
||||
runlist_DoSubRunRec(pActor->spr.intowner);
|
||||
|
@ -112,7 +112,7 @@ void AIFishLimb::Tick(RunListEvent* ev)
|
|||
runlist_SubRunRec(pActor->spr.hitag);
|
||||
DeleteActor(pActor);
|
||||
}
|
||||
else if ((pActor->int_pos().Z - FloorZ) > 0)
|
||||
else if ((pActor->spr.pos.Z - FloorZ) > 0)
|
||||
{
|
||||
pActor->spr.zvel = 1024;
|
||||
}
|
||||
|
@ -382,7 +382,7 @@ void AIFish::Tick(RunListEvent* ev)
|
|||
pActor->spr.yvel = 0;
|
||||
}
|
||||
|
||||
pActor->spr.zvel = (pTargetActor->int_pos().Z - pActor->int_pos().Z) >> 3;
|
||||
pActor->spr.zvel = int((pTargetActor->spr.pos.Z - pActor->spr.pos.Z) * zworldtoint / 8);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ void ExplodeGrenade(DExhumedActor* pActor)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (pActor->int_pos().Z < pGrenadeSect->int_floorz())
|
||||
if (pActor->spr.pos.Z < pGrenadeSect->floorz)
|
||||
{
|
||||
var_20 = 200;
|
||||
var_28 = 36;
|
||||
|
@ -171,9 +171,10 @@ void ExplodeGrenade(DExhumedActor* pActor)
|
|||
if (pActor->nTurn < 0)
|
||||
{
|
||||
auto pPlayerActor = PlayerList[nPlayer].pActor;
|
||||
int nAngle = pPlayerActor->int_ang();
|
||||
auto nAngle = pPlayerActor->spr.angle;
|
||||
|
||||
pActor->set_int_pos({ bcos(nAngle, -5) + pPlayerActor->int_pos().X, bsin(nAngle, -5) + pPlayerActor->int_pos().Y, pPlayerActor->int_pos().Z });
|
||||
DVector2 vect = nAngle.ToVector() * 32;
|
||||
pActor->spr.pos = pPlayerActor->spr.pos + vect;
|
||||
|
||||
ChangeActorSect(pActor, pPlayerActor->sector());
|
||||
|
||||
|
|
Loading…
Reference in a new issue