Skip to content

Add a more optimised and generic function to initialise items (loot or permanent)

bones_was_here requested to merge bones_was_here/items_svqc into master

It's faster when an itemdef is provided, which avoids a classname search. It's cleaner to read and more efficient to set the various entity fields rather than passing them all as args when the entity they're for is being passed anyway.

Fixes monster loot sending no updates to CSQC and lacking despawn effects.

Optimises various code paths that spawn items, especially powerups where both searches are eliminated, and excepting the random items mutator which has heaps of classname-based code.

Removes the less optimised code paths. There were too many different ways to do the same thing.

Edited by bones_was_here

Merge request reports