[L4D2]Spawn Infected couldn't find position 5 times.
2 Attachment(s)
i have do something like this.
PHP Code:
I guess that maybe check position before spawn is not perfect. Harry said that CreateFakeClient is too expensive, and usually late out in tick. I look up some .sp file about infected_bot_control, they use SDKCall(NextBotxxxxxxx) to spawn infectedbot, and use the return value of SDKCall to check whether it spawn correctly. But "z_spawn_old" cmd has no return value. I think DHook z_spawn_old(const CCommand *) , get and check the return value will help, but i don't know how to do this because it return a warning() func in failed and i don't know which type of return is appropriate. Can someone give a suggestion? |
Re: [L4D2]Spawn Infected couldn't find position 5 times.
Is this what you are trying to achieve?
"z_spawn_old charger auto" already spawn special infected in random position I'm really not sure what do you want to do :roll:, also there are multiple plugins that can spawn special infected PHP Code:
|
Re: [L4D2]Spawn Infected couldn't find position 5 times.
1 Attachment(s)
Sorry, i forget to post the full func.
PHP Code:
The problem is "Couldn't find a xxx spawn position in 5 tires"... This problem can't be fixed, so i want to hook this warning so that i can create a new timer to spawn it agian. If don't do this, the amount of SI will not equal to the convar setting beacause it actually not create in game but plugin thought it has been created... Create a repeat timer to check the count of SI seems not good and timely, i thought... Sorry for my english. |
Re: [L4D2]Spawn Infected couldn't find position 5 times.
好的,我想我大概知道怎麼做了
我在使用了一個全局 Arraylist 和一個全局計時器。 每3秒检查這個生成隊列 ok, maybe i know how to do it . i use a global Arraylisy and a global repeat-timer. PHP Code:
When spawn an infectedbot, it's type will be push in the arraylist whether it spawn successfully or not. PHP Code:
The type of infectebot in arraylist will be remove when it trigger player_spawn event, as it spawn successfully. PHP Code:
spawn too many infectedbot in once is not good, the timer will spawn one infectedbot and the type is the value in arraylist(0). PHP Code:
服務器sv 不會出現太大波動。 Now it seems good in my server. Infectedbot will respawn in order after it spawn failed. By setting 3 seconds timer, the infectedbot count will increase slowly when it can spawn. And my server sv don't change radically. |
Re: [L4D2]Spawn Infected couldn't find position 5 times.
So others can help you..
https://forums.alliedmods.net/misc.php?do=showrules Quote:
|
Re: [L4D2]Spawn Infected couldn't find position 5 times.
i forget it, sorry...
now add the translation. |
Re: [L4D2]Spawn Infected couldn't find position 5 times.
Did you do this directly in a plugin that controls the spawn of the infected? This is really good, the same thing happens to me, spawning 10 special infections in the same second makes the SV go up which causes a temporary lag.
|
Re: [L4D2]Spawn Infected couldn't find position 5 times.
Quote:
Since I use [L4D2] Balancer Spawn Infected which modifies the director instead of spawning SI directly, there's no way I can add a delay to the SI bots as suggested in other threads about a similar problem, so it constantly causes lag whenever it tried to spawn multiple SI at the same time. I already checked my Spawn hooks to see if anything's too expensive, but everything looks fine and most expensive calculations are being checked if the client is survivor anyway so it doesn't apply. Has anyone got any idea on where should I look to fix this? |
Re: [L4D2]Spawn Infected couldn't find position 5 times.
There is no fix, creating clients is taxing on the server and will create a spike, the only solution is to delay the spawning of each SI. You could probably use Left4DHooks forwards L4D_OnSpawnTank and L4D_OnSpawnSpecial then add the class/pos details to an array, block spawning and spawn those from the array after 1 frame or 0.1 seconds.
|
All times are GMT -4. The time now is 04:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.