Raised This Month: $ Target: $400
 0% 

[EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown


Post New Thread Reply   
 
Thread Tools Display Modes
Rick Grimes
Junior Member
Join Date: Jun 2013
Old 07-29-2013 , 06:26   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #551

I think I need to keep downtown though to be able to have promod to work correctly like I used to run on my server
Rick Grimes is offline
Rick Grimes
Junior Member
Join Date: Jun 2013
Old 07-29-2013 , 06:28   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #552

I dont have any plugin called l4dscores.smx and my server still just doesnt want to start at all
Rick Grimes is offline
dcx2
Senior Member
Join Date: Sep 2011
Old 07-29-2013 , 09:25   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #553

Quote:
Originally Posted by Rick Grimes View Post
I dont have any plugin called l4dscores.smx and my server still just doesnt want to start at all
Your crashes are not Left4Downtown2's fault. They're some plugin you have that hasn't been updated. It's not the same one causing Silver's crashes - it must be some OTHER plugin. It's up to *you* to figure out which one.

Remove ALL plugins from plugins folder. Launch server. It should not crash. Add one plugin back, and type "sm plugins refresh" into the server console. It will cause that plugin to be loaded. If it crashes, that's your bad plugin. If it does not crash, add another plugin back, and "sm plugins refresh" again. Repeat this process until you find which plugin is broken, and then go complain in that plugin's thread that it's broken.
__________________
dcx2 is offline
Martijn79
Member
Join Date: Jan 2013
Old 07-29-2013 , 09:39   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #554

Quote:
Originally Posted by V1SoR View Post
For slots, L4DToolz is a superior choice from nearly all possible perspectives. The only downside there is to it compared to downtown is that it increments the number of extensions you're running by 1.

I strongly recommend switching to it.
I agree with you 100% however, l4dtoolz is causing issues with a lot of custom campaigns. Server crashes occur a lot with the error ED_ALLOC: No Free Edicts.

If I use downtown for slots and disable toolz that problem disappears for some reason (although it seems not like both have any influence on that error message).

Besides that, I have to run downtown anyway for a lot of plugins.
Martijn79 is offline
Martijn79
Member
Join Date: Jan 2013
Old 07-29-2013 , 10:13   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #555

Btw the latest github gamedata breaks the extension for linux

Code:
L 07/29/2013 - 09:10:46: [SM] Unable to load extension "left4downtown.ext": /home/l4duser4/left4dead2/left4dead2/addons/sourcemod/extensions/left4downtown.ext.2.l4d2.so: undefined symbol: _ZN7Detours15UseHealingItems17OnUseHealingItemsEP11SurvivorBotP17ActionSurvivorBot
Martijn79 is offline
dcx2
Senior Member
Join Date: Sep 2011
Old 07-29-2013 , 10:40   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #556

Uh..what? I don't understand. Unless you compiled it from source in the last two days or so, you shouldn't have that detour. And as far as I know, adding a signature that isn't used to the gamedata shouldn't cause the extension to fail to load. I mean, missing signatures don't cause it to fail.

And that signature looks weird too. The Linux signature for UseHealingItems is _ZN11SurvivorBot15UseHealingItemsEP6ActionIS_ E

But thanks for pointing this out, I realized I have my FindScavengeItem signature wrong for Linux. I don't have a Linux server so I can't test this stuff, which is why I didn't announce that I had updated the source...

EDIT: I fixed FindScavengeItem for Linux. But I still don't understand why your console is mentioning that detour. For what it's worth, the detour works fine on my Windows server. And I know that signature is good. And besides, when sigs are bad, the extension still loads, and it even tells you what sigs failed to load. So I'm very confused...if you totally remove the sig from your gamedata, what happens? Also I'm confused when you say "git hub", do you mean the google code repository?

EDIT2: Hmm...I did have to add two new cpp/h files for the detours UseHealingItems and FindScavengeItem. For Windows, I added them to the vcproj. But I bet for Linux I have to add them to the makefile, or they won't get built. And if the makefile never builds them, then the linker won't find the obj files, and you'll get a missing symbol...
__________________

Last edited by dcx2; 07-29-2013 at 10:51.
dcx2 is offline
Martijn79
Member
Join Date: Jan 2013
Old 07-29-2013 , 10:54   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #557

Yeah I'm sorry about that I didn't mention that I compiled it from the latest code on the Google code page ;)
Martijn79 is offline
dcx2
Senior Member
Join Date: Sep 2011
Old 07-29-2013 , 10:58   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #558

