SVN r43 (trunk)

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

View file

@ -4,6 +4,17 @@ April 13, 2006
- Update FLAC readers to #define FLAC__NO_DLL to match the new FLAC builds.
April 13, 2006 (Changes by Graf Zahl)
- Made weapons/bowhit unlimited. With a limit of 2 it won't be played
consistently.
- Fixed: 'Give' worked for dead players.
- Added checks for sectors without lines to all Find* functions in p_sector.cpp
- Fixed: Dehacked patches weren't loaded when not playing Doom.
- Fixed: Thing_Remove must not remove living players from the map.
- Fixed: Using $MAP in SNDINFO overrides music definitions in MAPINFO. This
made it impossible to define music in MAPINFO for Hexen.
- Fixed: Resurrecting a morphed player must first restore the unmorphed
version.
- Fixed: Resurrect must set the player's weapon to a valid state.
- Fixed: The decal stretcher is supposed to stretch the decal to a specifiable
size but it used that size as a scaling factor instead. The old code allowed
a maximum scaling factor of 4 which masked this bug to a large extent but
@ -25,7 +36,8 @@ April 13, 2006 (Changes by Graf Zahl)
* 'monster' lists all monsters and their position.
* 'itemd' does the same for items.
* 'changesky' changes the sky texture. Useful for trying out different skies.
* 'linetarget' prints some information about the monster the player is aiming at.
* 'linetarget' prints some information about the monster the player is aiming
at.
April 12, 2006
- Fixed: Using printinv before starting a game crashed.

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);
}

View file

@ -574,6 +574,7 @@ $limit weapons/phoenixhit 0
$limit weapons/phoenixpowshoot 1
// [RH] Heretic didn't have these limitless, but they can sound bad if they're not
$limit weapons/bowhit 0
$limit weapons/hornrodshoot 0
$limit weapons/hornrodhit 0
$limit weapons/maceshoot 0