- Fixed some GCC warnings.

- fixed: The BossCube could be blocked by floors and ceiling resulting
  in incorrect movement. I changed it so that A_BrainSpit now sets the
  MF5_NOINTERACTION flag for anything it spawns that has the MF_NOCLIP
  flag. For travelling cubes active collision detection makes no sense
  and only causes problems. This should also make the boss brain
  work in the other games which previously were excluded by a game mode
  check in the movement code.
- fixed: ACS's GetUserVariable did not work for the script activator.
- fixed: Moving floors could be blocked by 2 actors without MF2_PASSMOBJ
  overlapping each other (common mapping bug, check Herian 2 MAP30.)

SVN r1891 (trunk)
This commit is contained in:
Christoph Oelckers 2009-10-01 14:54:29 +00:00
parent 7e4504f9d6
commit 59d932b972
7 changed files with 45 additions and 10 deletions

View file

@ -1,3 +1,16 @@
October 1, 2009 (Changes by Graf Zahl)
- Fixed some GCC warnings.
- fixed: The BossCube could be blocked by floors and ceiling resulting
in incorrect movement. I changed it so that A_BrainSpit now sets the
MF5_NOINTERACTION flag for anything it spawns that has the MF_NOCLIP
flag. For travelling cubes active collision detection makes no sense
and only causes problems. This should also make the boss brain
work in the other games which previously were excluded by a game mode
check in the movement code.
- fixed: ACS's GetUserVariable did not work for the script activator.
- fixed: Moving floors could be blocked by 2 actors without MF2_PASSMOBJ
overlapping each other (common mapping bug, check Herian 2 MAP30.)
September 30, 2009 (Changes by Graf Zahl) September 30, 2009 (Changes by Graf Zahl)
- Fixed: Coordinate handling for multipatch texture compositing was not correct - Fixed: Coordinate handling for multipatch texture compositing was not correct
for true color. Instead of using a clipping rectangle on the destination it for true color. Instead of using a clipping rectangle on the destination it

View file

@ -203,7 +203,7 @@ void DThinker::SerializeAll(FArchive &arc, bool hubLoad)
// before the crash - which is not the case with all other options. // before the crash - which is not the case with all other options.
//DestroyAllThinkers(); //DestroyAllThinkers();
I_FatalError(err.GetMessage()); I_FatalError("%s", err.GetMessage());
throw; throw;
} }
bSerialOverride = false; bSerialOverride = false;

View file

