AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2]Zombie Spawn Fix (https://forums.alliedmods.net/showthread.php?t=333351)

sorallll 07-06-2021 08:59

[L4D2]Zombie Spawn Fix
 
16 Attachment(s)
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


HarryPotter 07-07-2021 00:37

Re: [L4D2]Transition Zombie Spawn Fix
 
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?

fdxx 07-07-2021 01:32

Re: [L4D2]Transition Zombie Spawn Fix
 
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.

sorallll 07-08-2021 06:46

Re: [L4D2]Transition Zombie Spawn Fix
 
Quote:

Originally Posted by HarryPotter (Post 2752071)
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)

Silvers 07-08-2021 07:57

Re: [L4D2]Transition Zombie Spawn Fix
 
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*

Dragokas 07-08-2021 11:43

Re: [L4D2]Transition Zombie Spawn Fix
 
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.

HarryPotter 07-09-2021 11:45

Re: [L4D2]Transition Zombie Spawn Fix
 
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


Psyk0tik 07-09-2021 12:40

Re: [L4D2]Transition Zombie Spawn Fix
 
1 Attachment(s)
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.

sorallll 07-09-2021 13:08

Re: [L4D2]Transition Zombie Spawn Fix
 
Thanks Crasher_3637!
Update windows signature.

HarryPotter 07-09-2021 13:40

Re: [L4D2]Transition Zombie Spawn Fix
 
Quote:

Originally Posted by Crasher_3637 (Post 2752347)
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


All times are GMT -4. The time now is 15:28.

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