Skip to content

Commit

Permalink
Merge branch 'bugfixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
automerge authored and cybersphinx committed Oct 13, 2014
2 parents 1df4cb2 + cdadf82 commit f97fdd8
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
@@ -1,3 +1,12 @@
2014-??-??: Version 3.1.2
* General:
* Change: Some updated textures and models (commit:90f9ef01e8c684792507c49c86c99b1f72db473b)
* Change: No longer enforce a 255 max limit on number of structure types (commit:8f7b9c8f07502c2e0cb86fd2c7d6085dfae1896d, ticket:4205)
* Fix: Race condition bugs (commit:4986580f0845f47553713c2b3afbdfa82296d12a, ticket:4213, ticket:3228)
* Fix: Throttling of danger function was not working (commit:9827d7a2a99602016d55c9cc8cb18d375fb7b5a8, ticket:4212)
* Fix: Stop auto-repair from repairing unfinished structures (commit:8f7b9c8f07502c2e0cb86fd2c7d6085dfae1896d, ticket:4205)
* Fix: Fix wall rotation bug (commit: b562febeec102801e098a69c484fdc5c65fbdec3)

2013-12-11: Version 3.1.1
* General:
* Change: Updated textures by Christian Scholz (cnceo) (commit:1f5432d81c621f28dc091ba50aa0fb16b6e5d1e1)
Expand Down
2 changes: 1 addition & 1 deletion src/basedef.h
Expand Up @@ -116,7 +116,7 @@ struct BASE_OBJECT : public SIMPLE_OBJECT
/// Space-time coordinate, including orientation.
struct Spacetime
{
Spacetime() {}
Spacetime() : time(0), pos(0, 0, 0), rot(0, 0, 0) {}
Spacetime(Position pos_, Rotation rot_, uint32_t time_) : time(time_), pos(pos_), rot(rot_) {}

uint32_t time; ///< Game time
Expand Down
5 changes: 5 additions & 0 deletions src/component.cpp
Expand Up @@ -61,6 +61,11 @@ bool setPlayerColour(UDWORD player, UDWORD col)

UBYTE getPlayerColour(UDWORD pl)
{
if (pl == MAX_PLAYERS)
{
return 0; // baba
}
ASSERT_OR_RETURN(0, pl < MAX_PLAYERS, "Invalid player number %u", pl);
return NetPlay.players[pl].colour;
}

Expand Down
2 changes: 2 additions & 0 deletions src/droid.cpp
Expand Up @@ -1806,6 +1806,8 @@ DROID *reallyBuildDroid(DROID_TEMPLATE *pTemplate, Position pos, UDWORD player,
psDroid->droidType = droidTemplateType(pTemplate); // Is set again later to the same thing, in droidSetBits.
psDroid->pos = pos;
psDroid->rot = rot;
psDroid->prevSpacetime.pos = pos;
psDroid->prevSpacetime.rot = rot;

//don't worry if not on homebase cos not being drawn yet
if (!onMission)
Expand Down
8 changes: 4 additions & 4 deletions src/geometry.cpp
Expand Up @@ -105,8 +105,8 @@ bool inQuad(const Vector2i *pt, const QUAD *quad)

Vector2i positionInQuad(Vector2i const &pt, QUAD const &quad)
{
int lenSq[4];
int ptDot[4];
long lenSq[4];
long ptDot[4];
for (int i = 0, j = 3; i < 4; j = i++)
{
Vector2i edge = quad.coords[j] - quad.coords[i];
Expand All @@ -118,8 +118,8 @@ Vector2i positionInQuad(Vector2i const &pt, QUAD const &quad)
int ret[2];
for (int i = 0; i < 2; ++i)
{
int d1 = ptDot[i]*lenSq[i + 2];
int d2 = ptDot[i + 2]*lenSq[i];
long d1 = ptDot[i]*lenSq[i + 2];
long d2 = ptDot[i + 2]*lenSq[i];
ret[i] = d1 + d2 != 0? (int64_t)TILE_UNITS*d1 / (d1 + d2) : TILE_UNITS/2;
}
return Vector2i(ret[0], ret[1]);
Expand Down

0 comments on commit f97fdd8

Please sign in to comment.