Batfoxkid / Freak-Fortress-2-Rewrite

The gamemode that's now also a standalone boss maker.
https://forums.alliedmods.net/forumdisplay.php?f=154
GNU General Public License v3.0
17 stars 8 forks source link

Cleaner way to strip static attributes #15

Closed tsuza closed 2 years ago

tsuza commented 2 years ago

The previously introduced way of stripping static attributes worked without any particular hiccups. However, there were two issues.

This method, although it does add complexity since it's a detour ( this project already uses gamedata extensively so I don't think it's that much of a problem ), makes it so the weapon won't have the attributes server-side but the client will still retain them since you're detouring a local property before it gets networked to the client. By doing this, the client will keep the static attributes ( such as the offset attribute which is the most important one we want to retain ) but functionally the weapon won't have any attributes. It's basically like what we did way before with m_bOnlyIterateItemViewAttributes but in a proper way.

This method is something I've found on Alliedmodders in the snippet section a while ago. I was hesitant to add it at first since I didn't want to add the complexity of detours, but I guess it's fine.