Raised This Month: $7 Target: $400
 1% 

8 survivors in the rescue vehicle


Post New Thread Reply   
 
Thread Tools Display Modes
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 10-01-2020 , 11:28   Re: 8 survivors in the rescue vehicle
Reply With Quote #11

Yeah, the Last Stand update broke my plugin.
Pre-Last Stand, it was working fine. All I had to do was give the survivors godmode.

Now the plugin might need to be tweaked to spawn additional survivor positions.
__________________
ragdoll spam, that is all

Steam profile, where I game, obviously.
Youtube channel, where I do Stick Death Maze animations and some other stuff.
no plugin requests, sorry


My Plugins:
-search list-
Modified Plugins:
1 | 2 | 3 | 4
Shadowysn is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 10-08-2020 , 00:11   Re: 8 survivors in the rescue vehicle
Reply With Quote #12

Has anyone tried adding more info_survivor_position in other maps to see if this fixes it?

Edit: So I modified this plugin a bit;

Quote:
Originally Posted by Shadowysn View Post
A long time ago, I made a private plugin that attempts to prevent Survivors from dying or getting incapped when the rescue cutscene plays.
It even adds extra info_survivor_position entities to The Sacrifice finale, but only for 8 survivors.

Maybe in the future, it could be updated to visually hide the survivors via SetTransmit or teleport the rest to a survivor that's already set to a position.
I modified the check done for The Sacrifice finale, instead I check entities for a valid info_survivor_position entity, I store the position of the first one found, and then made the extra ones use that position instead of the hardcoded one in the plugin, so far testing with bots it seems to have worked?

Screenshot


In this same exact finale before with real players, we had the bug.

Edited Code


Please test with real players and let me know how it goes.
Attached Files
File Type: sp Get Plugin or Get Source (FinaleFinishGodmode.sp - 600 views - 4.7 KB)
__________________

Last edited by DeathChaos25; 10-08-2020 at 00:46.
DeathChaos25 is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 10-08-2020 , 01:13   Re: 8 survivors in the rescue vehicle
Reply With Quote #13

Here's a plugin I wrote a few days ago that supports both Left 4 Dead games and requires Left 4 DHooks. On every finale map, it looks for info_survivor_position entities and saves their coordinates in a simple array. Once the map starts, an X number of extra survivor positions are created (determined by l4d_esfp_amount [default is 4 for a total of 8 survivor positions]) while looping through the array for coordinates. So far, every survivor that stays alive after the rescue vehicle leaves count as "escaped" in the stats crawl.

Note #1: Death Toll finale doesn't seem to have any info_survivor_positions so survivors sometimes get left behind when the boat leaves and the stats crawl doesn't always count them as "escaped." To fix this, I hooked the trigger_finale's (and finale_trigger in some cases) "EscapeVehicleLeaving" entity output to warp all survivors back to the saferoom with godmode when no info_survivor_positions are found by the time they escape, and most of the time it counts towards them escaping.

The only downside to this is when a custom campaign may have the same feature as Dark Carnival's finale where clients stuck in the hallway under the bleachers when the finale starts will get kicked. Fortunately for Dark Carnival's finale, there are info_survivor_positions so the "warp all survivors back to the saferoom with godmode" feature never triggers for that finale.

Note #2: Apparently some finales create up to 12 info_survivor_positions but extra survivors are never warped to them. My guess is because some of them are flagged for different purposes, so the function that VALVe uses to warp survivors to info_survivor_position entities never use them. Thankfully, the ones that this plugin creates are detected to be used for extra survivors. That's why the convar l4d_esfp_amount is used to determine the number of extra survivor positions to create rather than simply counting the number of positions already present and comparing it to the number of survivors. If only it were that simple...



There's definitely a much better method out there but this is all I could come up with for now.
Attached Files
File Type: sp Get Plugin or Get Source (l4d_esfp.sp - 394 views - 7.2 KB)
__________________

