Raised This Month: $12 Target: $400
 3% 

[TF2] Dropped weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 08-16-2015 , 06:51   Re: [TF2] Dropped weapons
Reply With Quote #21

Quote:
Originally Posted by Pelipoika View Post
It shouldn't be
That's what I'm noticing too. I'll clean it up more and attach the full source later today.
Potato Uno is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 08-17-2015 , 04:33   Re: [TF2] Dropped weapons
Reply With Quote #22

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.
__________________
Benoist3012 is offline
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
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 08-20-2015 , 23:51   Re: [TF2] Dropped weapons
Reply With Quote #24

Hey psychonic I think the gamedata needs a new update since the server is complaining about unable to initialize those calls. Can you get a new version? Thanks!
Potato Uno is offline
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 08-21-2015 , 09:55   Re: [TF2] Dropped weapons
Reply With Quote #25

Quote:
Originally Posted by Potato Uno View Post
Hey psychonic I think the gamedata needs a new update since the server is complaining about unable to initialize those calls. Can you get a new version? Thanks!
You can get some of the gamedata from here: https://github.com/akowald/StopThatT...edata/tank.txt
__________________
Pelipoika is offline
kickman7
Junior Member
Join Date: Jul 2017
Old 11-17-2017 , 17:53   Re: [TF2] Dropped weapons
Reply With Quote #26

Quote:
Originally Posted by psychonic View Post
I did some messing around with the new "dropped" weapons in TF2, and figured I'd share my findings.

Test plugin attached with gamedata. Creating a dropped weapon works fine with zero quirks. (Everything is initialized properly). And picking any dropped weapon entity works as well. You do still have to manually remove/unequip weapons when "dropping" them (else, you're just creating a copy).

glhf
Are there any commands?
kickman7 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode