Knockback settings TBDC

This commit is contained in:
Grant Bagwell 2023-04-03 00:36:46 +02:00
parent cb52d310c1
commit 7175c872a9

View file

@ -35,6 +35,9 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
#include "wp_saber.h"
#include "Q3_Interface.h"
#include "../../code/qcommon/strippublic.h"
#include <JKXR/VrClientInfo.h>
#include <JKXR/VrTBDC.h>
extern cvar_t *g_TeamBeefDirectorsCut;
extern cvar_t *g_debugDamage;
extern qboolean stop_icarus;
@ -4992,7 +4995,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, vec3_
knockback = 0;
}
// figure momentum add, even if the damage won't be taken
if ( knockback && !(dflags&DAMAGE_DEATH_KNOCKBACK) ) //&& targ->client
if ( knockback && (!(dflags&DAMAGE_DEATH_KNOCKBACK) || g_TeamBeefDirectorsCut->value)) //&& targ->client
{
G_ApplyKnockback( targ, newDir, knockback );
G_CheckKnockdown( targ, attacker, newDir, dflags, mod );
@ -5349,6 +5352,10 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, vec3_
{//special case because this is shotgun-ish damage, we need to multiply the knockback
knockback *= 12;//*6 for 6 flechette shots
}
if(g_TeamBeefDirectorsCut->value)
{
knockback *= 2;
}
G_ApplyKnockback( targ, newDir, knockback );
}