mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Merge branch 'polyobject-crush-fix-waypoint' into 'next'
Polyobject crush fix by waypoints [by TehRealSalt] See merge request STJr/SRB2!426
This commit is contained in:
commit
f06fd4149d
1 changed files with 12 additions and 0 deletions
|
@ -1859,6 +1859,9 @@ void T_PolyObjWaypoint(polywaypoint_t *th)
|
||||||
diffz = po->lines[0]->backsector->floorheight - (target->z - amtz);
|
diffz = po->lines[0]->backsector->floorheight - (target->z - amtz);
|
||||||
po->lines[0]->backsector->floorheight = target->z - amtz;
|
po->lines[0]->backsector->floorheight = target->z - amtz;
|
||||||
po->lines[0]->backsector->ceilingheight = target->z + amtz;
|
po->lines[0]->backsector->ceilingheight = target->z + amtz;
|
||||||
|
// Sal: Remember to check your sectors!
|
||||||
|
P_CheckSector(po->lines[0]->frontsector, (boolean)(po->damage));
|
||||||
|
P_CheckSector(po->lines[0]->backsector, (boolean)(po->damage));
|
||||||
// Apply action to mirroring polyobjects as well
|
// Apply action to mirroring polyobjects as well
|
||||||
start = 0;
|
start = 0;
|
||||||
while ((po = Polyobj_GetChild(oldpo, &start)))
|
while ((po = Polyobj_GetChild(oldpo, &start)))
|
||||||
|
@ -1870,6 +1873,9 @@ void T_PolyObjWaypoint(polywaypoint_t *th)
|
||||||
// TODO: use T_MovePlane
|
// TODO: use T_MovePlane
|
||||||
po->lines[0]->backsector->floorheight += diffz; // move up/down by same amount as the parent did
|
po->lines[0]->backsector->floorheight += diffz; // move up/down by same amount as the parent did
|
||||||
po->lines[0]->backsector->ceilingheight += diffz;
|
po->lines[0]->backsector->ceilingheight += diffz;
|
||||||
|
// Sal: Remember to check your sectors!
|
||||||
|
P_CheckSector(po->lines[0]->frontsector, (boolean)(po->damage));
|
||||||
|
P_CheckSector(po->lines[0]->backsector, (boolean)(po->damage));
|
||||||
}
|
}
|
||||||
|
|
||||||
po = oldpo;
|
po = oldpo;
|
||||||
|
@ -2030,6 +2036,9 @@ void T_PolyObjWaypoint(polywaypoint_t *th)
|
||||||
// TODO: use T_MovePlane
|
// TODO: use T_MovePlane
|
||||||
po->lines[0]->backsector->floorheight += momz;
|
po->lines[0]->backsector->floorheight += momz;
|
||||||
po->lines[0]->backsector->ceilingheight += momz;
|
po->lines[0]->backsector->ceilingheight += momz;
|
||||||
|
// Sal: Remember to check your sectors!
|
||||||
|
P_CheckSector(po->lines[0]->frontsector, (boolean)(po->damage)); // frontsector is NEEDED for crushing
|
||||||
|
P_CheckSector(po->lines[0]->backsector, (boolean)(po->damage)); // backsector may not be necessary, but just in case
|
||||||
|
|
||||||
// Apply action to mirroring polyobjects as well
|
// Apply action to mirroring polyobjects as well
|
||||||
start = 0;
|
start = 0;
|
||||||
|
@ -2042,6 +2051,9 @@ void T_PolyObjWaypoint(polywaypoint_t *th)
|
||||||
// TODO: use T_MovePlane
|
// TODO: use T_MovePlane
|
||||||
po->lines[0]->backsector->floorheight += momz;
|
po->lines[0]->backsector->floorheight += momz;
|
||||||
po->lines[0]->backsector->ceilingheight += momz;
|
po->lines[0]->backsector->ceilingheight += momz;
|
||||||
|
// Sal: Remember to check your sectors!
|
||||||
|
P_CheckSector(po->lines[0]->frontsector, (boolean)(po->damage));
|
||||||
|
P_CheckSector(po->lines[0]->backsector, (boolean)(po->damage));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue