Skip to content

Items fixes and refactoring

bones_was_here requested to merge bones_was_here/svqc_itemfixes into master

instagib: optimise item replacement

powerups: fix #2857 (closed) and move g_powerups cvar out of server/items/items.qc

This sets ITEM_FLAG_NORMAL initially and adds ITEM_FLAG_MUTATORBLOCKED about as late as possible: must be done after mapinfo settemps are applied, see b95beb26 and before StartItem() calls have_pickup_item().

Moves a little more powerup-specific code out of common code.

Removes some default powerup balance settings which don't need to be in QC.

Clarifies var naming inside powerup m_iteminit() funcs.

items: call FilterItem mutator hook earlier as it may change almost anything

such as the pickup sound (new toys).

Documents what FilterItem may and may not do.

Allows mutators to override the pickup model, consistent with being able to override the sound.

Reduces code duplication.

items: clean up some more unnecessary locals in StartItem()

items: warn instead of crashing if spawned with no pickup sound set

Fixes null ptr deref when starting map dfwc2017-6, which was made easy to trigger by 5606e703

items: merge _StartItem() and StartItem(), warn instead of crashing if defaultrespawntime not set

Null ptr deref is a pain to debug.

Edited by bones_was_here

Merge request reports