mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
Revise r6225
git-svn-id: https://svn.eduke32.com/eduke32@6251 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
bf944cf27a
commit
6d3978b471
1 changed files with 9 additions and 6 deletions
|
@ -5547,8 +5547,9 @@ static void HandleSE31(int spriteNum, int setFloorZ, int spriteZ, int SEdir, int
|
||||||
}
|
}
|
||||||
|
|
||||||
// s: SE sprite
|
// s: SE sprite
|
||||||
static void MaybeTrainKillPlayer(const spritetype *pSprite, int setOPos)
|
static void MaybeTrainKillPlayer(const spritetype *pSprite, int const setOPos)
|
||||||
{
|
{
|
||||||
|
if (ud.noclip) return;
|
||||||
for (bssize_t TRAVERSE_CONNECT(playerNum))
|
for (bssize_t TRAVERSE_CONNECT(playerNum))
|
||||||
{
|
{
|
||||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||||
|
@ -5559,7 +5560,7 @@ static void MaybeTrainKillPlayer(const spritetype *pSprite, int setOPos)
|
||||||
|
|
||||||
updatesector(pPlayer->pos.x, pPlayer->pos.y, &playerSectnum);
|
updatesector(pPlayer->pos.x, pPlayer->pos.y, &playerSectnum);
|
||||||
|
|
||||||
if ((playerSectnum == -1 && ud.noclip == 0) || (playerSectnum == pSprite->sectnum && pPlayer->cursectnum != pSprite->sectnum))
|
if (pPlayer->cursectnum != pSprite->sectnum && (playerSectnum == -1 || playerSectnum == pSprite->sectnum))
|
||||||
{
|
{
|
||||||
*(vec2_t *)pPlayer = *(vec2_t const *)pSprite;
|
*(vec2_t *)pPlayer = *(vec2_t const *)pSprite;
|
||||||
|
|
||||||
|
@ -5576,11 +5577,11 @@ static void MaybeTrainKillPlayer(const spritetype *pSprite, int setOPos)
|
||||||
}
|
}
|
||||||
|
|
||||||
// i: SE spritenum
|
// i: SE spritenum
|
||||||
static void MaybeTrainKillEnemies(int spriteNum)
|
static void MaybeTrainKillEnemies(int const spriteNum)
|
||||||
{
|
{
|
||||||
int findSprite = headspritesect[sprite[OW(spriteNum)].sectnum];
|
int findSprite = headspritesect[sprite[OW(spriteNum)].sectnum];
|
||||||
|
|
||||||
while (findSprite >= 0)
|
do
|
||||||
{
|
{
|
||||||
int const nextSprite = nextspritesect[findSprite];
|
int const nextSprite = nextspritesect[findSprite];
|
||||||
|
|
||||||
|
@ -5590,15 +5591,17 @@ static void MaybeTrainKillEnemies(int spriteNum)
|
||||||
|
|
||||||
updatesector(sprite[findSprite].x,sprite[findSprite].y,§Num);
|
updatesector(sprite[findSprite].x,sprite[findSprite].y,§Num);
|
||||||
|
|
||||||
if (sectNum == sprite[spriteNum].sectnum)
|
if (sectNum == sprite[spriteNum].sectnum || sectNum == -1)
|
||||||
{
|
{
|
||||||
actor[findSprite].picnum = RADIUSEXPLOSION;
|
actor[findSprite].picnum = RADIUSEXPLOSION;
|
||||||
actor[findSprite].extra = g_impactDamage << 10;
|
actor[findSprite].extra = g_impactDamage << 10;
|
||||||
|
actor[findSprite].owner = spriteNum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
findSprite = nextSprite;
|
findSprite = nextSprite;
|
||||||
}
|
}
|
||||||
|
while (findSprite >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
|
|
Loading…
Reference in a new issue