Last edited by Psyk0tik; 11-12-2020 at 21:26. Reason: Updated the code.
Psyk0tik is offline
Sev
Veteran Member
Join Date: May 2010
Old 10-08-2020 , 09:47   Re: 8 survivors in the rescue vehicle
Reply With Quote #14

Quote:
Originally Posted by Crasher_3637 View Post
Here's a plugin I wrote a few days ago that supports both Left 4 Dead games and requires Left 4 DHooks. On every finale map, it looks for info_survivor_position entities and saves their coordinates in a simple array. Once the map starts, an X number of extra survivor positions are created (determined by l4d_esfp_amount [default is 4 for a total of 8 survivor positions]) while looping through the array for coordinates. So far, every survivor that stays alive after the rescue vehicle leaves count as "escaped" in the stats crawl.

Note #1: Death Toll finale doesn't seem to have any info_survivor_positions so survivors sometimes get left behind when the boat leaves and the stats crawl doesn't always count them as "escaped." To fix this, I hooked the trigger_finale's (and finale_trigger in some cases) "EscapeVehicleLeaving" entity output to warp all survivors back to the saferoom with godmode when no info_survivor_positions are found by the time they escape, and most of the time it counts towards them escaping.

The only downside to this is when a custom campaign may have the same feature as Dark Carnival's finale where clients stuck in the hallway under the bleachers when the finale starts will get kicked. Fortunately for Dark Carnival's finale, there are info_survivor_positions so the "warp all survivors back to the saferoom with godmode" feature never triggers for that finale.

Note #2: Apparently some finales create up to 12 info_survivor_positions but extra survivors are never warped to them. My guess is because some of them are flagged for different purposes, so the function that VALVe uses to warp survivors to info_survivor_position entities never use them. Thankfully, the ones that this plugin creates are detected to be used for extra survivors. That's why the convar l4d_esfp_amount is used to determine the number of extra survivor positions to create rather than simply counting the number of positions already present and comparing it to the number of survivors. If only it were that simple...



There's definitely a much better method out there but this is all I could come up with for now.
Still getting the random deaths even with this loaded.

Examples

Last Stand - 4 bots (l4d1 crew) and me as a l4d2 survivor, the escape happens and it counts me as dead.

Blood Harvest - Same scenario as above, except it counted one of the bots as dead when the rescue vehicle left.
Sev is offline
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 10-08-2020 , 09:57   Re: 8 survivors in the rescue vehicle
Reply With Quote #15

Quote:
Originally Posted by Sev View Post
Still getting the random deaths even with this loaded.

Examples

Last Stand - 4 bots (l4d1 crew) and me as a l4d2 survivor, the escape happens and it counts me as dead.

Blood Harvest - Same scenario as above, except it counted one of the bots as dead when the rescue vehicle left.
It's most likely because m_takedamage 0 does not prevent incaps from happening if the damage is higher than the survivor's health.
That's why I had to set the survivors to the maximum amount of allowed incaps a.k.a. Black And White mode so the incapacitation checks don't get called.

