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_rockets;
|
||||||
bool autocvar_g_instagib_ammo_convert_shells;
|
bool autocvar_g_instagib_ammo_convert_shells;
|
||||||
bool autocvar_g_instagib_ammo_convert_bullets;
|
bool autocvar_g_instagib_ammo_convert_bullets;
|
||||||
|
bool autocvar_g_instagib_allow_jetpacks;
|
||||||
|
|
||||||
/// \brief Returns a random classname of the instagib item.
|
/// \brief Returns a random classname of the instagib item.
|
||||||
/// \param[in] prefix Prefix of the cvars that hold probabilities.
|
/// \param[in] prefix Prefix of the cvars that hold probabilities.
|
||||||
|
@ -211,8 +212,6 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, Damage_Calculate)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(IS_PLAYER(frag_attacker) && DEATH_ISWEAPON(frag_deathtype, WEP_BLASTER))
|
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)
|
||||||
{
|
{
|
||||||
|
@ -228,7 +227,6 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, Damage_Calculate)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(!autocvar_g_instagib_mirrordamage) // only apply the taking lives hack if we don't want to support real damage mirroring
|
if(!autocvar_g_instagib_mirrordamage) // only apply the taking lives hack if we don't want to support real damage mirroring
|
||||||
if(IS_PLAYER(frag_attacker))
|
if(IS_PLAYER(frag_attacker))
|
||||||
|
@ -326,6 +324,8 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
|
||||||
if(autocvar_g_powerups)
|
if(autocvar_g_powerups)
|
||||||
instagib_replace_item_with_random_powerup(item);
|
instagib_replace_item_with_random_powerup(item);
|
||||||
return true;
|
return true;
|
||||||
|
case ITEM_Invisibility: case ITEM_ExtraLife: case ITEM_Speed:
|
||||||
|
return false;
|
||||||
case ITEM_Cells:
|
case ITEM_Cells:
|
||||||
if(autocvar_g_instagib_ammo_convert_cells)
|
if(autocvar_g_instagib_ammo_convert_cells)
|
||||||
instagib_replace_item_with(item, ITEM_VaporizerCells);
|
instagib_replace_item_with(item, ITEM_VaporizerCells);
|
||||||
|
@ -342,6 +342,9 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
|
||||||
if(autocvar_g_instagib_ammo_convert_bullets)
|
if(autocvar_g_instagib_ammo_convert_bullets)
|
||||||
instagib_replace_item_with(item, ITEM_VaporizerCells);
|
instagib_replace_item_with(item, ITEM_VaporizerCells);
|
||||||
return true;
|
return true;
|
||||||
|
case ITEM_Jetpack:
|
||||||
|
case ITEM_JetpackRegen:
|
||||||
|
return !autocvar_g_instagib_allow_jetpacks;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (item.weapon)
|
switch (item.weapon)
|
||||||
|
@ -358,9 +361,6 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(item.itemdef.instanceOfPowerup)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
float cells = GetResource(item, RES_CELLS);
|
float cells = GetResource(item, RES_CELLS);
|
||||||
if(cells > autocvar_g_instagib_ammo_drop && item.classname != "item_vaporizer_cells")
|
if(cells > autocvar_g_instagib_ammo_drop && item.classname != "item_vaporizer_cells")
|
||||||
SetResource(item, RES_CELLS, autocvar_g_instagib_ammo_drop);
|
SetResource(item, RES_CELLS, autocvar_g_instagib_ammo_drop);
|
||||||
|
@ -374,7 +374,9 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
|
||||||
MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDies)
|
MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDies)
|
||||||
{
|
{
|
||||||
float frag_deathtype = M_ARGV(3, float);
|
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))
|
if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER))
|
||||||
M_ARGV(4, float) = 1000; // always gib if it was a vaporizer death
|
M_ARGV(4, float) = 1000; // always gib if it was a vaporizer death
|
||||||
.entity weaponentity = weaponentities[0];
|
.entity weaponentity = weaponentities[0];
|
||||||
|
|
Loading…
Reference in a new issue