Closed haekb closed 4 years ago
This was not caused by the frametime consolidation changes I've done.
Turns out to be some weird polymorphic stuff. It tries to dynamic_cast a different type (with the same base class).
Here's an example of the problem
class Base {
public:
Base() {};
virtual ~Base() {};
};
class T1 : Base {
public:
T1() {};
virtual ~T1() {};
};
class T2 : Base {
public:
T2() {};
virtual ~T2() {};
};
class THolder
{
public:
// TypeHolder will store our type as Type1!
// This is the major incompatibility with Visual C++ 6.0 vs everything else C++
THolder(void* pT)
{
m_pT = (T1*)pT;
}
T1* m_pT;
};
int main(int argc, char* argv[])
{
//class T1 : Base
//class T2 : Base
// Create our Type 2 class
T2* pT2 = new T2();
// Put T2 into our TypeHolder class
THolder* pHolder = new THolder((void*)pT);
// This fails on everything except for Visual C++ 6.0,
// however a C-style cast will work.
T2* pNewT = dynamic_cast<T2*>(pHolder->m_pT);
if (pNewT)
{
printf("Dynamic Cast worked!\n");
}
else
{
printf("Dynamic Cast failed: pNewT is null\n");
}
return 0;
}
The result is always Dynamic Cast failed: pNewT is null
.
Updated the example with a working visual c++ 6.0 vs failing everything else c++ hah.
To fix this I simply changed storing m_pInformationVolume
as an AIVolume type to the AIInformationVolume
type. As it's not used in any other context. I'm not sure why it was being stored as an AIVolume type...
On scene 3 planting a bug, a guard who's suppose to be "friendly" is hostile, making the mission impossible to complete!
It's the smoking guard seen here: https://youtu.be/PjLCAAjFKuM?t=39