Merge commit '38df0665e3' into scripting
Conflicts: src/d_dehacked.cpp src/decallib.cpp src/g_hexen/a_clericstaff.cpp src/p_interaction.cpp src/p_local.h src/thingdef/thingdef_codeptr.cpp wadsrc/static/actors/constants.txt wadsrc/static/actors/shared/inventory.txt
This commit is contained in:
commit
fbaab5044d
50 changed files with 2432 additions and 2093 deletions
|
|
@ -83,6 +83,8 @@ void FMapInfoParser::ParseSkill ()
|
|||
skill.FriendlyHealth = FRACUNIT;
|
||||
skill.NoPain = false;
|
||||
skill.ArmorFactor = FRACUNIT;
|
||||
skill.Infighting = 0;
|
||||
skill.HealthFactor = FRACUNIT;
|
||||
|
||||
sc.MustGetString();
|
||||
skill.Name = sc.String;
|
||||
|
|
@ -266,6 +268,20 @@ void FMapInfoParser::ParseSkill ()
|
|||
sc.MustGetFloat();
|
||||
skill.ArmorFactor = FLOAT2FIXED(sc.Float);
|
||||
}
|
||||
else if (sc.Compare("HealthFactor"))
|
||||
{
|
||||
ParseAssign();
|
||||
sc.MustGetFloat();
|
||||
skill.HealthFactor = FLOAT2FIXED(sc.Float);
|
||||
}
|
||||
else if (sc.Compare("NoInfighting"))
|
||||
{
|
||||
skill.Infighting = LEVEL2_NOINFIGHTING;
|
||||
}
|
||||
else if (sc.Compare("TotalInfighting"))
|
||||
{
|
||||
skill.Infighting = LEVEL2_TOTALINFIGHTING;
|
||||
}
|
||||
else if (sc.Compare("DefaultSkill"))
|
||||
{
|
||||
if (DefaultSkill >= 0)
|
||||
|
|
@ -384,6 +400,17 @@ int G_SkillProperty(ESkillProperty prop)
|
|||
|
||||
case SKILLP_ArmorFactor:
|
||||
return AllSkills[gameskill].ArmorFactor;
|
||||
|
||||
case SKILLP_HealthFactor:
|
||||
return AllSkills[gameskill].HealthFactor;
|
||||
|
||||
case SKILLP_Infight:
|
||||
// This property also needs to consider the level flags for the same info.
|
||||
if (level.flags2 & LEVEL2_TOTALINFIGHTING) return 1;
|
||||
if (level.flags2 & LEVEL2_NOINFIGHTING) return -1;
|
||||
if (AllSkills[gameskill].Infighting == LEVEL2_TOTALINFIGHTING) return 1;
|
||||
if (AllSkills[gameskill].Infighting == LEVEL2_NOINFIGHTING) return -1;
|
||||
return infighting;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -463,7 +490,9 @@ FSkillInfo &FSkillInfo::operator=(const FSkillInfo &other)
|
|||
MonsterHealth = other.MonsterHealth;
|
||||
FriendlyHealth = other.FriendlyHealth;
|
||||
NoPain = other.NoPain;
|
||||
Infighting = other.Infighting;
|
||||
ArmorFactor = other.ArmorFactor;
|
||||
HealthFactor = other.HealthFactor;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue