mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-18 15:11:51 +00:00
Implement 'away1' and 'away2' maphacks in Polymer.
git-svn-id: https://svn.eduke32.com/eduke32@1681 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
10830a7f3f
commit
d9092fcd2b
1 changed files with 15 additions and 0 deletions
|
@ -1315,6 +1315,21 @@ void polymer_drawsprite(int32_t snum)
|
|||
|
||||
cs = tspr->cstat;
|
||||
|
||||
// I think messing with the tspr is safe at this point?
|
||||
// If not, change that to modify a temp position in updatesprite itself.
|
||||
// I don't think this flags are meant to change on the fly so it'd possibly
|
||||
// be safe to cache a plane that has them applied.
|
||||
if (spriteext[tspr->owner].flags & SPREXT_AWAY1)
|
||||
{
|
||||
tspr->x += sintable[(tspr->ang + 512) & 2047] >> 13;
|
||||
tspr->y += sintable[tspr->ang & 2047] >> 13;
|
||||
}
|
||||
else if (spriteext[tspr->owner].flags & SPREXT_AWAY2)
|
||||
{
|
||||
tspr->x -= sintable[(tspr->ang + 512) & 2047] >> 13;
|
||||
tspr->y -= sintable[tspr->ang & 2047] >> 13;
|
||||
}
|
||||
|
||||
polymer_updatesprite(snum);
|
||||
|
||||
if (prsprites[tspr->owner] == NULL)
|
||||
|
|
Loading…
Reference in a new issue