@ -103,6 +103,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BrainSpit)
// spawn brain missile // spawn brain missile
spit = P_SpawnMissile (self, targ, spawntype); spit = P_SpawnMissile (self, targ, spawntype);
// Boss cubes should move freely to their destination so it's
// probably best to disable all collision detection for them.
if (spit->flags & MF_NOCLIP) spit->flags5 |= MF5_NOINTERACTION;
if (spit != NULL) if (spit != NULL)
{ {
spit->target = targ; spit->target = targ;

View file

@ -357,7 +357,7 @@ fixed_t DBaseDecal::GetRealZ (const side_t *wall) const
void DBaseDecal::CalcFracPos (side_t *wall, fixed_t x, fixed_t y) void DBaseDecal::CalcFracPos (side_t *wall, fixed_t x, fixed_t y)
{ {
line_t *line = line = wall->linedef; line_t *line = wall->linedef;
vertex_t *v1, *v2; vertex_t *v1, *v2;
if (line->sidedef[0] == wall) if (line->sidedef[0] == wall)
@ -390,7 +390,7 @@ void DBaseDecal::CalcFracPos (side_t *wall, fixed_t x, fixed_t y)
static void GetWallStuff (side_t *wall, vertex_t *&v1, fixed_t &ldx, fixed_t &ldy) static void GetWallStuff (side_t *wall, vertex_t *&v1, fixed_t &ldx, fixed_t &ldy)
{ {
line_t *line = line = wall->linedef; line_t *line = wall->linedef;
if (line->sidedef[0] == wall) if (line->sidedef[0] == wall)
{ {
v1 = line->v1; v1 = line->v1;
@ -412,7 +412,7 @@ static fixed_t Length (fixed_t dx, fixed_t dy)
static side_t *NextWall (const side_t *wall) static side_t *NextWall (const side_t *wall)
{ {
line_t *line = line = wall->linedef;; line_t *line = wall->linedef;
if (line->sidedef[0] == wall) if (line->sidedef[0] == wall)
{ {

View file

@ -3118,12 +3118,14 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args)
} }
case ACSF_GetUserVariable: case ACSF_GetUserVariable:
{
if (args[1] >= 0 && args[1] < 10) if (args[1] >= 0 && args[1] < 10)
{ {
activator = SingleActorFromTID(args[0], NULL); AActor *a = args[0] == 0 ? (AActor *)activator : SingleActorFromTID(args[0], NULL);
return activator != NULL? activator->uservar[args[1]] : 0; return a != NULL? a->uservar[args[1]] : 0;
} }
else return 0; else return 0;
}
default: default:

View file

@ -4323,6 +4323,13 @@ void P_FindAboveIntersectors (AActor *actor)
{ // Don't clip against self { // Don't clip against self
continue; continue;
} }
if (!((thing->flags2 | actor->flags2) & MF2_PASSMOBJ) && !((thing->flags3 | actor->flags3) & MF3_ISMONSTER))
{
// Don't bother if both things don't have MF2_PASSMOBJ set and aren't monsters.
// These things would always block each other which in nearly every situation is
// not what is wanted here.
continue;
}
if (thing->z >= actor->z && if (thing->z >= actor->z &&
thing->z <= actor->z + actor->height) thing->z <= actor->z + actor->height)
{ // Thing intersects above the base { // Thing intersects above the base
@ -4365,6 +4372,13 @@ void P_FindBelowIntersectors (AActor *actor)
{ // Don't clip against self { // Don't clip against self
continue; continue;
} }
if (!((thing->flags2 | actor->flags2) & MF2_PASSMOBJ) && !((thing->flags3 | actor->flags3) & MF3_ISMONSTER))
{
// Don't bother if both things don't have MF2_PASSMOBJ set and aren't monsters.
// These things would always block each other which in nearly every situation is
// not what is wanted here.
continue;
}
if (thing->z + thing->height <= actor->z + actor->height && if (thing->z + thing->height <= actor->z + actor->height &&
thing->z + thing->height > actor->z) thing->z + thing->height > actor->z)
{ // Thing intersects below the base { // Thing intersects below the base

View file

@ -2177,8 +2177,10 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz)
// teleported the actor so it is no longer below the floor. // teleported the actor so it is no longer below the floor.
if (mo->z <= mo->floorz) if (mo->z <= mo->floorz)
{ {
if ((mo->flags & MF_MISSILE) && // old code for boss cube disabled
(!(gameinfo.gametype & GAME_DoomChex) || !(mo->flags & MF_NOCLIP))) //if ((mo->flags & MF_MISSILE) && (!(gameinfo.gametype & GAME_DoomChex) || !(mo->flags & MF_NOCLIP)))
if (mo->flags & MF_MISSILE)
{ {
mo->z = mo->floorz; mo->z = mo->floorz;
if (mo->BounceFlags & BOUNCE_Floors) if (mo->BounceFlags & BOUNCE_Floors)
@ -2289,8 +2291,8 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz)
} }
if (mo->velz > 0) if (mo->velz > 0)
mo->velz = 0; mo->velz = 0;
if (mo->flags & MF_MISSILE && if (mo->flags & MF_MISSILE)
(!(gameinfo.gametype & GAME_DoomChex) || !(mo->flags & MF_NOCLIP))) //&& (!(gameinfo.gametype & GAME_DoomChex) || !(mo->flags & MF_NOCLIP)))
{ {
if (mo->flags3 & MF3_CEILINGHUGGER) if (mo->flags3 & MF3_CEILINGHUGGER)
{ {