mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-12 23:54:37 +00:00
- use the same camera sprite selection logic as EDuke32 and RedNukem.
This is the only one that makes some sense.
This commit is contained in:
parent
0c71cc4b38
commit
3787e103d2
2 changed files with 6 additions and 11 deletions
|
@ -1287,20 +1287,15 @@ static void movefireext(DDukeActor* actor)
|
|||
|
||||
static void moveviewscreen(DDukeActor* actor)
|
||||
{
|
||||
const int VIEWSCR_DIST = 8192; // was originally 2048, was increased to this by EDuke32 and RedNukem.
|
||||
if (actor->s.xrepeat == 0) deletesprite(actor);
|
||||
else
|
||||
{
|
||||
int x;
|
||||
findplayer(actor, &x);
|
||||
int p = findplayer(actor, &x);
|
||||
|
||||
if (x < 2048)
|
||||
{
|
||||
#if 0
|
||||
if (actor->s.yvel == 1)
|
||||
camsprite = actor;
|
||||
#endif
|
||||
}
|
||||
else if (camsprite != nullptr && actor->temp_data[0] == 1)
|
||||
x = dist(actor, ps[p].GetActor()); // the result from findplayer is not really useful.
|
||||
if (x >= VIEWSCR_DIST && camsprite == actor)
|
||||
{
|
||||
camsprite = nullptr;
|
||||
actor->s.yvel = 0;
|
||||
|
|
|
@ -258,14 +258,14 @@ void animatesprites_d(int x, int y, int a, int smoothratio)
|
|||
continue;
|
||||
case VIEWSCREEN:
|
||||
case VIEWSCREEN2:
|
||||
if (camsprite != nullptr && h->GetOwner()->temp_data[0] == 1)
|
||||
if (camsprite != nullptr && h->GetHitOwner()->temp_data[0] == 1)
|
||||
{
|
||||
t->picnum = STATIC;
|
||||
t->cstat |= (rand() & 12);
|
||||
t->xrepeat += 8;
|
||||
t->yrepeat += 8;
|
||||
}
|
||||
else if (camsprite != nullptr)
|
||||
else if (camsprite == h->GetHitOwner())
|
||||
{
|
||||
t->picnum = TILE_VIEWSCR;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue