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

[L4D2][req/paid] Round end infected posing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
philipjfry
Junior Member
Join Date: Sep 2019
Location: Somewhere in europe
Old 09-18-2019 , 13:17   [L4D2][req/paid] Round end infected posing
Reply With Quote #1

hi, looking for someone to write a plugin which basically allows admins to spawn some amount of "prop_dynamic_override" entities ( to client origin/angles prob for better posing or aim) with any wanted special infected "model", and "DefaultAnim" for a specific animation if possible and saves these to a cfg file kv. Once enough models are placed it should spawn the 'camera' another entity that the client's view will be forced at ( SetClientViewEntity() ) when the round ends.
sm_spawnmodel <hunter> <def anim optional>

Can pay about 10$ if thats fair.

- only works in survival

keyvalue example?
Spoiler
philipjfry is offline
dustinandband
Senior Member
Join Date: May 2015
Old 09-19-2019 , 01:35   Re: [L4D2][req/paid] Round end infected posing
Reply With Quote #2

To clarify what he's talking about -

There's a server that switches your view automatically at the end of a survival round - to some special infected prompts. This only serves the purpose of making sure that when a player takes a screenshot of their survival time - they're not using any unlegit SI skins (bright skins, neon skins, etc) which would disqualify their record.

Demonstration:
https://youtu.be/xFsuhVVb96o

I got as far as figuring out how to spawn the SI entities

Spoiler


I didn't think it was worth the time to code the entire plugin with the survival community being so small these days and all.

The most time consuming part of making the plugin would me making a helper menu (need to spawn yourself as an SI to properly capture your 'm_nSequence') and the KV file (maybe a database would be preferred).

I think the simplest way to do this would be to spawn all the models at once and have the survivor camera positions angled so it only captures one area the SI prompts are spawned in (so they don't overlap).

Last edited by dustinandband; 09-20-2019 at 01:07. Reason: updated function and edited some info
dustinandband is offline
dustinandband
Senior Member
Join Date: May 2015
Old 11-11-2019 , 00:19   Re: [L4D2][req/paid] Round end infected posing
Reply With Quote #3

We did end up writing the plugin but there's one issue with spectators - their camera gets stuck in walls sometimes (this only happens to spectators and not survivors). This only happens after the camera scene (not 100% of the time) and there's no way to unstuck except to either join the survivor team, or reconnect. Example: https://youtu.be/wOJ6y4lAHEs

As a workaround we made it so the point_viewcontrol_multiplayer (camera) entity gets disabled right before the round resets: https://github.com/graviti666/l4d2-s...Posing.sp#L403
From the video, you can tell there's a brief moment where the camera goes into third-shoulder spectate mode before going back to the survivor's POV: https://youtu.be/fwW9s1H9g68

The original author we're copying seems to have not needed this, you can tell in his server it goes straight from the camera to the survivor's first person view: https://youtu.be/llAIsqJiwJ4

Just learned today that spectators can still get stuck in walls with our work-around, and I don't want to disable the camera entity any sooner than I already am. The example server ('ohm server example' video) doesn't disable the camera entity early either - so I'm wondering if anyone has suggestions for any workarounds at this point? I'd rather the camera go straight back to the survivor's POV (without that little third-person shoulder spectate moment) like the third video link example shows.

Kind of hard to test this cause it only happens once in a blue moon and I've already spent one day trying to debug the issue before. Unfortuantely there's barely any code snippets on google that contain "point_viewcontrol_multiplayer" so i was hoping one of you had a suggestion.


(Side note that I already tried manually teleporting any spectators once the round restarts but even that doesn't work: https://youtu.be/0M6vlQ-HGug )
dustinandband is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-11-2019 , 04:29   Re: [L4D2][req/paid] Round end infected posing
Reply With Quote #4

What do you mean about getting stuck in walls? They are not able to move or just has the view spawn bug?

One of the possibilities is that the spectator is being teleported to the "0, 0, 0" position, which depending on the map can be "inside wall".

Maybe what you can do is to use the "SetTransmit" method and don't send the camera entity to spec players
__________________
Marttt is offline
dustinandband
Senior Member
Join Date: May 2015
Old 11-11-2019 , 15:13   Re: [L4D2][req/paid] Round end infected posing
Reply With Quote #5

Quote:
Originally Posted by Marttt View Post
What do you mean about getting stuck in walls? They are not able to move or just has the view spawn bug?

One of the possibilities is that the spectator is being teleported to the "0, 0, 0" position, which depending on the map can be "inside wall".

Maybe what you can do is to use the "SetTransmit" method and don't send the camera entity to spec players
yeah - they're unable to move once they're spawned inside the walls

the "Hook_SetTransmit" hook isn't picking up point_viewcontrol_multiplayer entity. I verified that it gets picked up with "OnEntityCreated" though
Spoiler


I did find out there's 5 additional point_viewcontrol_multiplayer entities that get called when the round's in the process of resetting. Though I don't think I got their location vectors correctly (probably cause I'm using the wrong classname when calling FindSendPropInfo()). But anyway it's an interesting thing to note. Maybe these interfere with the one that was just created beforehand?
Spoiler

Last edited by dustinandband; 11-11-2019 at 15:15. Reason: clarification
dustinandband is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-12-2019 , 11:13   Re: [L4D2][req/paid] Round end infected posing
Reply With Quote #6

I did some tests with the source code you provided (awesome) and I wasn't getting stuck while being spec.
Maybe is another plugin that is causing this issue? Try to test with a clean SM install. (aka removing the other plugins, except the default ones).
Also I had to comment the time check, because it wasn't firing the camera event. (still shows twice, is better to check that with a bool value maybe)
__________________

Last edited by Marttt; 11-12-2019 at 11:13.
Marttt is offline
dustinandband
Senior Member
Join Date: May 2015
Old 11-13-2019 , 01:27   Re: [L4D2][req/paid] Round end infected posing
Reply With Quote #7

My test server is completely vanilla with minimal plugins / extensions installed.

The only cvars I'm using at the moment are these to keep the server from shutting down when I go to spectate and there's no other human survivors.
Though on another server I had the same issue happen and I didn't have any of these cvars enabled:
Spoiler


Plugins / extensions:
(unloaded top 10 survival leaderboard tracker, SlayBots, & Classic survival loader for another test and still got the bug)
Spoiler


Some other examples recorded just today:
https://youtu.be/TEgXq8j-XRM

using this test plugin in the video. In most of the clips on that YouTube link I'm already on team spectate:
Spoiler


Sorry for all the bumps but it's important to me that this plugin actually works.
I'm out of ideas on how to debug the issue further and have already tried hacky stuff like teleporting spectators shortly after "rout_start" gets called which didn't work.

edit:
Issue appears to only occur on linux servers. The "ohm's server example" video and Martt both used windows and they couldn't reproduce the issue. ohm looked at the source code for his plugin and said his method of dispatching the "point_viewcontrol_multiplayer" entity was exactly the same and he doesn't use any special methods of disabling it beforhand (just lets it kill itself when the round resets).

Last edited by dustinandband; 11-14-2019 at 14:47.
dustinandband 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 00:58.


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