mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-30 16:00:55 +00:00
- Fixed: GCC compiler warnings.
- zipdir will no longer store files ending in '~' on Linux. - Added st_oldouch which restores the old ouch face behavior of only showing when health increases by 20 while taking damage. SVN r3035 (trunk)
This commit is contained in:
parent
c6525a2271
commit
ee20d0ea7a
4 changed files with 18 additions and 9 deletions
|
@ -335,6 +335,7 @@ bool FMugShot::SetState(const char *state_name, bool wait_till_done, bool reset)
|
||||||
//
|
//
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
|
CVAR(Bool,st_oldouch,false,CVAR_ARCHIVE)
|
||||||
int FMugShot::UpdateState(player_t *player, StateFlags stateflags)
|
int FMugShot::UpdateState(player_t *player, StateFlags stateflags)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -357,9 +358,10 @@ int FMugShot::UpdateState(player_t *player, StateFlags stateflags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ouch = (!st_oldouch && FaceHealth - player->health > ST_MUCHPAIN) || (st_oldouch && player->health - FaceHealth > ST_MUCHPAIN);
|
||||||
if (player->damagecount &&
|
if (player->damagecount &&
|
||||||
// Now go in if pain is disabled but we think ouch will be shown (and ouch is not disabled!)
|
// Now go in if pain is disabled but we think ouch will be shown (and ouch is not disabled!)
|
||||||
(!(stateflags & DISABLEPAIN) || (((FaceHealth != -1 && FaceHealth - player->health > ST_MUCHPAIN) || bOuchActive) && !(stateflags & DISABLEOUCH))))
|
(!(stateflags & DISABLEPAIN) || (((FaceHealth != -1 && ouch) || bOuchActive) && !(stateflags & DISABLEOUCH))))
|
||||||
{
|
{
|
||||||
int damage_angle = 1;
|
int damage_angle = 1;
|
||||||
if (player->attacker && player->attacker != player->mo)
|
if (player->attacker && player->attacker != player->mo)
|
||||||
|
@ -391,7 +393,7 @@ int FMugShot::UpdateState(player_t *player, StateFlags stateflags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool use_ouch = false;
|
bool use_ouch = false;
|
||||||
if (((FaceHealth != -1 && FaceHealth - player->health > ST_MUCHPAIN) || bOuchActive) && !(stateflags & DISABLEOUCH))
|
if (((FaceHealth != -1 && ouch) || bOuchActive) && !(stateflags & DISABLEOUCH))
|
||||||
{
|
{
|
||||||
use_ouch = true;
|
use_ouch = true;
|
||||||
full_state_name = "ouch.";
|
full_state_name = "ouch.";
|
||||||
|
@ -418,7 +420,7 @@ int FMugShot::UpdateState(player_t *player, StateFlags stateflags)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool use_ouch = false;
|
bool use_ouch = false;
|
||||||
if (((FaceHealth != -1 && player->health - FaceHealth > ST_MUCHPAIN) || bOuchActive) && !(stateflags & DISABLEOUCH))
|
if (((FaceHealth != -1 && ouch) || bOuchActive) && !(stateflags & DISABLEOUCH))
|
||||||
{
|
{
|
||||||
use_ouch = true;
|
use_ouch = true;
|
||||||
full_state_name = "ouch.";
|
full_state_name = "ouch.";
|
||||||
|
|
|
@ -325,13 +325,13 @@ void FTextureManager::AddSwitchPair (FSwitchDef *def1, FSwitchDef *def2)
|
||||||
{
|
{
|
||||||
index1 = i;
|
index1 = i;
|
||||||
sw1 = mSwitchDefs[index1];
|
sw1 = mSwitchDefs[index1];
|
||||||
if (index2 != -1) break;
|
if (index2 != -1u) break;
|
||||||
}
|
}
|
||||||
if (mSwitchDefs[i]->PreTexture == def2->PreTexture)
|
if (mSwitchDefs[i]->PreTexture == def2->PreTexture)
|
||||||
{
|
{
|
||||||
index2 = i;
|
index2 = i;
|
||||||
sw2 = mSwitchDefs[index2];
|
sw2 = mSwitchDefs[index2];
|
||||||
if (index1 != -1) break;
|
if (index1 != -1u) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -610,6 +610,7 @@ dir_tree_t *add_dirs(char **argv)
|
||||||
{
|
{
|
||||||
// Skip hidden directories. (Prevents SVN bookkeeping
|
// Skip hidden directories. (Prevents SVN bookkeeping
|
||||||
// info from being included.)
|
// info from being included.)
|
||||||
|
// [BL] Also skip backup files.
|
||||||
fts_set(fts, ent, FTS_SKIP);
|
fts_set(fts, ent, FTS_SKIP);
|
||||||
}
|
}
|
||||||
if (ent->fts_info == FTS_D && ent->fts_level == 0)
|
if (ent->fts_info == FTS_D && ent->fts_level == 0)
|
||||||
|
@ -628,6 +629,11 @@ dir_tree_t *add_dirs(char **argv)
|
||||||
// We're only interested in remembering files.
|
// We're only interested in remembering files.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if(ent->fts_name[strlen(ent->fts_name)-1] == '~')
|
||||||
|
{
|
||||||
|
// Don't remember backup files.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
file = alloc_file_entry("", ent->fts_path, ent->fts_statp->st_mtime);
|
file = alloc_file_entry("", ent->fts_path, ent->fts_statp->st_mtime);
|
||||||
if (file == NULL)
|
if (file == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -736,6 +736,7 @@ OptionMenu "HUDOptions"
|
||||||
Option "Display nametags", "displaynametags", "DisplayTagsTypes"
|
Option "Display nametags", "displaynametags", "DisplayTagsTypes"
|
||||||
Option "Nametag color", "nametagcolor", "TextColors", "displaynametags"
|
Option "Nametag color", "nametagcolor", "TextColors", "displaynametags"
|
||||||
Option "Stretch status bar", "st_scale", "OnOff"
|
Option "Stretch status bar", "st_scale", "OnOff"
|
||||||
|
Option "Use old ouch mug shot formula", "st_oldouch", "OnOff"
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue