SVN r43 (trunk)

This commit is contained in:
Christoph Oelckers 2006-04-13 22:40:43 +00:00
commit 4dd936e438
9 changed files with 70 additions and 11 deletions

View file

@ -2027,10 +2027,11 @@ void D_DoomMain (void)
// [RH] Try adding .deh and .bex files on the command line.
// If there are none, try adding any in the config file.
if (gameinfo.gametype == GAME_Doom)
//if (gameinfo.gametype == GAME_Doom)
{
if (!ConsiderPatches ("-deh", ".deh") &&
!ConsiderPatches ("-bex", ".bex") &&
(gameinfo.gametype == GAME_Doom) &&
GameConfig->SetSection ("Doom.DefaultDehacked"))
{
const char *key;

View file

@ -865,6 +865,11 @@ static void ParseMapInfoLower (MapInfoHandler *handlers,
}
ReplaceString ((char **)(info + handler->data1), sc_String);
*((int *)(info + handler->data2)) = colon ? atoi (colon + 1) : 0;
if (levelinfo != NULL)
{
// Flag the level so that the $MAP command doesn't override this.
flags|=LEVEL_MUSICDEFINED;
}
}
break;

View file

@ -98,7 +98,8 @@
#define LEVEL_KEEPFULLINVENTORY UCONST64(0x4000000000) // doesn't reduce the amount of inventory items to 1
#define LEVEL_MONSTERFALLINGDAMAGE UCONST64(0x10000000000)
#define LEVEL_MUSICDEFINED UCONST64(0x8000000000) // a marker to disable the $map command in SNDINFO for this map
#define LEVEL_MONSTERFALLINGDAMAGE UCONST64(0x10000000000)
struct acsdefered_s;
class FBehavior;

View file

@ -273,12 +273,23 @@ void cht_DoCheat (player_t *player, int cheat)
if (player->playerstate != PST_LIVE && player->mo != NULL)
{
player->playerstate = PST_LIVE;
if (player->mo->tracer != NULL)
{
APlayerPawn * pmo = player->mo;
player->mo = (APlayerPawn*)player->mo->tracer;
pmo->Destroy();
player->mo->player=player;
player->mo->renderflags &= ~RF_INVISIBLE;
player->morphTics = 0;
}
player->health = player->mo->health = player->mo->GetDefault()->health;
player->viewheight = player->defaultviewheight;
player->mo->flags = player->mo->GetDefault()->flags;
player->mo->height = player->mo->GetDefault()->height;
player->mo->SetState (player->mo->SpawnState);
player->mo->Translation = TRANSLATION(TRANSLATION_Players, BYTE(player-players));
player->mo->GiveDefaultInventory();
P_SetPsprite(player, ps_weapon, player->ReadyWeapon->UpState);
}
break;
@ -435,7 +446,7 @@ void cht_Give (player_t *player, char *name, int amount)
if (player != &players[consoleplayer])
Printf ("%s is a cheater: give %s\n", player->userinfo.netname, name);
if (player->mo == NULL)
if (player->mo == NULL || player->health <= 0)
{
return;
}

View file

@ -1028,10 +1028,15 @@ FUNC(LS_Thing_Remove)
while (actor)
{
AActor *temp = iterator.Next ();
// be friendly to the level statistics! ;)
if (actor->flags&MF_COUNTKILL && actor->health > 0) level.total_monsters--;
if (actor->flags&MF_COUNTITEM) level.total_items--;
actor->Destroy ();
// Don't remove live players.
if (actor->player == NULL || actor != actor->player->mo)
{
// be friendly to the level statistics! ;)
if (actor->flags&MF_COUNTKILL && actor->health > 0) level.total_monsters--;
if (actor->flags&MF_COUNTITEM) level.total_items--;
actor->Destroy ();
}
actor = temp;
}

View file

@ -62,6 +62,8 @@ fixed_t sector_t::FindLowestFloorSurrounding (vertex_t **v) const
fixed_t ofloor;
vertex_t *spot;
if (linecount == 0) return floortexz;
spot = lines[0]->v1;
floor = floorplane.ZatPoint (spot);
@ -104,6 +106,8 @@ fixed_t sector_t::FindHighestFloorSurrounding (vertex_t **v) const
fixed_t ofloor;
vertex_t *spot;
if (linecount == 0) return floortexz;
spot = lines[0]->v1;
floor = FIXED_MIN;
@ -153,6 +157,8 @@ fixed_t sector_t::FindNextHighestFloor (vertex_t **v) const
line_t *check;
int i;
if (linecount == 0) return floortexz;
spot = lines[0]->v1;
height = floorplane.ZatPoint (spot);
heightdiff = FIXED_MAX;
@ -206,6 +212,8 @@ fixed_t sector_t::FindNextLowestFloor (vertex_t **v) const
line_t *check;
int i;
if (linecount == 0) return floortexz;
spot = lines[0]->v1;
height = floorplane.ZatPoint (spot);
heightdiff = FIXED_MAX;
@ -260,6 +268,9 @@ fixed_t sector_t::FindNextLowestCeiling (vertex_t **v) const
line_t *check;
int i;
if (linecount == 0) return ceilingtexz;
spot = lines[0]->v1;
height = ceilingplane.ZatPoint (spot);
heightdiff = FIXED_MAX;
@ -312,6 +323,8 @@ fixed_t sector_t::FindNextHighestCeiling (vertex_t **v) const
line_t *check;
int i;
if (linecount == 0) return ceilingtexz;
spot = lines[0]->v1;
height = ceilingplane.ZatPoint (spot);
heightdiff = FIXED_MAX;
@ -356,6 +369,8 @@ fixed_t sector_t::FindLowestCeilingSurrounding (vertex_t **v) const
line_t *check;
int i;
if (linecount == 0) return ceilingtexz;
spot = lines[0]->v1;
height = FIXED_MAX;
@ -396,6 +411,8 @@ fixed_t sector_t::FindHighestCeilingSurrounding (vertex_t **v) const
line_t *check;
int i;
if (linecount == 0) return ceilingtexz;
spot = lines[0]->v1;
height = FIXED_MIN;
@ -593,7 +610,10 @@ fixed_t sector_t::FindHighestFloorPoint (vertex_t **v) const
if ((floorplane.a | floorplane.b) == 0)
{
if (v != NULL)
*v = lines[0]->v1;
{
if (linecount == 0) *v = &vertexes[0];
else *v = lines[0]->v1;
}
return -floorplane.d;
}
@ -632,7 +652,10 @@ fixed_t sector_t::FindLowestCeilingPoint (vertex_t **v) const
if ((ceilingplane.a | ceilingplane.b) == 0)
{
if (v != NULL)
*v = lines[0]->v1;
{
if (linecount == 0) *v = &vertexes[0];
else *v = lines[0]->v1;
}
return ceilingplane.d;
}

View file

@ -779,7 +779,7 @@ static void S_AddSNDINFO (int lump)
sprintf (temp, "MAP%02d", sc_Number);
info = FindLevelInfo (temp);
SC_MustGetString ();
if (info->mapname[0])
if (info->mapname[0] && (!(info->flags&LEVEL_MUSICDEFINED)))
{
ReplaceString (&info->music, sc_String);
}