Only in ../../pse-backup/space-1.1/space/src/: .depend Only in src: CVS diff -ur ../../pse-backup/space-1.1/space/src/object.h src/object.h --- ../../pse-backup/space-1.1/space/src/object.h Sun Jan 27 22:59:51 2002 +++ src/object.h Sun Apr 30 09:08:24 2000 @@ -62,7 +62,7 @@ int turnID; /* Turn ID of last rotation */ int moveID; /* Turn ID of last movement */ - float speed; /* Current speed (per unit time) */ + float speed; CONTACT *pending_lock; CONTACT *locked_on; Only in ../../pse-backup/space-1.1/space/src/: object.h~ Only in src/rxl: CVS Only in ../../pse-backup/space-1.1/space/src/: rxl.def Only in ../../pse-backup/space-1.1/space/src/: rxllib.h Only in src/scm: CVS Only in ../../pse-backup/space-1.1/space/src/: scm.def Only in ../../pse-backup/space-1.1/space/src/: scmlib.h diff -ur ../../pse-backup/space-1.1/space/src/smain.c src/smain.c --- ../../pse-backup/space-1.1/space/src/smain.c Mon Jan 28 00:05:40 2002 +++ src/smain.c Sun Apr 30 20:40:13 2000 @@ -426,12 +426,40 @@ } object->speed = object->shipdata->warp_speed; + +#ifndef ENABLE_FLOATS + /* If we're not using floating point coordinates, we can + * stop now due to rounding + */ + if (object->speed < 1.0) + continue; + + /* Add a 0.9 to account for rounding */ + dist = object->speed * object->speed * object->speed + 0.9; +#else + /* Distance is speed ^ 3 at warp + * Distance is a linear derating at impulse + */ + if (object->speed >= 1.0) + dist = object->speed * object->speed * object->speed; + else + dist = FULL_IMPULSE_DISTANCE * object->speed; +#endif - // Update the object's position - object_position(object, &pos, &now, 1); - - // Set the turn ID - used for sensor things. - object->moveID = move_turn_id; +#ifdef ENABLE_ODOMETER + if (Ship(object)) + F_INT(object->shipdata->rec, odometer) += dist; +#endif + + /* If speed changed, do an update */ + if (inc != 0) { + object->dc_pos.x += dist * object->v_move[0]; + object->dc_pos.y += dist * object->v_move[1]; + object->dc_pos.z += dist * object->v_move[2]; + object->dc_time.tv_sec = now.tv_sec; + object->dc_time.tv_usec = now.tv_usec; + object->moveID = move_turn_id; + } /* Enforce the maximum size of space. Eventually sector * transitions will go here. Only in ../../pse-backup/space-1.1/space/src/: smain.c~ diff -ur ../../pse-backup/space-1.1/space/src/smisc.c src/smisc.c --- ../../pse-backup/space-1.1/space/src/smisc.c Mon Jan 28 00:05:43 2002 +++ src/smisc.c Sun Apr 30 09:08:24 2000 @@ -520,11 +520,11 @@ void object_position(TAG *obj, XYZ *pos, struct timeval *at, int upd) { if (obj->speed == 0) { - + pos->x = obj->dc_pos.x; pos->y = obj->dc_pos.y; pos->z = obj->dc_pos.z; - + } else { /* FIXME: Not exactly right. Need to account for speed and @@ -538,45 +538,25 @@ */ double deltat; - double dist; /* Calculate the time difference in seconds */ deltat = (at->tv_sec - obj->dc_time.tv_sec) + ((at->tv_usec - obj->dc_time.tv_usec) / 1000000.0); - -#ifndef ENABLE_FLOATS - /* Add a 0.9 to account for rounding */ - dist = object->speed * object->speed * object->speed + 0.9; -#else - /* Distance is speed ^ 3 at warp - * Distance is a linear derating at impulse - */ - if (object->speed >= 1.0) - dist = object->speed * object->speed * object->speed; - else - dist = FULL_IMPULSE_DISTANCE * object->speed; -#endif - -#ifdef ENABLE_ODOMETER - if (Ship(obj)) - F_INT(obj->shipdata->rec, odometer) += dist; -#endif - + /* The basic linear position calculation */ - pos->x = obj->dc_pos.x + obj->v_move[0] * dist * deltat; - pos->y = obj->dc_pos.y + obj->v_move[1] * dist * deltat; - pos->z = obj->dc_pos.z + obj->v_move[2] * dist * deltat; - - } - - /* Update time and position if we were requested to */ - if (upd == 1) { - - obj->dc_pos.x = pos->x; - obj->dc_pos.y = pos->y; - obj->dc_pos.z = pos->z; - obj->dc_time.tv_sec = at->tv_sec; - obj->dc_time.tv_usec = at->tv_usec; + pos->x = obj->dc_pos.x + obj->v_move[0] * deltat; + pos->y = obj->dc_pos.y + obj->v_move[1] * deltat; + pos->z = obj->dc_pos.z + obj->v_move[2] * deltat; + + /* Update time and position if we were requested to */ + if (upd == 1) { + + obj->dc_pos.x = pos->x; + obj->dc_pos.y = pos->y; + obj->dc_pos.z = pos->z; + obj->dc_time.tv_sec = at->tv_sec; + obj->dc_time.tv_usec = at->tv_usec; + } } } Only in ../../pse-backup/space-1.1/space/src/: smisc.c~ diff -ur ../../pse-backup/space-1.1/space/src/spaceconf.h src/spaceconf.h --- ../../pse-backup/space-1.1/space/src/spaceconf.h Wed Mar 1 00:04:19 2000 +++ src/spaceconf.h Tue Feb 29 23:56:38 2000 @@ -69,7 +69,7 @@ * NOTE: THIS CODE IS INCOMPLETE AND SHOULD NOT BE ENABLED YET. */ -#define ENABLE_SHIELD_CLASSES +/* #define ENABLE_SHIELD_CLASSES */ /* Enable this to use 'long long' rather than 'int' as the coordinate and * range definition. Note that 'long long' is *NOT* ANSI-C and therefore may