View Single Post
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 08-17-2015 , 09:32   Re: [TF2] Dropped weapons
Reply With Quote #23

Quote:
Originally Posted by Benoist3012 View Post
Well if you really want to know if this gamedata can spawn dropped weapon on mvm if you set
GameRules_SetProp("m_bPlayingMannVsMachine", view_as<int>false);//I know 0 work too

Why not try to create the entity dropped weapon with a plugin first, and enable again mvm and see if the weapon isn't deleted when mvm is turned on.
Oh it works perfectly fine, just as good as pvp does it. What I suspected (and looks like I was correct for) is that the CTFDroppedWeapon::Create function likely has an internal check that terminates the function if the game mode is MvM (some boolean like: bool IsMvM). By changing m_bPlayingMannVsMachine that check was broken, so dropped weapons work fine. Once they spawn they stay on the map until the dropped weapons timer expires. And flipping off m_bPlayingMannVsMachine, running CTFDroppedWeapon::Create, and then turning back on m_bPlayingMannVsMachine also did the trick without any ill side effects.

The only noticeable issue is the upgrades station firing post_inventory_application when an upgrade is bought (this is to fix the upgrades exploit with dropped weapons). Since the server's internal attributes table has no record of the player upgrading that weapon, that one might be a lost cause unless if I use tf2attributes to do something hacky (I'll have to check later).

Today is my first day of class so when I'm done with all of its hassles and if I don't forget, I'll post the mvm version of dropped weapons for everyone else to use.

Last edited by Potato Uno; 08-17-2015 at 10:25. Reason: Corrected some misinformation
Potato Uno is offline