X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ft_items.qc;h=7ecbd58e9c7c2481b776018524c471b85e17e089;hb=717defe5e02506bb5c857025d71fb605d6eb8c55;hp=e1d9d583bfbec7c42e13a557dbc2b0642fa56d51;hpb=a2c814deeb0ca978455f96c11992c75a4d87d707;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index e1d9d583b..7ecbd58e9 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -505,7 +505,7 @@ void Item_RespawnCountdown(entity this) { do { { - entity wi = Weapons_from(this.weapon); + entity wi = REGISTRY_GET(Weapons, this.weapon); if (wi != WEP_Null) { entity wp = WaypointSprite_Spawn(WP_Weapon, 0, 0, this, '0 0 64', NULL, 0, this, waypointsprite_attached, true, RADARICON_Weapon); wp.wp_extra = wi.m_id; @@ -853,7 +853,7 @@ bool Item_GiveTo(entity item, entity player) { .entity weaponentity = weaponentities[slot]; if(player.(weaponentity).m_weapon != WEP_Null || slot == 0) - W_SwitchWeapon_Force(player, Weapons_from(item.weapon), weaponentity); + W_SwitchWeapon_Force(player, REGISTRY_GET(Weapons, item.weapon), weaponentity); } return true; } @@ -1200,7 +1200,7 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default } if(weaponid) - STAT(WEAPONS, this) = WepSet_FromWeapon(Weapons_from(weaponid)); + STAT(WEAPONS, this) = WepSet_FromWeapon(REGISTRY_GET(Weapons, weaponid)); this.flags = FL_ITEM | itemflags; IL_PUSH(g_items, this); @@ -1304,7 +1304,7 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default this.is_item = true; } - weaponsInMap |= WepSet_FromWeapon(Weapons_from(weaponid)); + weaponsInMap |= WepSet_FromWeapon(REGISTRY_GET(Weapons, weaponid)); if ( def.instanceOfPowerup || def.instanceOfWeaponPickup @@ -1588,7 +1588,7 @@ spawnfunc(target_items) float GiveWeapon(entity e, float wpn, float op, float val) { WepSet v0, v1; - WepSet s = WepSet_FromWeapon(Weapons_from(wpn)); + WepSet s = WepSet_FromWeapon(REGISTRY_GET(Weapons, wpn)); v0 = (STAT(WEAPONS, e) & s); switch(op) {