mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-26 22:11:54 +00:00
- Duke: Clean up player/actor accesses in actors_lava.cpp
.
This commit is contained in:
parent
7493d0cdeb
commit
bc66f2de5c
1 changed files with 6 additions and 5 deletions
|
@ -340,6 +340,8 @@ void dojaildoor(void)
|
|||
|
||||
void operatejaildoors(int hitag)
|
||||
{
|
||||
const auto pact = getPlayer(screenpeek)->GetActor();
|
||||
|
||||
for (auto& jd : jaildoors)
|
||||
{
|
||||
if (jd.hitag == hitag)
|
||||
|
@ -349,14 +351,14 @@ void operatejaildoors(int hitag)
|
|||
jd.open = 1;
|
||||
jd.drag = jd.dist;
|
||||
if (!isRRRA() || jd.sound != 0)
|
||||
S_PlayActorSound(jd.sound, getPlayer(screenpeek)->GetActor());
|
||||
S_PlayActorSound(jd.sound, pact);
|
||||
}
|
||||
if (jd.open == 2)
|
||||
{
|
||||
jd.open = 3;
|
||||
jd.drag = jd.dist;
|
||||
if (!isRRRA() || jd.sound != 0)
|
||||
S_PlayActorSound(jd.sound, getPlayer(screenpeek)->GetActor());
|
||||
S_PlayActorSound(jd.sound, pact);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -453,12 +455,11 @@ void moveminecart(void)
|
|||
|
||||
void thunder(void)
|
||||
{
|
||||
DDukePlayer* p;
|
||||
int r1, r2;
|
||||
int i = 0;
|
||||
uint8_t shade;
|
||||
|
||||
p = getPlayer(screenpeek);
|
||||
const auto psect = getPlayer(screenpeek)->GetActor()->sector();
|
||||
|
||||
if (!thunderflash)
|
||||
{
|
||||
|
@ -474,7 +475,7 @@ void thunder(void)
|
|||
|
||||
if (seen)
|
||||
{
|
||||
if (getPlayer(screenpeek)->GetActor()->sector()->ceilingstat & CSTAT_SECTOR_SKY)
|
||||
if (psect->ceilingstat & CSTAT_SECTOR_SKY)
|
||||
{
|
||||
g_relvisibility = 0;
|
||||
if (krand() > 65000)
|
||||
|
|
Loading…
Reference in a new issue