- Fixed: Some missile spawning functions ignored the FastSpeed setting.

- Fixed: P_CheckSwitchRange tried to access a line's backsector without
  checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
  SetActivator, SetActivatorToTarget.


SVN r1578 (trunk)
This commit is contained in:
Christoph Oelckers 2009-05-11 22:16:41 +00:00
commit 912abc144e
5 changed files with 104 additions and 24 deletions

View file

@ -464,13 +464,13 @@ static int TryFindSwitch (side_t *side, int Where)
//
bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno)
{
if (line->sidenum[0] == NO_SIDE) return true;
// Activated from an empty side -> always succeed
if (line->sidenum[sideno] == NO_SIDE) return true;
fixed_t checktop;
fixed_t checkbot;
side_t *side = &sides[line->sidenum[sideno]];
sector_t *front = sides[line->sidenum[sideno]].sector;
sector_t *back = sides[line->sidenum[1-sideno]].sector;
FLineOpening open;
// 3DMIDTEX forces CHECKSWITCHRANGE because otherwise it might cause problems.
@ -495,8 +495,8 @@ bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno)
if (line->sidenum[1] == NO_SIDE)
{
onesided:
fixed_t sectorc = line->frontsector->ceilingplane.ZatPoint(checkx, checky);
fixed_t sectorf = line->frontsector->floorplane.ZatPoint(checkx, checky);
fixed_t sectorc = front->ceilingplane.ZatPoint(checkx, checky);
fixed_t sectorf = front->floorplane.ZatPoint(checkx, checky);
return (user->z + user->height >= sectorf && user->z <= sectorc);
}