- added OBJECT_SMASHED_MARK constant

This commit is contained in:
Ilya Shurumov 2021-06-23 12:36:30 +06:00 committed by InspirationByte
parent 04e1be8a72
commit 1bcd4de91f
3 changed files with 4 additions and 2 deletions

View File

@ -605,7 +605,7 @@ int CarBuildingCollision(CAR_DATA *cp, BUILDING_BOX *building, CELL_OBJECT *cop,
else
buildingHeightY = building->height >> 1;
if (boxDiffY <= buildingHeightY + (cp->hd.oBox.length[1] >> 1) && (cop->pos.vx != 0xFD46FEC0) && (model->shape_flags & SHAPE_FLAG_NOCOLLIDE) == 0)
if (boxDiffY <= buildingHeightY + (cp->hd.oBox.length[1] >> 1) && (cop->pos.vx != OBJECT_SMASHED_MARK) && (model->shape_flags & SHAPE_FLAG_NOCOLLIDE) == 0)
{
tempwhere.vx = cp->hd.where.t[0];
tempwhere.vz = cp->hd.where.t[2];

View File

@ -1616,7 +1616,7 @@ int damage_object(CELL_OBJECT *cop, VECTOR *velocity)
if (dam->velocity.vy < -67)
dam->velocity.vy = -67;
cop->pos.vx = 0xFD46FEC0;
cop->pos.vx = OBJECT_SMASHED_MARK;
return 0;
}

View File

@ -15,6 +15,8 @@ struct SMASHABLE_OBJECT
#define SMOKE_BROWN 3
#define SMOKE_FIRE 4
#define OBJECT_SMASHED_MARK 0xFD46FEC0
extern TEXTURE_DETAILS smoke_texture;
extern TEXTURE_DETAILS debris_texture;
extern TEXTURE_DETAILS litter_texture;