diff --git a/src/g_level.h b/src/g_level.h index cf5d1865dd..03fa70dcdd 100644 --- a/src/g_level.h +++ b/src/g_level.h @@ -497,6 +497,7 @@ enum EFSkillProperty // floating point properties SKILLP_Aggressiveness, SKILLP_MonsterHealth, SKILLP_FriendlyHealth, + SKILLP_KickbackFactor, }; int G_SkillProperty(ESkillProperty prop); @@ -514,6 +515,7 @@ struct FSkillInfo double DamageFactor; double ArmorFactor; double HealthFactor; + double KickbackFactor; bool FastMonsters; bool SlowMonsters; diff --git a/src/g_skill.cpp b/src/g_skill.cpp index d158fa4cdd..1bf80bb42d 100644 --- a/src/g_skill.cpp +++ b/src/g_skill.cpp @@ -66,6 +66,7 @@ void FMapInfoParser::ParseSkill () skill.DamageFactor = 1.; skill.ArmorFactor = 1.; skill.HealthFactor = 1.; + skill.KickbackFactor = 1.; skill.FastMonsters = false; skill.SlowMonsters = false; skill.DisableCheats = false; @@ -118,6 +119,12 @@ void FMapInfoParser::ParseSkill () sc.MustGetFloat (); skill.DamageFactor = sc.Float; } + else if (sc.Compare("kickbackfactor")) + { + ParseAssign(); + sc.MustGetFloat(); + skill.KickbackFactor = sc.Float; + } else if (sc.Compare ("fastmonsters")) { skill.FastMonsters = true; @@ -436,6 +443,9 @@ double G_SkillProperty(EFSkillProperty prop) case SKILLP_FriendlyHealth: return AllSkills[gameskill].FriendlyHealth; + case SKILLP_KickbackFactor: + return AllSkills[gameskill].KickbackFactor; + } } return 0; diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index c13024fcf8..7699fe376d 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1212,6 +1212,7 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da else kickback = source->player->ReadyWeapon->Kickback; + kickback = int(kickback * G_SkillProperty(SKILLP_KickbackFactor)); if (kickback) { AActor *origin = (source && (flags & DMG_INFLICTOR_IS_PUFF))? source : inflictor;