Skip to content

Commit

Permalink
Atmos movement in the space #197
Browse files Browse the repository at this point in the history
  • Loading branch information
kremius committed Aug 29, 2016
1 parent 8bf1d2f commit cde3970
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
10 changes: 4 additions & 6 deletions Sources/core/atmos/Atmos.cpp
Expand Up @@ -102,9 +102,11 @@ void Atmosphere::UnloadDataFromGrid()
{
for (int i = 0; i < GASES_NUM; ++i)
{
cell.data.gases[i] /= 2;
cell.data.gases[i] *= 4;
cell.data.gases[i] /= 5;
}
cell.data.energy /= 2;
cell.data.energy *= 4;
cell.data.energy /= 5;
}

UpdateMacroParams(&cell.data);
Expand All @@ -123,10 +125,6 @@ void Atmosphere::ProcessTileMove(size_t x, size_t y, size_t z)
{
return;
}
if (tile->GetTurf()->GetAtmosState() == SPACE)
{
return;
}

for (Dir dir = 0; dir < 4; ++dir)
{
Expand Down
1 change: 1 addition & 0 deletions Sources/core/objects/Lattice.cpp
Expand Up @@ -14,6 +14,7 @@ Lattice::Lattice(size_t id) : Structure(id)
SetState("latticefull");

v_level = 1;
anchored = true;

name = "Lattice";
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/core/objects/Tables.cpp
Expand Up @@ -5,7 +5,7 @@
Table::Table(size_t id) : IMovable(id)
{
anchored = true;
v_level = 5;
v_level = 4;
SetPassable(D_ALL, Passable::SMALL_CREATURE);
SetSprite("");
material_ = "";
Expand Down
4 changes: 3 additions & 1 deletion Sources/core/objects/Turf.cpp
Expand Up @@ -22,13 +22,15 @@ int Friction::CombinedFriction(IdPtr<ITurf> turf)
+ turf->GetNeighbour(D_LEFT)->GetTurf()->GetFriction()
+ turf->GetNeighbour(D_RIGHT)->GetTurf()->GetFriction();
if (retval > Friction::BASE_FRICTION)
{
retval = Friction::BASE_FRICTION;
}

// TODO: Remake

if (retval < Friction::BASE_FRICTION)
{
if ( turf->GetItem<Lattice>()
if ( turf->GetOwner()->GetItem<Lattice>()
|| turf->GetNeighbour(D_UP)->GetItem<Lattice>()
|| turf->GetNeighbour(D_DOWN)->GetItem<Lattice>()
|| turf->GetNeighbour(D_LEFT)->GetItem<Lattice>()
Expand Down

0 comments on commit cde3970

Please sign in to comment.