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

[L4D2]Zombie Spawn Fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author
sorallll
Senior Member
Join Date: Oct 2018
Plugin ID:
7711
Plugin Version:
1.0.9
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Fixed Special Inected and Player Zombie spawning failures in some cases
    Old 07-06-2021 , 08:59   [L4D2]Zombie Spawn Fix
    Reply With Quote #1

    Sorry, my English is no good

    About:
    Requirements:
    MemoryPatch(Enable on demand)
    • ZombieManager::CanZombieSpawnHere::IsInTransi tionCondition - Spawn failure during transition
    • CTerrorPlayer::OnPreThinkGhostState::IsInTran sitionCondition - Player Zombie during transition cannot respawn from ghost state
    • CTerrorPlayer::OnPreThinkGhostState::SpawnDis abledCondition - Player Zombie fails to respawn with director_no_specials set to 1
    • ZombieManager::AccumulateSpawnAreaCollection: :EnforceFinaleNavSpawnRulesCondition - Spawn failure during trigger radio in ending map

    Thanks:
    • HarryPotter - Report error.

    Optional:
    Changes:
    Code:
    1.0.9 (28-Apr-2022)
    - Fixed CTerrorPlayer::OnPreThinkGhostState::IsInTransitionCondition patch not being applied correctly on Windows
    
    1.0.8 (28-Mar-2022)
    - Fix bugs in last update
    
    1.0.7 (27-Mar-2022)
    - A better way to patch memory
    - Thanks to nosoop's answer about jump instructions in memory patching
    
    1.0.6 (25-Mar-2022)
    - Skip invalid patches instead of pause plugin
    
    1.0.5 (21-Mar-2022)
    - Name change to 'Zombie Spawn Fix'
    - Change to memory patch method
    Attached Files
    File Type: sp Get Plugin or Get Source (zombie_spawn_fix.sp - 672 views - 1.5 KB)
    File Type: txt zombie_spawn_fix.txt (3.3 KB, 723 views)

    Last edited by sorallll; 04-27-2022 at 13:30.
    sorallll is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 07-07-2021 , 00:37   Re: [L4D2]Transition Zombie Spawn Fix
    Reply With Quote #2

    so if I install this plugin, server can always spawn infected successfully with using z_spawn_old/ZombieManager::GetRandomPZSpawnPosition ?

    or it just prevent the error spam?
    __________________

    Last edited by HarryPotter; 07-07-2021 at 00:37.
    HarryPotter is offline
    fdxx
    Member
    Join Date: Oct 2020
    Location: 0xdeadbeef
    Old 07-07-2021 , 01:32   Re: [L4D2]Transition Zombie Spawn Fix
    Reply With Quote #3

    Maybe fixed this problem:

    After the map (level) is changed, if there are still players loading, SI will not be spawn on new map. (could not find a XX spawn position in 5 tries).

    Some players use old computers, and it may take decades to complete the loading. At this time, Speedrunner has reached the end saferoom without SI spawn.

    Last edited by fdxx; 07-07-2021 at 01:57.
    fdxx is offline
    sorallll
    Senior Member
    Join Date: Oct 2018
    Old 07-08-2021 , 06:46   Re: [L4D2]Transition Zombie Spawn Fix
    Reply With Quote #4

    Quote:
    Originally Posted by HarryPotter View Post
    so if I install this plugin, server can always spawn infected successfully with using z_spawn_old/ZombieManager::GetRandomPZSpawnPosition ?

    or it just prevent the error spam?
    Able to solve the position finding failure caused by the player transition
    ZombieManager::GetRandomPZSpawnPosition(Zombi eClassType,int,CTerrorPlayer *,Vector *)->ZombieManager::CanZombieSpawnHere(int, int, CNavArea *, int, int, int)->CDirector::IsInTransition(void)

    Last edited by sorallll; 07-08-2021 at 06:51.
    sorallll is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 07-08-2021 , 07:57   Re: [L4D2]Transition Zombie Spawn Fix
    Reply With Quote #5

    I have a plugin to patch the number of tries from 5 to whatever you like.. Maybe I should release that, although I don't think it's helpful in all situations such as this, but it might help others *shrug*
    __________________
    Silvers is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 07-08-2021 , 11:43   Re: [L4D2]Transition Zombie Spawn Fix
    Reply With Quote #6

    I think the absolutely different solution should be applied to this*bug*, like detouring and help engine to make its work, - after 5 not successful attempts try to find a position with own manual vector calculation.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 07-09-2021 , 11:45   Re: [L4D2]Transition Zombie Spawn Fix
    Reply With Quote #7

    broken
    PHP Code:
    L 07/09/2021 23:44:58: [SMException reportedFailed to load signatureCDirector::IsInTransition
    L 07
    /09/2021 23:44:58: [SMBlamingtransitionzombiespawnfix.smx
    L 07
    /09/2021 23:44:58: [SMCall stack trace:
    L 07/09/2021 23:44:58: [SM]   [0SetFailState
    L 07
    /09/2021 23:44:58: [SM]   [1Line 59transitionzombiespawnfix.sp::vSetupDetours
    L 07
    /09/2021 23:44:58: [SM]   [2Line 40transitionzombiespawnfix.sp::vLoadGameData
    L 07
    /09/2021 23:44:58: [SM]   [3Line 21transitionzombiespawnfix.sp::OnPluginStart
    L 07
    /09/2021 23:44:58: [SMUnable to load plugin "transitionzombiespawnfix.smx"Error detected in plugin startup (see error logs
    __________________
    HarryPotter is offline
    Psyk0tik
    Veteran Member
    Join Date: May 2012
    Location: Homeless
    Old 07-09-2021 , 12:40   Re: [L4D2]Transition Zombie Spawn Fix
    Reply With Quote #8

    Here are the new signatures:
    PHP Code:
    "Signatures"
    {
        
    /* ZombieManager::CanZombieSpawnHere(int, int, CNavArea *, int, int, int) */
        
    "ZombieManager::CanZombieSpawnHere"
        
    {
            
    "library"    "server"
            "linux"        "@_ZNK13ZombieManager18CanZombieSpawnHereERK6VectorP13TerrorNavArea15ZombieClassTypebP20CBaseCombatCharacter"
            "windows"    "\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\xA1\x2A\x2A\x2A\x2A\x33\x2A\x89\x2A\x2A\x8B\x2A\x2A\x8B\x0D\x2A\x2A\x2A\x2A\x53\x8B\x2A\x2A\x56\x8B\x2A\x2A\x57"
            
    /* ? ? ? ? ? ? ? ? ? A1 ? ? ? ? 33 ? 89 ? ? 8B ? ? 8B 0D ? ? ? ? 53 8B ? ? 56 8B ? ? 57 */
        
    }
        
    /* CDirector::IsInTransition(void) */
        
    "CDirector::IsInTransition"
        
    {
            
    "library"    "server"
            "linux"        "@_ZNK9CDirector14IsInTransitionEv"
            "windows"    "\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x75\x2A\x80\xB9\xCC"
            
    /* ? ? ? ? ? ? ? 75 ? 80 B9 CC */
        
    }

    The signature for "CDirector::IsInTransition" was already broken even before yesterday's game update because the original signature skipped 2 bytes. The new signatures I provided above were created with the old binaries and they still work with the new ones, so they are pretty durable.
    Attached Files
    File Type: txt transitionzombiespawnfix.txt (1.3 KB, 229 views)
    __________________
    Psyk0tik is offline
    sorallll
    Senior Member
    Join Date: Oct 2018
    Old 07-09-2021 , 13:08   Re: [L4D2]Transition Zombie Spawn Fix
    Reply With Quote #9

    Thanks Crasher_3637!
    Update windows signature.
    sorallll is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 07-09-2021 , 13:40   Re: [L4D2]Transition Zombie Spawn Fix
    Reply With Quote #10

    Quote:
    Originally Posted by Crasher_3637 View Post
    Here are the new signatures:
    I take my word back !
    server crashed when every time I use z_spawn_old/ZombieManager::GetRandomPZSpawnPosition to spawn S.I.

    PHP Code:
    [DHOOKSFATALFailed to find return address of original function. Check the arguments and return type of your detour setup
    using 2.2.0-detours17
    __________________

    Last edited by HarryPotter; 07-09-2021 at 13:47.
    HarryPotter 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 03:06.


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