Forgive my nooby-ness, and thank you for telling me about the troubles with Linux. I have added my forwards to the makefile and committed the change. I also fixed the FindScavengeItem signature. If you would, please update everything and recompile and let me know if it works now.

Also, check out the .inc to see the two new forwards, if you're into that kinda thing.

EDIT:

L4D2_OnUseHealingItems is called when the bot is deciding if and who needs healed. The forward is sent out before the bots decides who to heal, so it cannot (yet?) tell you what action the bot wants to take (heal self, heal other, take pills/shot, give pills/shot). But it can be used to prevent a bot from even thinking about using healing items by returning Plugin_Handled.

L4D2_OnFindScavengeItem is called when a bot is deciding if and what to pick up. The forward is sent out after the bot has decided what to pick up, so item will contain the entity index of the item the bot wants to go grab. If the bot didn't find a weapon it wants to grab, item will be 0. If you don't want them grabbing that item (e.g. Coach has a magnum and he's trying to scavenge a weapon_pistol_spawn), you can return Plugin_Handled and the bot won't even think about grabbing the item. I *think* you can change item to be another entity index and return Plugin_Changed to make the bot go grab some other item but have not yet tested this yet so be prepared for a crash if you try Plugin_Changed...but I'm reasonably sure I figured out how to convert the entity index back into a pointer.

Notably, these forwards are called quite often - any time the bot is thinking about what to do. Contrary to popular opinion, bots do think a lot. If you want to use the forwards, I suggest PrintToChatAll the SourcePawn args and see how often and what's being called and when etc to see how you should use these new forwards. Notably, you could probably use L4D2_OnFindScavengeItem with Plugin_Changed to force bots to pick up any item you want, since it is typically called with item=0 because the bot already has all the items it wants. This will probably also work for items bots ignore, since this is called after they make their decision.

PHP Code:
/**
 * @brief Called when SurvivorBot::UseHealingItems(Action<SurvivorBot> *) is invoked
 * @remarks Causes bots to use or give healing items (except in safe room on non-expert)
 *
 * @param client    the client that will decide whether to use healing items
 *
 * @noreturn Pl_Handled to block, Pl_Continue otherwise.
 */
forward Action:L4D2_OnUseHealingItems(client);

/**
 * @brief Called after SurvivorBot::FindScavengeItem(Action<SurvivorBot> *) is invoked
 * @remarks Indicates which item the Survivor Bot will attempt to pick up
 *
 * @param client    the client that will try to pick something up
 * @param item        the item the client will try to pick up (null means no item)
 *
 * @noreturn Pl_Handled to block, Pl_Continue otherwise.
 */
forward Action:L4D2_OnFindScavengeItem(client, &item); 
__________________

Last edited by dcx2; 07-29-2013 at 11:56.
dcx2 is offline
Martijn79
Member
Join Date: Jan 2013
Old 07-29-2013 , 10:59   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #559

Great I can see you updated it I'll test it out and let you know, thanks.
Martijn79 is offline
Martijn79
Member
Join Date: Jan 2013
Old 07-29-2013 , 11:05   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #560

I can confirm it works now.

Here's a working linux binary (no playerslots version) compiled against latest SM 1.5/MM 1.9 for who needs it.

Thanks for the quick fix now all that's left is working player slots
Attached Files
File Type: so left4downtown.ext.2.l4d2.so (339.4 KB, 181 views)

Last edited by Martijn79; 07-29-2013 at 11:15.
Martijn79 is offline
Reply



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 17:01.


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