mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-20 15:40:56 +00:00
- Duke: Clean up player/actor accesses in game.cpp
.
This commit is contained in:
parent
9086f90e75
commit
411115304a
1 changed files with 3 additions and 1 deletions
|
@ -917,7 +917,9 @@ CCMD(changewalltexture)
|
|||
FTextureID tile = TexMan.CheckForTexture(argv[1], ETextureType::Any);
|
||||
if (!tile.isValid()) tile = tileGetTextureID((int)strtol(argv[1], nullptr, 10));
|
||||
HitInfoBase hit;
|
||||
hitscan(getPlayer(0)->GetActor()->spr.pos, getPlayer(0)->cursector, DVector3(getPlayer(0)->GetActor()->spr.Angles.Yaw.ToVector(), 0) * 1024, hit, CLIPMASK1);
|
||||
const auto p = getPlayer(0);
|
||||
const auto pact = p->GetActor();
|
||||
hitscan(pact->spr.pos, p->cursector, DVector3(pact->spr.Angles.Yaw.ToVector(), 0) * 1024, hit, CLIPMASK1);
|
||||
if (hit.hitWall)
|
||||
{
|
||||
hit.hitWall->setwalltexture(tile);
|
||||
|
|
Loading…
Reference in a new issue