mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- more cleanup.
This commit is contained in:
parent
9d4e467268
commit
05d8cee911
8 changed files with 19 additions and 19 deletions
|
@ -1526,7 +1526,7 @@ static void weaponcommon_d(DDukeActor* proj)
|
|||
if (proj->attackertype != BOSS2 && proj->spr.xrepeat >= 10 && proj->sector()->lotag != 2)
|
||||
{
|
||||
auto spawned = spawn(proj, SMALLSMOKE);
|
||||
if (spawned) spawned->add_int_z(1 << 8);
|
||||
if (spawned) spawned->spr.pos.Z += 1;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -921,7 +921,7 @@ static void chickenarrow(DDukeActor* actor)
|
|||
if (actor->attackertype != BOSS2 && actor->spr.xrepeat >= 10 && actor->sector()->lotag != 2)
|
||||
{
|
||||
auto spawned = spawn(actor, SMALLSMOKE);
|
||||
if (spawned) spawned->add_int_z(1 << 8);
|
||||
if (spawned) spawned->spr.pos.Z += 1;
|
||||
if ((krand() & 15) == 2)
|
||||
{
|
||||
spawn(actor, MONEY);
|
||||
|
@ -1202,7 +1202,7 @@ static void weaponcommon_r(DDukeActor *proj)
|
|||
if (proj->attackertype != BOSS2 && proj->spr.xrepeat >= 10 && proj->sector()->lotag != 2)
|
||||
{
|
||||
auto spawned = spawn(proj, SMALLSMOKE);
|
||||
if (spawned) spawned->add_int_z(1 << 8);
|
||||
if (spawned) spawned->spr.pos.Z += 1;
|
||||
}
|
||||
break;
|
||||
case RPG2:
|
||||
|
@ -1222,7 +1222,7 @@ static void weaponcommon_r(DDukeActor *proj)
|
|||
if (proj->spr.xrepeat >= 10 && proj->sector()->lotag != 2)
|
||||
{
|
||||
auto spawned = spawn(proj, SMALLSMOKE);
|
||||
if (spawned) spawned->add_int_z(1 << 8);
|
||||
if (spawned) spawned->spr.pos.Z += 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -326,15 +326,15 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
break;
|
||||
|
||||
case PLAYER_POSX: // oh, my... :( Writing to these has been disabled until I know how to do it without the engine shitting all over itself.
|
||||
if (!bSet) SetGameVarID(lVar2, ps[iPlayer].player_int_pos().X, sActor, sPlayer);
|
||||
if (!bSet) SetGameVarID(lVar2, ps[iPlayer].pos.X * (1/maptoworld), sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_POSY:
|
||||
if (!bSet) SetGameVarID(lVar2, ps[iPlayer].player_int_pos().Y, sActor, sPlayer);
|
||||
if (!bSet) SetGameVarID(lVar2, ps[iPlayer].pos.Y * (1 / maptoworld), sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_POSZ:
|
||||
if (!bSet) SetGameVarID(lVar2, ps[iPlayer].player_int_pos().Z, sActor, sPlayer);
|
||||
if (!bSet) SetGameVarID(lVar2, ps[iPlayer].pos.Z * (1 / zmaptoworld), sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_HORIZ:
|
||||
|
@ -2048,7 +2048,7 @@ int ParseState::parse(void)
|
|||
ps[g_p].newOwner = nullptr;
|
||||
ps[g_p].restorexyz();
|
||||
ps[g_p].angle.restore();
|
||||
updatesector(ps[g_p].player_int_pos().X,ps[g_p].player_int_pos().Y,&ps[g_p].cursector);
|
||||
updatesector(ps[g_p].pos, &ps[g_p].cursector);
|
||||
|
||||
DukeStatIterator it(STAT_ACTOR);
|
||||
while (auto actj = it.Next())
|
||||
|
@ -2402,7 +2402,7 @@ int ParseState::parse(void)
|
|||
j = 1;
|
||||
else if( (l& prunning) && s >= 8 && PlayerInput(g_p, SB_RUN) )
|
||||
j = 1;
|
||||
else if( (l& phigher) && ps[g_p].player_int_pos().Z < (g_ac->int_pos().Z-(48<<8)) )
|
||||
else if( (l& phigher) && ps[g_p].pos.Z < g_ac->spr.pos.Z - 48)
|
||||
j = 1;
|
||||
else if( (l& pwalkingback) && s <= -8 && !(PlayerInput(g_p, SB_RUN)) )
|
||||
j = 1;
|
||||
|
@ -2425,9 +2425,9 @@ int ParseState::parse(void)
|
|||
else if( (l& pfacing) )
|
||||
{
|
||||
if (g_ac->isPlayer() && ud.multimode > 1)
|
||||
j = getincangle(ps[otherp].angle.ang.asbuild(), getangle(ps[g_p].player_int_pos().X - ps[otherp].player_int_pos().X, ps[g_p].player_int_pos().Y - ps[otherp].player_int_pos().Y));
|
||||
j = getincangle(ps[otherp].angle.ang.asbuild(), getangle(ps[g_p].pos.XY() - ps[otherp].pos.XY()));
|
||||
else
|
||||
j = getincangle(ps[g_p].angle.ang.asbuild(), getangle(g_ac->int_pos().X - ps[g_p].player_int_pos().X, g_ac->int_pos().Y - ps[g_p].player_int_pos().Y));
|
||||
j = getincangle(ps[g_p].angle.ang.asbuild(), getangle(g_ac->spr.pos.XY() - ps[g_p].pos.XY()));
|
||||
|
||||
if( j > -128 && j < 128 )
|
||||
j = 1;
|
||||
|
|
|
@ -511,8 +511,8 @@ void footprints(int snum)
|
|||
while (auto act = it.Next())
|
||||
{
|
||||
if (act->spr.picnum == TILE_FOOTPRINTS || act->spr.picnum == TILE_FOOTPRINTS2 || act->spr.picnum == TILE_FOOTPRINTS3 || act->spr.picnum == TILE_FOOTPRINTS4)
|
||||
if (abs(act->int_pos().X - p->player_int_pos().X) < 384)
|
||||
if (abs(act->int_pos().Y - p->player_int_pos().Y) < 384)
|
||||
if (abs(act->spr.pos.X - p->pos.X) < 24)
|
||||
if (abs(act->spr.pos.Y - p->pos.Y) < 24)
|
||||
{
|
||||
j = 1;
|
||||
break;
|
||||
|
@ -612,7 +612,7 @@ void playerisdead(int snum, int psectlotag, int fz, int cz)
|
|||
{
|
||||
if (p->on_warping_sector == 0)
|
||||
{
|
||||
if (abs(p->player_int_pos().Z - fz) > (gs.int_playerheight >> 1))
|
||||
if (abs(p->pos.Z - fz * inttoworld) > (gs.playerheight * 0.5))
|
||||
p->pos.Z += 348/ 256.;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -3897,7 +3897,7 @@ HORIZONLY:
|
|||
}
|
||||
|
||||
// RBG***
|
||||
SetActor(pact, vec3_t( p->player_int_pos().X, p->player_int_pos().Y, p->player_int_pos().Z + gs.int_playerheight ));
|
||||
SetActor(pact, p->pos.plusZ(gs.playerheight));
|
||||
|
||||
if (psectlotag == 800 && (!isRRRA() || !p->lotag800kill))
|
||||
{
|
||||
|
|
|
@ -303,7 +303,7 @@ void spawntransporter(DDukeActor *actj, DDukeActor* act, bool beam)
|
|||
{
|
||||
act->spr.xrepeat = 31;
|
||||
act->spr.yrepeat = 1;
|
||||
act->set_int_z(actj->sector()->int_floorz() - gs.int_playerheight);
|
||||
act->spr.pos.Z = actj->sector()->floorz - gs.playerheight;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -441,7 +441,7 @@ void initshell(DDukeActor* actj, DDukeActor* act, bool isshell)
|
|||
else
|
||||
{
|
||||
a = act->spr.ang;
|
||||
act->set_int_z(actj->int_pos().Z - gs.int_playerheight + (3 << 8));
|
||||
act->spr.pos.Z = actj->spr.pos.Z - gs.playerheight + 3;
|
||||
}
|
||||
|
||||
act->set_int_xy(actj->int_pos().X + bcos(a, -7), actj->int_pos().Y + bsin(a, -7));
|
||||
|
|
|
@ -202,7 +202,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case TONGUE:
|
||||
if (actj)
|
||||
act->spr.ang = actj->spr.ang;
|
||||
act->add_int_z(-gs.int_playerheight);
|
||||
act->spr.pos.Z -= gs.playerheight;
|
||||
act->spr.zvel = 256 - (krand() & 511);
|
||||
act->spr.xvel = 64 - (krand() & 127);
|
||||
ChangeActorStat(act, 4);
|
||||
|
|
|
@ -284,7 +284,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case TONGUE:
|
||||
if (actj)
|
||||
act->spr.ang = actj->spr.ang;
|
||||
act->add_int_z(-gs.int_playerheight);
|
||||
act->spr.pos.Z -= gs.playerheight;
|
||||
act->spr.zvel = 256 - (krand() & 511);
|
||||
act->spr.xvel = 64 - (krand() & 127);
|
||||
ChangeActorStat(act, 4);
|
||||
|
|
Loading…
Reference in a new issue