Page 1 of 1

Point_viewcontrol doesn't unfreeze the player

PostPosted: Mon Nov 07, 2016 1:16 pm
by GreenPepper
After applying some of the following fixes for point_viewcontrol here:
https://developer.valvesoftware.com/wik ... iewcontrol

The camera stacking works, but now the camera in the bottom stack glitches out at the end, even when I have it triggering disables in proper order.

Just so you know what exactly I am talking about here:

Map VMF file (for trigger order):
https://github.com/Freedom4Gamers/Above ... c_test.vmf

Triggers.cpp (search for "athec" to find the modified lines):
https://github.com/Freedom4Gamers/Above ... iggers.cpp

If anyone could help find a solution for this, I would be very grateful as this is a major hurdle in a current cutscene I am working on.

Re: Point_viewcontrol doesn't unfreeze the player

PostPosted: Mon Nov 07, 2016 2:29 pm
by GreenPepper
Well after doing a few tests, I think it is better to just use carefully timed triggers and env_fades to transition point_viewcontrols - at least that method works; for now the "camera stacking" fix seems broken, at least when using multiple camera stacks.

Re: Point_viewcontrol doesn't unfreeze the player

PostPosted: Sat Nov 12, 2016 9:09 pm
by Vicpop
looking at the code there might be a bug when it's supposed to restore to the player:
Code: Select all
if (m_pPrevViewEntity == (CBasePlayer*)m_hPlayer.Get()) //If the previous viewentity is the player, reset everything properly

is comparing a CBaseEntity* to a CBasePlayer*, which i think might end up never being true... you might try replacing that line with this:

Code: Select all
if (m_pPrevViewEntity == (CBaseEntity*)m_hPlayer.Get()) //If the previous viewentity is the player, reset everything properly


i can't remember for sure if this distinction matters in c++ but might be worth a try

edit: also, i looked at your implementation, and the line you inserted around line 2960 should be at the setviewentity call around line 3085. looking at the code im not sure if it will make a difference.

Re: Point_viewcontrol doesn't unfreeze the player

PostPosted: Sun Nov 13, 2016 4:19 am
by GreenPepper
Thanks for checking out the code for me and providing a possible fix.