- Added a show_obituaries option to disable obituaries without disabling
other more important message types which have lower priority for some reason. - Added a menu option for show_messages after accidentally switching it off far too often and wondering why no messages appear. - Added crouching DoomPlayer sprites submitted by Enjay. - Fixed DF_NO_CROUCH was not checked. - Fixed: The intermission script parser had some of its cases in the keyword parser incorrectly sorted. - Fixed: atterm was still defined to take a STACK_ARGS function argument. - Added an AltFlash state for weapons. - Turned FloatSpeed into an actor property and changed the value to 5 for all floating Strife actors, as a comment in the source indicated. (r114 below): - Added GZDoom's code for Vavoom slope things because I wanted to test something with a map from Silent Steel. - Added nocrouch and allowcrouch MAPINFO commands and a DF_NO_CROUCH dmflag. - Added GZDoom's crouching code after cleaning it up so that adding crouching sprites will be easier. SVN r115 (trunk)
This commit is contained in:
parent
caed57baa5
commit
afd6a1258f
62 changed files with 195 additions and 16 deletions
|
|
@ -158,20 +158,51 @@ void APlayerPawn::BeginPlay ()
|
|||
|
||||
void APlayerPawn::Tick()
|
||||
{
|
||||
int crouchspriteno;
|
||||
|
||||
// FIXME: Handle skins
|
||||
|
||||
if (sprite == SpawnState->sprite.index && crouchsprite > 0)
|
||||
{
|
||||
crouchspriteno = crouchsprite;
|
||||
}
|
||||
else
|
||||
{
|
||||
// no sprite -> squash the existing one
|
||||
crouchspriteno = 0;
|
||||
}
|
||||
|
||||
if (player != NULL && player->mo == this && player->morphTics == 0 && player->playerstate != PST_DEAD)
|
||||
{
|
||||
yscale = FixedMul(GetDefault()->yscale, player->crouchfactor);
|
||||
height = FixedMul(GetDefault()->height, player->crouchfactor);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Ensure that PlayerPawns not connected to a player or morphed players are always un-crouched.
|
||||
yscale = GetDefault()->yscale;
|
||||
if (health > 0) height = GetDefault()->height;
|
||||
}
|
||||
Super::Tick();
|
||||
|
||||
// Here's the place where crouching sprites should be handled
|
||||
if (player->crouchfactor<FRACUNIT*3/4)
|
||||
{
|
||||
if (crouchsprite != 0)
|
||||
{
|
||||
sprite = crouchsprite;
|
||||
yscale = GetDefault()->yscale;
|
||||
}
|
||||
else if (player->playerstate != PST_DEAD)
|
||||
{
|
||||
yscale = player->crouchfactor < FRACUNIT*3/4 ? GetDefault()->yscale/2 : GetDefault()->yscale;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sprite == crouchsprite)
|
||||
{
|
||||
sprite = SpawnState->sprite.index;
|
||||
}
|
||||
yscale = GetDefault()->yscale;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
@ -1123,7 +1154,7 @@ void P_PlayerThink (player_t *player)
|
|||
}
|
||||
|
||||
// Handle crouching
|
||||
if (player->morphTics == 0)
|
||||
if (player->morphTics == 0 && !(dmflags & DF_NO_CROUCH))
|
||||
{
|
||||
if (!(player->cheats & CF_TOTALLYFROZEN))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue