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

[L4D & L4D2] Left 4 DHooks Direct (1.146) [21-Apr-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
ReCreator
Member
Join Date: Nov 2017
Location: Ukraine,Kyiv
Old 04-16-2024 , 06:44   Re: [L4D & L4D2] Left 4 DHooks Direct (1.145) [03-Apr-2024]
Reply With Quote #1101

Quote:
Originally Posted by HarryPotter View Post
Check if entity is valid first in BmsGlobalShit.sp
Spoiler

This code, with fine checks, throw the same error
__________________
Sorry for my pure English...

Last edited by ReCreator; 04-16-2024 at 06:46.
ReCreator is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-16-2024 , 09:42   Re: [L4D & L4D2] Left 4 DHooks Direct (1.145) [03-Apr-2024]
Reply With Quote #1102

Looks like the dissolver entity is not being created. Will add a check for that.
__________________
Silvers is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-21-2024 , 11:53   Re: [L4D & L4D2] Left 4 DHooks Direct (1.146) [21-Apr-2024]
Reply With Quote #1103

Code:
1.146 (21-Apr-2024)
    - Fixed a memory leak. Thanks to "HarryPotter" for reporting.
    - Fixed native "L4D_WriteMemoryString" buffer length. Thanks to "HarryPotter" for reporting.
    - Changed natives "L4D_Dissolve" and "L4D_TankRockPrj" to return -1 if the entity failed to be created. Thanks to "ReCreator" for reporting.

    - Updated: Plugin.
    - Updated: "/scripting/include/left4dhooks.inc" include file.
    - Updated: "/scripting/l4dd/l4dd_natives.sp" project file.
__________________
Silvers is offline
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 04-22-2024 , 10:21   Re: [L4D & L4D2] Left 4 DHooks Direct (1.146) [21-Apr-2024]
Reply With Quote #1104

Hi @Silvers!

This is very low priority but please consider in some future release marking L4D_IsMissionFinalMap AND L4D_IsFirstMapInScenario as TRUE for one-map campaigns like Tank Challenge and Tanks Playground.

Thanks!
__________________
Mystik Spiral is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-22-2024 , 14:55   Re: [L4D & L4D2] Left 4 DHooks Direct (1.146) [21-Apr-2024]
Reply With Quote #1105

Quote:
Originally Posted by Mystik Spiral View Post
Hi @Silvers!

This is very low priority but please consider in some future release marking L4D_IsMissionFinalMap AND L4D_IsFirstMapInScenario as TRUE for one-map campaigns like Tank Challenge and Tanks Playground.

Thanks!
Left4DHooks is calling the games natives, if they return false for those maps, that's how the game considers it.. adding something specific for those maps (e.g. detecting the map name and returning true) just seems hackish. I don't know, will think about it.
__________________
Silvers is offline
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 04-22-2024 , 21:30   Re: [L4D & L4D2] Left 4 DHooks Direct (1.146) [21-Apr-2024]
Reply With Quote #1106

Totally understand and no worries! Until then, I have the hack in my code, similar to:

Code:
static char sMapName[64];
GetCurrentMap(sMapName, sizeof(sMapName));
if (L4D_IsMissionFinalMap() || strncmp(sMapName, "l4d2_tank", 9) == 0)
{
    DoStuff;
}
__________________

Last edited by Mystik Spiral; 04-22-2024 at 21:30.
Mystik Spiral is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old Today , 05:08   Re: [L4D & L4D2] Left 4 DHooks Direct (1.146) [21-Apr-2024]
Reply With Quote #1107

Quote:
Originally Posted by Mystik Spiral View Post
Totally understand and no worries! Until then, I have the hack in my code, similar to:

Code:
static char sMapName[64];
GetCurrentMap(sMapName, sizeof(sMapName));
if (L4D_IsMissionFinalMap() || strncmp(sMapName, "l4d2_tank", 9) == 0)
{
    DoStuff;
}
Try
PHP Code:
L4D_IsMissionFinalMap(true
PHP Code:
/**
 * @brief Tells if the Mission (map) is the final map of the campaign
 *
 * @param anyMap    True to return true if any map is a finale, not just the last map of a campaign (useful for campaigns that have multiple finale maps)
 *
 * @return            true if the map is the last map of the campaign (finale)
 */
native bool L4D_IsMissionFinalMap(bool anyMap false); 
__________________
HarryPotter 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:19.


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