mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- Blood: Floatify vel math in checkCeilHit()
.
This commit is contained in:
parent
013158da07
commit
56bc13e669
1 changed files with 2 additions and 5 deletions
|
@ -4150,21 +4150,18 @@ 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))
|
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;
|
auto adelta = actor2->spr.pos - actor->spr.pos;
|
||||||
|
actor2->vel.XY() += adelta.XY() * (1. / 4096.);
|
||||||
|
|
||||||
if (actor2->spr.statnum == kStatThing)
|
if (actor2->spr.statnum == kStatThing)
|
||||||
{
|
{
|
||||||
int nType = actor2->spr.type - kThingBase;
|
int nType = actor2->spr.type - kThingBase;
|
||||||
const THINGINFO* pThingInfo = &thingInfo[nType];
|
const THINGINFO* pThingInfo = &thingInfo[nType];
|
||||||
if (pThingInfo->flags & 1) actor2->spr.flags |= 1;
|
if (pThingInfo->flags & 1) actor2->spr.flags |= 1;
|
||||||
if (pThingInfo->flags & 2) actor2->spr.flags |= 4;
|
if (pThingInfo->flags & 2) actor2->spr.flags |= 4;
|
||||||
// Inlined ?
|
|
||||||
actor2->add_int_bvel_x(int(adelta.X * 16));
|
|
||||||
actor2->add_int_bvel_y(int(adelta.Y * 16));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
actor2->spr.flags |= 5;
|
actor2->spr.flags |= 5;
|
||||||
actor2->add_int_bvel_x(int(adelta.X * 16));
|
|
||||||
actor2->add_int_bvel_y(int(adelta.Y * 16));
|
|
||||||
#ifdef NOONE_EXTENSIONS
|
#ifdef NOONE_EXTENSIONS
|
||||||
// add size shroom abilities
|
// add size shroom abilities
|
||||||
if ((actor->IsPlayerActor() && isShrinked(actor)) || (actor2->IsPlayerActor() && isGrown(actor2))) {
|
if ((actor->IsPlayerActor() && isShrinked(actor)) || (actor2->IsPlayerActor() && isGrown(actor2))) {
|
||||||
|
|
Loading…
Reference in a new issue