mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-18 09:41:06 +00:00
- Duke: Clean up player/actor accesses in moveclouds()
.
This commit is contained in:
parent
2fb1dea9e0
commit
b36c6af6cd
1 changed files with 3 additions and 2 deletions
|
@ -1544,11 +1544,12 @@ void moveclouds(double interpfrac)
|
||||||
int myclock = interpfrac < 0.5 ? PlayClock-2 : PlayClock;
|
int myclock = interpfrac < 0.5 ? PlayClock-2 : PlayClock;
|
||||||
if (myclock > cloudclock || myclock < (cloudclock - 7))
|
if (myclock > cloudclock || myclock < (cloudclock - 7))
|
||||||
{
|
{
|
||||||
|
const auto pact = getPlayer(screenpeek)->GetActor();
|
||||||
cloudclock = myclock + 6;
|
cloudclock = myclock + 6;
|
||||||
|
|
||||||
// cloudx/y were an array, but all entries were always having the same value so a single pair is enough.
|
// cloudx/y were an array, but all entries were always having the same value so a single pair is enough.
|
||||||
cloudx += (float)getPlayer(screenpeek)->GetActor()->spr.Angles.Yaw.Cos() * 0.5f;
|
cloudx += (float)pact->spr.Angles.Yaw.Cos() * 0.5f;
|
||||||
cloudy += (float)getPlayer(screenpeek)->GetActor()->spr.Angles.Yaw.Sin() * 0.5f;
|
cloudy += (float)pact->spr.Angles.Yaw.Sin() * 0.5f;
|
||||||
for (int i = 0; i < numclouds; i++)
|
for (int i = 0; i < numclouds; i++)
|
||||||
{
|
{
|
||||||
// no clamping here!
|
// no clamping here!
|
||||||
|
|
Loading…
Reference in a new issue