mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 04:24:39 +00:00
- getting rid of some int_pos calls.
This commit is contained in:
parent
18a445aee5
commit
0499be0c26
3 changed files with 8 additions and 8 deletions
|
@ -4151,6 +4151,7 @@ static void checkCeilHit(DBloodActor* actor)
|
|||
{
|
||||
if ((actor2->spr.statnum == kStatThing || actor2->spr.statnum == kStatDude) && (actor->vel.X != 0 || actor->vel.Y != 0 || actor->vel.Z != 0))
|
||||
{
|
||||
auto adelta = actor2->spr.pos - actor->spr.pos;
|
||||
if (actor2->spr.statnum == kStatThing)
|
||||
{
|
||||
int nType = actor2->spr.type - kThingBase;
|
||||
|
@ -4158,15 +4159,14 @@ static void checkCeilHit(DBloodActor* actor)
|
|||
if (pThingInfo->flags & 1) actor2->spr.flags |= 1;
|
||||
if (pThingInfo->flags & 2) actor2->spr.flags |= 4;
|
||||
// Inlined ?
|
||||
actor2->vel.X += MulScale(4, actor2->int_pos().X - actor->int_pos().X, 2);
|
||||
actor2->vel.Y += MulScale(4, actor2->int_pos().Y - actor->int_pos().Y, 2);
|
||||
actor2->vel.X += int(adelta.X * 16);
|
||||
actor2->vel.Y += int(adelta.Y * 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
actor2->spr.flags |= 5;
|
||||
actor2->vel.X += MulScale(4, actor2->int_pos().X - actor->int_pos().X, 2);
|
||||
actor2->vel.Y += MulScale(4, actor2->int_pos().Y - actor->int_pos().Y, 2);
|
||||
|
||||
actor2->vel.X += int(adelta.X * 16);
|
||||
actor2->vel.Y += int(adelta.Y * 16);
|
||||
#ifdef NOONE_EXTENSIONS
|
||||
// add size shroom abilities
|
||||
if ((actor->IsPlayerActor() && isShrinked(actor)) || (actor2->IsPlayerActor() && isGrown(actor2))) {
|
||||
|
|
|
@ -6558,7 +6558,7 @@ Collision move_ground_missile(DSWActor* actor, int xchange, int ychange, int cei
|
|||
|
||||
actor->add_int_pos({ xchange / 2, ychange / 2, 0 });
|
||||
|
||||
updatesector(actor->int_pos().X, actor->int_pos().Y, &dasect);
|
||||
updatesector(actor->spr.pos, &dasect);
|
||||
|
||||
if (dasect == nullptr)
|
||||
{
|
||||
|
|
|
@ -10869,7 +10869,7 @@ int DoBloodWorm(DSWActor* actor)
|
|||
actor->add_int_pos({ MulScale(amt,xvect, 15), MulScale(amt,yvect, 15), 0 });
|
||||
|
||||
auto sect = actor->sector();
|
||||
updatesectorz(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, §);
|
||||
updatesectorz(actor->spr.pos, §);
|
||||
if (sect)
|
||||
{
|
||||
GlobalSkipZrange = true;
|
||||
|
@ -11319,7 +11319,7 @@ int DoSerpRing(DSWActor* actor)
|
|||
if ((dist < 18000 && (RANDOM_P2(2048<<5)>>5) < 16) || own->user.Counter < 4)
|
||||
{
|
||||
auto sect = actor->sector();
|
||||
updatesector(actor->int_pos().X, actor->int_pos().Y, §);
|
||||
updatesector(actor->spr.pos, §);
|
||||
|
||||
// if (valid sector and can see target)
|
||||
if (sect != nullptr && CanSeePlayer(actor))
|
||||
|
|
Loading…
Reference in a new issue