Skip to content

Commit

Permalink
Update Xonotic
Browse files Browse the repository at this point in the history
  • Loading branch information
LegendaryGuard committed Jul 14, 2023
1 parent 596a8d1 commit f0522db
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mod/common/weapons/flak.qc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MUTATOR_HOOKFUNCTION(flak_rockets, FilterItem)
{
entity item = M_ARGV(0, entity);

if((STAT(WEAPONS, item) & WepSet_FromWeapon(WEP_FLAK)) && !GetResource(item, RES_ROCKETS) && !Item_IsLoot(item))
if((STAT(WEAPONS, item) & WepSet_FromWeapon(WEP_FLAK)) && !GetResource(item, RES_ROCKETS) && !ITEM_IS_LOOT(item))
SetResource(item, RES_ROCKETS, cvar("g_pickup_rockets_weapon"));
}

Expand Down
4 changes: 2 additions & 2 deletions mod/server/mutators/akimbo.qc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ MUTATOR_HOOKFUNCTION(akimbo, ItemTouch)
entity item = M_ARGV(0, entity);
entity player = M_ARGV(1, entity);

if((Item_IsLoot(item) || autocvar_g_akimbo_atspawns) && item.weapon &&
if((ITEM_IS_LOOT(item) || autocvar_g_akimbo_atspawns) && item.weapon &&
(STAT(WEAPONS, player) & item.itemdef.m_weapon.m_wepset) && item.owner != player && !(item.itemdef.m_weapon.spawnflags & WEP_FLAG_NODUAL))
PS(player).dual_weapons |= item.itemdef.m_weapon.m_wepset; // dual it up!
}
Expand All @@ -22,6 +22,6 @@ MUTATOR_HOOKFUNCTION(akimbo, FilterItem)
{
entity item = M_ARGV(0, entity);

if((Item_IsLoot(item) || autocvar_g_akimbo_atspawns) && item.weapon && item.owner && IS_PLAYER(item.owner))
if((ITEM_IS_LOOT(item) || autocvar_g_akimbo_atspawns) && item.weapon && item.owner && IS_PLAYER(item.owner))
PS(item.owner).dual_weapons &= ~item.itemdef.m_weapon.m_wepset; // no longer akimbo'd (we don't check blacklist here, no need)
}
6 changes: 3 additions & 3 deletions mod/server/mutators/piggyback.qc
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void pb_FixPBEnt(entity p)

bool pb_GiveItem(entity to, entity item)
{
if (Item_IsExpiring(item))
if (ITEM_IS_EXPIRING(item))
{
item.strength_finished = max(0, item.strength_finished - time);
item.invincible_finished = max(0, item.invincible_finished - time);
Expand All @@ -144,7 +144,7 @@ bool pb_GiveItem(entity to, entity item)
bool gave = (it && it.instanceOfPickup) ? ITEM_HANDLE(Pickup, it, item, to) : Item_GiveTo(item, to);
if (!gave)
{
if (Item_IsExpiring(item))
if (ITEM_IS_EXPIRING(item))
{
// undo what we did above
item.strength_finished += time;
Expand All @@ -156,7 +156,7 @@ bool pb_GiveItem(entity to, entity item)
return false;
}

if (Item_IsExpiring(item))
if (ITEM_IS_EXPIRING(item))
{
// undo it anyway
item.strength_finished += time;
Expand Down
2 changes: 1 addition & 1 deletion xonotic
Submodule xonotic updated from c2c161 to 623d1f

0 comments on commit f0522db

Please sign in to comment.