Point_viewcontrol doesn't unfreeze the player

Grab your favourite IDE and tinker with the innards of game engines

Point_viewcontrol doesn't unfreeze the player

Postby GreenPepper on Mon Nov 07, 2016 1:16 pm

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.
User avatar
GreenPepper
Member
Member
 
Joined: Sun Jun 30, 2013 2:40 am
Location: Canada

Re: Point_viewcontrol doesn't unfreeze the player

Postby GreenPepper on Mon Nov 07, 2016 2:29 pm

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.
User avatar
GreenPepper
Member
Member
 
Joined: Sun Jun 30, 2013 2:40 am
Location: Canada

Re: Point_viewcontrol doesn't unfreeze the player

Postby Vicpop on Sat Nov 12, 2016 9:09 pm

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.
Vicpop
Been Here A While
Been Here A While
 
Joined: Mon Oct 15, 2007 3:03 am

Re: Point_viewcontrol doesn't unfreeze the player

Postby GreenPepper on Sun Nov 13, 2016 4:19 am

Thanks for checking out the code for me and providing a possible fix.
User avatar
GreenPepper
Member
Member
 
Joined: Sun Jun 30, 2013 2:40 am
Location: Canada

Return to Programming

Who is online

Users browsing this forum: No registered users