Skip to content

Commit

Permalink
Merge branch 'master' of github.com:TurningWheel/Barony
Browse files Browse the repository at this point in the history
  • Loading branch information
addictgamer committed Feb 21, 2017
2 parents 0c0bfe1 + d12d888 commit d0bcd02
Show file tree
Hide file tree
Showing 51 changed files with 486 additions and 462 deletions.
4 changes: 2 additions & 2 deletions src/actarrow.cpp 100644 → 100755
Expand Up @@ -169,7 +169,7 @@ void actArrow(Entity* my)
if ( hit.entity->skill[0] != 1 && (hitstats->type < LICH || hitstats->type >= SHOPKEEPER) )
{
hit.entity->skill[0] = 2;
hit.entity->skill[1] = parent->uid;
hit.entity->skill[1] = parent->getUID();
hit.entity->fskill[2] = parent->x;
hit.entity->fskill[3] = parent->y;
}
Expand All @@ -193,7 +193,7 @@ void actArrow(Entity* my)
if ( hit.entity == entity )
{
entity->skill[0] = 2; // path state
entity->skill[1] = parent->uid;
entity->skill[1] = parent->getUID();
entity->fskill[2] = parent->x;
entity->fskill[3] = parent->y;
}
Expand Down
2 changes: 1 addition & 1 deletion src/actarrowtrap.cpp 100644 → 100755
Expand Up @@ -83,7 +83,7 @@ void actArrowTrap(Entity* my)
{
Entity* entity = newEntity(166, 1, map.entities); // arrow
playSoundEntity(my, 239 + rand() % 3, 96);
entity->parent = my->uid;
entity->parent = my->getUID();
entity->x = my->x + x;
entity->y = my->y + y;
entity->z = my->z;
Expand Down
2 changes: 1 addition & 1 deletion src/actbeartrap.cpp 100644 → 100755
Expand Up @@ -77,7 +77,7 @@ void actBeartrap(Entity* my)
for ( node = map.entities->first; node != NULL; node = node->next )
{
Entity* entity = (Entity*)node->element;
if ( my->parent == entity->uid )
if ( my->parent == entity->getUID() )
{
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/actboulder.cpp 100644 → 100755
Expand Up @@ -606,7 +606,7 @@ void actBoulderTrap(Entity* my)
if ( !map.tiles[OBSTACLELAYER + y * MAPLAYERS + x * MAPLAYERS * map.height] )
{
Entity* entity = newEntity(245, 1, map.entities); // boulder
entity->parent = my->uid;
entity->parent = my->getUID();
entity->x = (x << 4) + 8;
entity->y = (y << 4) + 8;
entity->z = -64;
Expand Down
2 changes: 1 addition & 1 deletion src/actchest.cpp 100644 → 100755
Expand Up @@ -476,7 +476,7 @@ void actChest(Entity* my)
{
//Send all of the items to the client.
strcpy((char*)net_packet->data, "CHST"); //Chest.
SDLNet_Write32((Uint32)my->uid, &net_packet->data[4]); //Give the client the UID.
SDLNet_Write32((Uint32)my->getUID(), &net_packet->data[4]); //Give the client the UID.
net_packet->address.host = net_clients[chestclicked - 1].host;
net_packet->address.port = net_clients[chestclicked - 1].port;
net_packet->len = 8;
Expand Down
4 changes: 2 additions & 2 deletions src/actflame.cpp 100644 → 100755
Expand Up @@ -57,7 +57,7 @@ Entity* spawnFlame(Entity* parentent)
entity = newEntity(13, 1, map.entities); // flame particle
if ( intro )
{
entity->uid = 0;
entity->setUID(0);
}
entity->x = parentent->x;
entity->y = parentent->y;
Expand All @@ -82,7 +82,7 @@ Entity* spawnFlame(Entity* parentent)
{
entity_uids--;
}
entity->uid = -3;
entity->setUID(-3);

return entity;
}
2 changes: 1 addition & 1 deletion src/actgeneral.cpp 100644 → 100755
Expand Up @@ -122,7 +122,7 @@ void actLiquid(Entity* my)
}
if ( LIQUID_LAVA && !LIQUID_LAVANOBUBBLE )
{
if ( ticks % 40 == my->uid % 40 && rand() % 3 == 0 )
if ( ticks % 40 == my->getUID() % 40 && rand() % 3 == 0 )
{
int c, j = 1 + rand() % 2;
for ( c = 0; c < j; c++ )
Expand Down
4 changes: 2 additions & 2 deletions src/actgib.cpp 100644 → 100755
Expand Up @@ -147,7 +147,7 @@ Entity* spawnGib(Entity* parentent)
entity->x = parentent->x;
entity->y = parentent->y;
entity->z = parentent->z;
entity->parent = parentent->uid;
entity->parent = parentent->getUID();
entity->sizex = 2;
entity->sizey = 2;
entity->yaw = (rand() % 360) * PI / 180.0;
Expand All @@ -170,7 +170,7 @@ Entity* spawnGib(Entity* parentent)
{
entity_uids--;
}
entity->uid = -3;
entity->setUID(-3);

return entity;
}
Expand Down
6 changes: 3 additions & 3 deletions src/acthudweapon.cpp 100644 → 100755
Expand Up @@ -196,11 +196,11 @@ void actHudWeapon(Entity* my)
{
HUDWEAPON_INIT = 1;
hudweapon = my;
hudweaponuid = my->uid;
hudweaponuid = my->getUID();
entity = newEntity(109, 1, map.entities); // malearmright.vox
entity->focalz = -1.5;
entity->parent = my->uid;
my->parent = entity->uid; // just an easy way to refer to eachother, doesn't mean much
entity->parent = my->getUID();
my->parent = entity->getUID(); // just an easy way to refer to eachother, doesn't mean much
hudarm = entity;
parent = hudarm;
entity->behavior = &actHudArm;
Expand Down
10 changes: 5 additions & 5 deletions src/actitem.cpp 100644 → 100755
Expand Up @@ -57,7 +57,7 @@ void actItem(Entity* my)
{
if ( entityInsideEntity(my, tempEntity) )
{
my->parent = tempEntity->uid;
my->parent = tempEntity->getUID();
}
else
{
Expand All @@ -69,7 +69,7 @@ void actItem(Entity* my)
{
if ( entityInsideEntity(my, entity) )
{
my->parent = entity->uid;
my->parent = entity->getUID();
break;
}
}
Expand All @@ -86,7 +86,7 @@ void actItem(Entity* my)
{
if ( entityInsideEntity(my, entity) )
{
my->parent = entity->uid;
my->parent = entity->getUID();
break;
}
}
Expand All @@ -95,11 +95,11 @@ void actItem(Entity* my)
}

// request entity update (check if I've been deleted)
if ( ticks % (TICKS_PER_SECOND * 5) == my->uid % (TICKS_PER_SECOND * 5) )
if ( ticks % (TICKS_PER_SECOND * 5) == my->getUID() % (TICKS_PER_SECOND * 5) )
{
strcpy((char*)net_packet->data, "ENTE");
net_packet->data[4] = clientnum;
SDLNet_Write32(my->uid, &net_packet->data[5]);
SDLNet_Write32(my->getUID(), &net_packet->data[5]);
net_packet->address.host = net_server.host;
net_packet->address.port = net_server.port;
net_packet->len = 9;
Expand Down

0 comments on commit d0bcd02

Please sign in to comment.