mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-29 07:21:49 +00:00
Knockback settings TBDC
This commit is contained in:
parent
cb52d310c1
commit
7175c872a9
1 changed files with 8 additions and 1 deletions
|
@ -35,6 +35,9 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "wp_saber.h"
|
#include "wp_saber.h"
|
||||||
#include "Q3_Interface.h"
|
#include "Q3_Interface.h"
|
||||||
#include "../../code/qcommon/strippublic.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 cvar_t *g_debugDamage;
|
||||||
extern qboolean stop_icarus;
|
extern qboolean stop_icarus;
|
||||||
|
@ -4992,7 +4995,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, vec3_
|
||||||
knockback = 0;
|
knockback = 0;
|
||||||
}
|
}
|
||||||
// figure momentum add, even if the damage won't be taken
|
// 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_ApplyKnockback( targ, newDir, knockback );
|
||||||
G_CheckKnockdown( targ, attacker, newDir, dflags, mod );
|
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
|
{//special case because this is shotgun-ish damage, we need to multiply the knockback
|
||||||
knockback *= 12;//*6 for 6 flechette shots
|
knockback *= 12;//*6 for 6 flechette shots
|
||||||
}
|
}
|
||||||
|
if(g_TeamBeefDirectorsCut->value)
|
||||||
|
{
|
||||||
|
knockback *= 2;
|
||||||
|
}
|
||||||
G_ApplyKnockback( targ, newDir, knockback );
|
G_ApplyKnockback( targ, newDir, knockback );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue