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_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.
@ -212,20 +213,17 @@ 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) frag_damage = 0;
{ if(!autocvar_g_instagib_mirrordamage)
frag_damage = 0; frag_mirrordamage = 0; // never do mirror damage on enemies
if(!autocvar_g_instagib_mirrordamage) }
frag_mirrordamage = 0; // never do mirror damage on enemies
}
if(frag_target != frag_attacker) if(frag_target != frag_attacker)
{ {
if(!autocvar_g_instagib_blaster_keepforce) if(!autocvar_g_instagib_blaster_keepforce)
frag_force = '0 0 0'; frag_force = '0 0 0';
}
} }
} }
} }
@ -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,11 +374,14 @@ 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];
ATTACK_FINISHED(attacker, weaponentity) = time; .entity weaponentity = weaponentities[0];
ATTACK_FINISHED(attacker, weaponentity) = time;
} }
MUTATOR_HOOKFUNCTION(mutator_instagib, ItemTouch) MUTATOR_HOOKFUNCTION(mutator_instagib, ItemTouch)