mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-23 02:42:38 +01:00
- fix bug in CarBuildingCollision
This commit is contained in:
parent
e2a10e6680
commit
13fb2fe940
@ -976,16 +976,15 @@ int CarBuildingCollision(_CAR_DATA *cp, BUILDING_BOX *building, CELL_OBJECT *cop
|
||||
cd[0].isCameraOrTanner += 2;
|
||||
|
||||
cd[1].isCameraOrTanner = (flags & 0x1) == 0;
|
||||
boxDiffY = cp->hd.oBox.location.vy + building->pos.vy;
|
||||
|
||||
if (boxDiffY < 0)
|
||||
boxDiffY = -boxDiffY;
|
||||
boxDiffY = cp->hd.oBox.location.vy + building->pos.vy;
|
||||
boxDiffY = ABS(boxDiffY);
|
||||
|
||||
collided = 0;
|
||||
|
||||
car_cos = cp->ap.carCos;
|
||||
|
||||
if (boxDiffY <= (building->height >> 1) + (cp->hd.oBox.length[1] > 1) && (cop->pos.vx != 0xFD46FEC0) && (model->shape_flags & 0x10) == 0)
|
||||
if (boxDiffY <= (building->height >> 1) + (cp->hd.oBox.length[1] >> 1) && (cop->pos.vx != 0xFD46FEC0) && (model->shape_flags & 0x10) == 0)
|
||||
{
|
||||
tempwhere.vx = cp->hd.where.t[0];
|
||||
tempwhere.vz = cp->hd.where.t[2];
|
||||
|
Loading…
Reference in New Issue
Block a user