Code consistency checks by _Tyr_; Fixed set but unused variables
This commit is contained in:
parent
80e69421d8
commit
22316fa5d6
|
@ -1,5 +1,9 @@
|
||||||
D1X-Rebirth Changelog
|
D1X-Rebirth Changelog
|
||||||
|
|
||||||
|
20110926
|
||||||
|
--------
|
||||||
|
main/fireball.c: Code consistency checks by _Tyr_; Fixed set but unused variables
|
||||||
|
|
||||||
20110925
|
20110925
|
||||||
--------
|
--------
|
||||||
main/game.c: Fixed misuse of gr_bitblt_find_transparent_area() caused rear view to be shifted on some cockpits
|
main/game.c: Fixed misuse of gr_bitblt_find_transparent_area() caused rear view to be shifted on some cockpits
|
||||||
|
|
|
@ -86,10 +86,16 @@ object *object_create_explosion_sub(object *objp, short segnum, vms_vector * pos
|
||||||
// -- now legal for badass explosions on a wall. Assert(objp != NULL);
|
// -- now legal for badass explosions on a wall. Assert(objp != NULL);
|
||||||
|
|
||||||
for (i=0; i<=Highest_object_index; i++ ) {
|
for (i=0; i<=Highest_object_index; i++ ) {
|
||||||
|
sbyte parent_check = 0;
|
||||||
// Weapons used to be affected by badass explosions, but this introduces serious problems.
|
// Weapons used to be affected by badass explosions, but this introduces serious problems.
|
||||||
// When a smart bomb blows up, if one of its children goes right towards a nearby wall, it will
|
// When a smart bomb blows up, if one of its children goes right towards a nearby wall, it will
|
||||||
// blow up, blowing up all the children. So I remove it. MK, 09/11/94
|
// blow up, blowing up all the children. So I remove it. MK, 09/11/94
|
||||||
if ( (obj0p->type == OBJ_CNTRLCEN) || (obj0p->type==OBJ_PLAYER) || ((obj0p->type==OBJ_ROBOT) && ((Objects[parent].type != OBJ_ROBOT) || (Objects[parent].id != obj0p->id)))) {
|
|
||||||
|
if (parent != -1)
|
||||||
|
if ((Objects[parent].type != OBJ_ROBOT) || (Objects[parent].id != obj0p->id))
|
||||||
|
parent_check = 1;
|
||||||
|
|
||||||
|
if ( (obj0p->type == OBJ_CNTRLCEN) || (obj0p->type==OBJ_PLAYER) || ((obj0p->type==OBJ_ROBOT) && parent_check)) {
|
||||||
dist = vm_vec_dist_quick( &obj0p->pos, &obj->pos );
|
dist = vm_vec_dist_quick( &obj0p->pos, &obj->pos );
|
||||||
// Make damage be from 'maxdamage' to 0.0, where 0.0 is 'maxdistance' away;
|
// Make damage be from 'maxdamage' to 0.0, where 0.0 is 'maxdistance' away;
|
||||||
if ( dist < maxdistance ) {
|
if ( dist < maxdistance ) {
|
||||||
|
@ -229,7 +235,6 @@ object *object_create_debris(object *parent, int subobj_num)
|
||||||
{
|
{
|
||||||
int objnum;
|
int objnum;
|
||||||
object *obj;
|
object *obj;
|
||||||
polymodel *po;
|
|
||||||
|
|
||||||
Assert((parent->type == OBJ_ROBOT) || (parent->type == OBJ_PLAYER) );
|
Assert((parent->type == OBJ_ROBOT) || (parent->type == OBJ_PLAYER) );
|
||||||
|
|
||||||
|
@ -257,8 +262,6 @@ object *object_create_debris(object *parent, int subobj_num)
|
||||||
|
|
||||||
//Set physics data for this object
|
//Set physics data for this object
|
||||||
|
|
||||||
po = &Polygon_models[obj->rtype.pobj_info.model_num];
|
|
||||||
|
|
||||||
obj->mtype.phys_info.velocity.x = D_RAND_MAX/2 - d_rand();
|
obj->mtype.phys_info.velocity.x = D_RAND_MAX/2 - d_rand();
|
||||||
obj->mtype.phys_info.velocity.y = D_RAND_MAX/2 - d_rand();
|
obj->mtype.phys_info.velocity.y = D_RAND_MAX/2 - d_rand();
|
||||||
obj->mtype.phys_info.velocity.z = D_RAND_MAX/2 - d_rand();
|
obj->mtype.phys_info.velocity.z = D_RAND_MAX/2 - d_rand();
|
||||||
|
@ -601,15 +604,11 @@ void maybe_replace_powerup_with_energy(object *del_obj)
|
||||||
// Returns created object number.
|
// Returns created object number.
|
||||||
int object_create_egg(object *objp)
|
int object_create_egg(object *objp)
|
||||||
{
|
{
|
||||||
int objnum=0;
|
int objnum=0, count;
|
||||||
object *obj;
|
object *obj;
|
||||||
int powerup_type, powerup_id, count;
|
|
||||||
vms_vector new_velocity, new_pos;
|
vms_vector new_velocity, new_pos;
|
||||||
fix old_mag;
|
fix old_mag;
|
||||||
|
|
||||||
powerup_type = objp->contains_type;
|
|
||||||
powerup_id = objp->contains_id;
|
|
||||||
|
|
||||||
switch (objp->contains_type) {
|
switch (objp->contains_type) {
|
||||||
case OBJ_POWERUP:
|
case OBJ_POWERUP:
|
||||||
for (count=0; count<objp->contains_count; count++) {
|
for (count=0; count<objp->contains_count; count++) {
|
||||||
|
|
Loading…
Reference in a new issue