Skip to content

Commit

Permalink
Add most of sMove structure to syncDebugDroid.
Browse files Browse the repository at this point in the history
Also, remove unused bound[XY] variables in sMove.
  • Loading branch information
Cyp committed Oct 26, 2010
1 parent ad4a38a commit 0a687db
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
10 changes: 9 additions & 1 deletion src/droid.c
Expand Up @@ -677,15 +677,21 @@ void droidBurn(DROID *psDroid)

void _syncDebugDroid(const char *function, DROID *psDroid, char ch)
{
_syncDebug(function, "%c droid%d = p%d;pos(%d.%d,%d.%d,%d),ord%d(%d,%d),act%d,so%X,bp%d, power = %"PRId64"", ch,
_syncDebug(function, "%c droid%d = p%d;pos(%d.%d,%d.%d,%d),rot(%d,%d,%d),ord%d(%d,%d),act%d,so%X,bp%d,sMove(st%d,spd%d,mdir%d,path%d/%d,src(%d,%d),tar(%d,%d),dst(%d,%d),bump(%d,%d,%d,%d,(%d,%d),%d)), power = %"PRId64"", ch,
psDroid->id,

psDroid->player,
psDroid->pos.x, psDroid->sMove.eBitX, psDroid->pos.y, psDroid->sMove.eBitY, psDroid->pos.z,
psDroid->rot.direction, psDroid->rot.pitch, psDroid->rot.roll,
psDroid->order, psDroid->orderX, psDroid->orderY,
psDroid->action,
psDroid->secondaryOrder,
psDroid->body,
psDroid->sMove.Status,
psDroid->sMove.speed, psDroid->sMove.moveDir,
psDroid->sMove.Position, psDroid->sMove.numPoints,
psDroid->sMove.srcX, psDroid->sMove.srcY, psDroid->sMove.targetX, psDroid->sMove.targetY, psDroid->sMove.DestinationX, psDroid->sMove.DestinationY,
psDroid->sMove.bumpDir, psDroid->sMove.bumpTime, psDroid->sMove.lastBump, psDroid->sMove.pauseTime, psDroid->sMove.bumpX, psDroid->sMove.bumpY, psDroid->sMove.shuffleStart,

getPrecisePower(psDroid->player));
}
Expand Down Expand Up @@ -745,6 +751,8 @@ void droidUpdate(DROID *psDroid)
// update the action of the droid
actionUpdateDroid(psDroid);

syncDebugDroid(psDroid, 'M');

// update the move system
moveUpdateDroid(psDroid);

Expand Down
4 changes: 0 additions & 4 deletions src/move.c
Expand Up @@ -2409,10 +2409,6 @@ void moveUpdateDroid(DROID *psDroid)
psPropStats = asPropulsionStats + psDroid->asBits[COMP_PROPULSION].nStat;
ASSERT_OR_RETURN(, psPropStats != NULL, "Invalid propulsion stats pointer");

// if(driveModeActive()) {
// driveUpdateDroid(psDroid);
// }

// If the droid has been attacked by an EMP weapon, it is temporarily disabled
if (psDroid->lastHitWeapon == WSC_EMP)
{
Expand Down
1 change: 0 additions & 1 deletion src/movedef.h
Expand Up @@ -66,7 +66,6 @@ typedef struct _move_control
SDWORD DestinationX, DestinationY; // World coordinates of movement destination
SDWORD srcX,srcY,targetX,targetY;
int speed; // Speed of motion
SWORD boundX,boundY; // Vector for the end of path boundary
int32_t eBitX, eBitY; // extra bits stored in a temporary bit bucket

uint16_t moveDir; // direction of motion (not the direction the droid is facing)
Expand Down

0 comments on commit 0a687db

Please sign in to comment.