PHP Code:
public void FinaleHook(const char[] outputint callerint activatorfloat delay)
{
    if (
caller MaxClients && IsValidEntity(caller))
    {
        for (
int iSurvivor 1iSurvivor <= MaxClientsiSurvivor++)
        {
            if (
bIsSurvivor(iSurvivor))
            {
                
//PrintToServer("Gave %N godmode.", iSurvivor);
                //LogMessage("Gave %N godmode.", iSurvivor);

                
SetEntProp(iSurvivorProp_Data"m_takedamage"01); // This doesn't prevent incaps

                
if (FindEntityByClassname(-1"info_survivor_position") == -1)
                {
                    
//PrintToServer("Teleported %N back to saferoom: %.2f %.2f %.2f", iSurvivor, g_flSaferoomPosition[iSurvivor][0], g_flSaferoomPosition[iSurvivor][1], g_flSaferoomPosition[iSurvivor][2]);
                    //LogMessage("Teleported %N back to saferoom: %.2f %.2f %.2f", iSurvivor, g_flSaferoomPosition[iSurvivor][0], g_flSaferoomPosition[iSurvivor][1], g_flSaferoomPosition[iSurvivor][2]);

                    
TeleportEntity(iSurvivorg_flSaferoomPosition[iSurvivor], NULL_VECTORNULL_VECTOR);
                }
            }
        }
    }

__________________
ragdoll spam, that is all

Steam profile, where I game, obviously.
Youtube channel, where I do Stick Death Maze animations and some other stuff.
no plugin requests, sorry


My Plugins:
-search list-
Modified Plugins:
1 | 2 | 3 | 4

Last edited by Shadowysn; 10-08-2020 at 09:59.
Shadowysn is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 10-08-2020 , 10:15   Re: 8 survivors in the rescue vehicle
Reply With Quote #16

Thanks for the information and feedback guys. I'll make the necessary changes and update my post with a new version.

EDIT: Updated.
__________________

Last edited by Psyk0tik; 10-08-2020 at 11:40.
Psyk0tik is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 10-09-2020 , 16:18   Re: 8 survivors in the rescue vehicle
Reply With Quote #17

Quote:
Originally Posted by Crasher_3637 View Post
Thanks for the information and feedback guys. I'll make the necessary changes and update my post with a new version.

EDIT: Updated.
So far it seems to work in base game campaigns, however we did Military Industrial Complex II V11 custom campaign and the bug happened there.
__________________
DeathChaos25 is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 10-10-2020 , 17:55   Re: 8 survivors in the rescue vehicle
Reply With Quote #18

Quote:
Originally Posted by DeathChaos25 View Post
So far it seems to work in base game campaigns, however we did Military Industrial Complex II V11 custom campaign and the bug happened there.
Can you verify if that campaign's finale has any info_survivor_position entities spawned in or if the teleportation failsafe isn't working? Have you tested the finale more than once; is it consistent or random? I'm not sure what requirements it has for counting extra survivors as "escaped." That's the tricky part about custom campaigns; they don't always follow standard VALVe procedure so not all plugins that seem compatible with the official campaigns are guaranteed to work fine on them.
__________________
Psyk0tik is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 10-10-2020 , 19:13   Re: 8 survivors in the rescue vehicle
Reply With Quote #19

Would spawning the missing "info_survivor_position" as required for number of clients work to fix the issue?

Once this issue is fixed someone should release as a plugin so it's noticed more and a standard version. This thread like many older unsupported plugins become confusing with so many different versions posted and people using different ones, it becomes a mess of knowing which one to use etc. Then people start modifying from different versions and we end up with 2 new versions based on completely different older versions, where 1 fixes X bugs and the other fixes Y bugs but both fail to fix XY bugs together. Seen this with several older popular plugins from inactive authors.
__________________
Silvers is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 10-10-2020 , 19:36   Re: 8 survivors in the rescue vehicle
Reply With Quote #20

Quote:
Originally Posted by Silvers View Post
Would spawning the missing "info_survivor_position" as required for number of clients work to fix the issue?

Once this issue is fixed someone should release as a plugin so it's noticed more and a standard version. This thread like many older unsupported plugins become confusing with so many different versions posted and people using different ones, it becomes a mess of knowing which one to use etc. Then people start modifying from different versions and we end up with 2 new versions based on completely different older versions, where 1 fixes X bugs and the other fixes Y bugs but both fail to fix XY bugs together. Seen this with several older popular plugins from inactive authors.
Honestly, I'm unsure. If only the function that VALVe uses to spawn X info_survivor_position entities could be patched to modify how many it spawns. The way I've done it is dirty and isn't guaranteed to work on every finale map, but if we could directly access the function that creates these entities and tell it to spawn X numbers of positions, it should work on any finale map.
__________________
Psyk0tik 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 23:10.


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