Raised This Month: $ Target: $400
 0% 

Unblocking buying defuser on other maps than de_ prefix


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JabLuszko
Junior Member
Join Date: Aug 2011
Old 12-20-2015 , 18:22   Unblocking buying defuser on other maps than de_ prefix
Reply With Quote #1

Hello!

How can you unblock buying defuser on maps with other prefix than de_? Looks like it is somehow locked to map prefix, not to func_bomb_target/info_bomb_target. For being sure I checked GameRules and both m_bMapHasBombZone and m_bMapHasBombTarget are set to true.

Reproduce:
Rename de_dust2.bsp to xxx_dust2.bsp, start game on it and as CT you won't be able to buy a defuser.

Disc:
Yes, I know I can rename map to de_, but I would like stick to original name.
Yes, I know that there are plugins for "say /defuser", but this is not an answer for me.
Also giving everyone defuser on roundstart is not an option
JabLuszko is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-21-2015 , 09:41   Re: Unblocking buying defuser on other maps than de_ prefix
Reply With Quote #2

I have tested and it's pretty strange.

In BuyItem you can see such check for defuser:
PHP Code:
case MENU_SLOT_ITEM_DEFUSEKIT:
{
    if (
pPlayer->m_iTeam != CT || !g_pGameRules->m_bMapHasBombTarget)
    {
        return;
    } 
It seems that the item is locked from another place on map prefix. For example, if you rename a cs_ map to de_ defuser is available in the menu but nothing happens if you buy it(unless you spawn a func_bomb_target entity to make m_bMapHasBombTarget offset true).

Unfortunately I was not able to understand from where the item is locked on map prefix.
__________________

Last edited by HamletEagle; 12-21-2015 at 09:41.
HamletEagle is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-21-2015 , 11:03   Re: Unblocking buying defuser on other maps than de_ prefix
Reply With Quote #3

This is a client-side thing because you are testing with VGUI menu, it checks against current level name. It doesn't happen with old menu where item is well buyable depending bomb entities.
__________________

Last edited by Arkshine; 12-21-2015 at 11:06.
Arkshine is offline
JabLuszko
Junior Member
Join Date: Aug 2011
Old 12-21-2015 , 14:27   Re: Unblocking buying defuser on other maps than de_ prefix
Reply With Quote #4

Just checked with old menu and it works there. Why Valve can't use the same code in both menus?:<
Looks like map name change is the only way.

Thanks Arkshine and HamletEagle!

Last edited by JabLuszko; 12-21-2015 at 14:30.
JabLuszko 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 18:07.


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