updated version of SV_instagib.qc to newest version.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
88dd8bff3c
commit
edd18cff26
1 changed files with 21 additions and 19 deletions
|
@ -16,6 +16,7 @@ bool autocvar_g_instagib_ammo_convert_cells;
|
|||
bool autocvar_g_instagib_ammo_convert_rockets;
|
||||
bool autocvar_g_instagib_ammo_convert_shells;
|
||||
bool autocvar_g_instagib_ammo_convert_bullets;
|
||||
bool autocvar_g_instagib_allow_jetpacks;
|
||||
|
||||
/// \brief Returns a random classname of the instagib item.
|
||||
/// \param[in] prefix Prefix of the cvars that hold probabilities.
|
||||
|
@ -212,20 +213,17 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, Damage_Calculate)
|
|||
|
||||
if(IS_PLAYER(frag_attacker) && DEATH_ISWEAPON(frag_deathtype, WEP_BLASTER))
|
||||
{
|
||||
if(frag_deathtype & HITTYPE_SECONDARY)
|
||||
if(!autocvar_g_instagib_blaster_keepdamage || frag_attacker == frag_target)
|
||||
{
|
||||
if(!autocvar_g_instagib_blaster_keepdamage || frag_attacker == frag_target)
|
||||
{
|
||||
frag_damage = 0;
|
||||
if(!autocvar_g_instagib_mirrordamage)
|
||||
frag_mirrordamage = 0; // never do mirror damage on enemies
|
||||
}
|
||||
frag_damage = 0;
|
||||
if(!autocvar_g_instagib_mirrordamage)
|
||||
frag_mirrordamage = 0; // never do mirror damage on enemies
|
||||
}
|
||||
|
||||
if(frag_target != frag_attacker)
|
||||
{
|
||||
if(!autocvar_g_instagib_blaster_keepforce)
|
||||
frag_force = '0 0 0';
|
||||
}
|
||||
if(frag_target != frag_attacker)
|
||||
{
|
||||
if(!autocvar_g_instagib_blaster_keepforce)
|
||||
frag_force = '0 0 0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -326,6 +324,8 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
|
|||
if(autocvar_g_powerups)
|
||||
instagib_replace_item_with_random_powerup(item);
|
||||
return true;
|
||||
case ITEM_Invisibility: case ITEM_ExtraLife: case ITEM_Speed:
|
||||
return false;
|
||||
case ITEM_Cells:
|
||||
if(autocvar_g_instagib_ammo_convert_cells)
|
||||
instagib_replace_item_with(item, ITEM_VaporizerCells);
|
||||
|
@ -342,6 +342,9 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
|
|||
if(autocvar_g_instagib_ammo_convert_bullets)
|
||||
instagib_replace_item_with(item, ITEM_VaporizerCells);
|
||||
return true;
|
||||
case ITEM_Jetpack:
|
||||
case ITEM_JetpackRegen:
|
||||
return !autocvar_g_instagib_allow_jetpacks;
|
||||
}
|
||||
|
||||
switch (item.weapon)
|
||||
|
@ -358,9 +361,6 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
|
|||
return true;
|
||||
}
|
||||
|
||||
if(item.itemdef.instanceOfPowerup)
|
||||
return false;
|
||||
|
||||
float cells = GetResource(item, RES_CELLS);
|
||||
if(cells > autocvar_g_instagib_ammo_drop && item.classname != "item_vaporizer_cells")
|
||||
SetResource(item, RES_CELLS, autocvar_g_instagib_ammo_drop);
|
||||
|
@ -374,11 +374,13 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
|
|||
MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDies)
|
||||
{
|
||||
float frag_deathtype = M_ARGV(3, float);
|
||||
entity attacker = M_ARGV(1, entity);
|
||||
|
||||
entity attacker = M_ARGV(1, entity);
|
||||
|
||||
if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER))
|
||||
M_ARGV(4, float) = 1000; // always gib if it was a vaporizer death
|
||||
.entity weaponentity = weaponentities[0];
|
||||
ATTACK_FINISHED(attacker, weaponentity) = time;
|
||||
.entity weaponentity = weaponentities[0];
|
||||
ATTACK_FINISHED(attacker, weaponentity) = time;
|
||||
}
|
||||
|
||||
MUTATOR_HOOKFUNCTION(mutator_instagib, ItemTouch)
|
||||
|
@ -431,4 +433,4 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, SetModname)
|
|||
{
|
||||
M_ARGV(0, string) = "InstaGib";
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue