View Full Version : [Weapon respawning] not all keyvalues are copied over

01-06-2016, 04:31 AM
When weapons respawn, they copy over some keyvalues, but not all. Targetnames for instance are not copied over.

One way to fix this would be to update CBasePlayerWeapon::Respawn to copy them all over, but there's a better way: extract the entity definition from the bsp file, store it, then instance it again when needed. The only drawback here is that any changes made after it spawns won't be carried over. That's a tough thing to do in any case though, since you'd have to manually copy it over in either case. The latter solution, combined with copying anything that could change (that's still a lot, but not everything) would cover the important stuff.