Added Check for files in CI
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Phil 2024-10-06 12:17:18 +02:00
commit 44f5b8a6e1
Signed by: Phil
GPG key ID: 350C8B7C4EF5DED4

View file

@ -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.
@ -211,8 +212,6 @@ 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)
{
@ -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(IS_PLAYER(frag_attacker))
@ -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,9 +374,12 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDies)
{
float frag_deathtype = M_ARGV(3, float);
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;
}