Try compiling it as RELEASE build. Also do have same errors when in FINAL build.
Printable View
i have compiled on released and final build without errors, but on logs say this skipped not defined server object obj_VehicleSpawn
Whats happened&? Friends? I am download apex 1 2 3 and copy C:\WarZ\src\External\Apex
I found APEX ENABLED and set 1
Build Solution- 1 error!Quote:
#ifdef FINAL_BUILD
#define APEX_ENABLED 1
#define VEHICLES_ENABLED 1
#else
Please Friends) Help me))Quote:
eft of '->setSkipOcclusionCheck' must point to class/struct/union/generic type c:\WarZ\src\GameEngine\gameobjects\obj_Apex.cpp
if someone wants to try, compile the Studio.exe (only work on Studio), enter "Physix Editor" when you're inside after you press F8 and F12, to drive are the arrows
I think to add missing files in the server project
http://www.youtube.com/watch?v=D1gsukq6fDk
your far far away... think of it as you would a gun in how a gun is updated and working same thing :)..
i can show you the helicopter on deadz but still not pure 100% more dev item till later..
in vehiclemanger.cpp
find:
put:Code:PxInitVehicleSDK(*g_pPhysicsWorld->PhysXSDK);
find:Code:surfaceTypePairs = PxVehicleDrivableSurfaceToTireFrictionPairs::allocate(MAX_NUM_TYRE_TYPES,MAX_NUM_SURFACE_TYPES);
const PxMaterial *mats[] = {g_pPhysicsWorld->defaultMaterial};
surfaceTypePairs->setup(MAX_NUM_TYRE_TYPES, MAX_NUM_SURFACE_TYPES, mats, &drivableSurfaceType);
put:Code:vd->vehicle->setup(g_pPhysicsWorld->PhysXSDK, vehActor, *wheelsData, driveData, std::max<int>(vd->numWheels - 4, 0));
this will fix your wheels and your object staying on the surface..Code:vd->vehicle->setWheelShapeMapping(0, 4 - 4);
vd->vehicle->setWheelShapeMapping(1, 5 - 4);
vd->vehicle->setWheelShapeMapping(2, 6 - 4);
vd->vehicle->setWheelShapeMapping(3, 7 - 4);
now yes, i replace this:
to thisCode:vd->vehicle->setup(g_pPhysicsWorld->PhysXSDK, vehActor, *wheelsData, driveData, std::max<int>(vd->numWheels - 4, 0));
vd->vehicle->setWheelShapeMapping(0, 4 - 4);
vd->vehicle->setWheelShapeMapping(1, 5 - 4);
vd->vehicle->setWheelShapeMapping(2, 6 - 4);
vd->vehicle->setWheelShapeMapping(3, 7 - 4);
http://img593.imageshack.us/img593/1458/rd6l.pngCode:if (m->FileName == "data/objectsdepot/vehicles/drivable_stryker.sco") {
vd->vehicle->setup(g_pPhysicsWorld->PhysXSDK, vehActor, *wheelsData, driveData, std::max<int>(vd->numWheels, 0));
vd->vehicle->setWheelShapeMapping(0, 0);
vd->vehicle->setWheelShapeMapping(1, 1);
vd->vehicle->setWheelShapeMapping(2, 2);
vd->vehicle->setWheelShapeMapping(3, 3);
vd->vehicle->setWheelShapeMapping(4, 4);
vd->vehicle->setWheelShapeMapping(5, 5);
vd->vehicle->setWheelShapeMapping(6, 6);
vd->vehicle->setWheelShapeMapping(7, 7);
}
else {
vd->vehicle->setup(g_pPhysicsWorld->PhysXSDK, vehActor, *wheelsData, driveData, std::max<int>(vd->numWheels-4, 0));
vd->vehicle->setWheelShapeMapping(0, 0);
vd->vehicle->setWheelShapeMapping(1, 1);
vd->vehicle->setWheelShapeMapping(2, 2);
vd->vehicle->setWheelShapeMapping(3, 3);
}
http://www.youtube.com/watch?v=X2pkHhN_wAI&feature=youtu.be
sexy as hell.
still alot to do to bring it to the serve side and your missing alot of stuff inside some files i should frap my Air C130 Gunship or the tank..
http://i40.tinypic.com/103aq01.png
and that tank??? :O
you've gotten it to work 100% of cars?
yes.. only 2 bugs tho..
if 2 people are inside one vehicle they can both control it and player to player update between both objects to show that the player is using the object..
and you could not share the code to make it work 100%? :/:
Fix camera when Spawn car
Search on HUD_TPSGame.cpp
replace with thisCode:wasDrivenByPlayer = true;
http://www.youtube.com/watch?v=8PNEN5t63Zw&feature=youtu.beCode:if(Keyboard->WasPressed(kbsE))
wasDrivenByPlayer = true;
To fix crashing when exiting vehicle (maybe this has already been said?)
in HUD_TPSGame.cpp
Before
AfterCode:// vehicles if(InputMappingMngr->wasPressed(r3dInputMappingMngr::KS_INTERACT) )
{
#if VEHICLES_ENABLED
obj_Vehicle* target_Vehicle = pl->canEnterVehicle();
if( pl->isInVehicle() ) {
pl->exitVehicle();
}
else if ( target_Vehicle ) // now we're going to try to use vehicles (otherwise UAV characters can't use vehicles).
{
pl->enterVehicle( target_Vehicle );
}
#endif
}
Code:// vehicles
if(InputMappingMngr->wasPressed(r3dInputMappingMngr::KS_INTERACT) )
{
#if VEHICLES_ENABLED
if( pl->isInVehicle() )
{
pl->exitVehicle();
}
else
{
obj_Vehicle* target_Vehicle = pl->canEnterVehicle();
if ( target_Vehicle ) // now we're going to try to use vehicles (otherwise UAV characters can't use vehicles).
pl->enterVehicle( target_Vehicle );
}
#endif
}
in AI_Player.cpp
Before
AfterCode:void obj_Player::exitVehicle()
{
// first let's look for a good location
obj_Vehicle* currentCar = g_pPhysicsWorld->m_VehicleManager->getRealDrivenVehicle();
r3d_assert(currentCar);
r3dVector rotationVector = currentCar->GetRotationVector();
r3dMatrix Matrix;
// NOTE: We might want to take out rotation in the x or z direction and only focus on the Y direction...
r3dBuildRotationMatrix(Matrix, rotationVector );
bool success = false;
for ( int exitIndex = 0; exitIndex < 4; exitIndex++ )
{
r3dVector exitPosition;
bool returnValue = currentCar->getExitSpace( exitPosition, exitIndex );
r3d_assert( returnValue );
exitPosition *= Matrix;
r3dVector targetPosition = currentCar->GetPosition() + exitPosition;
if ( TestExitPosition( targetPosition) )
{
TeleportPlayer( targetPosition, "Exiting vehicle");
success = true;
break;
}
}
Code:void obj_Player::exitVehicle()
{
// first let's look for a good location
obj_Vehicle* currentCar = g_pPhysicsWorld->m_VehicleManager->getRealDrivenVehicle();
r3d_assert(currentCar);
r3dVector rotationVector = currentCar->GetRotationVector();
r3dMatrix Matrix;
// NOTE: We might want to take out rotation in the x or z direction and only focus on the Y direction...
r3dBuildRotationMatrix(Matrix, rotationVector );
bool success = false;
for ( int exitIndex = 0; exitIndex < 4; exitIndex++ )
{
r3dVector exitPosition;
bool returnValue = currentCar->getExitSpace( exitPosition, exitIndex );
// r3d_assert( returnValue );
if( !returnValue )
continue;
exitPosition *= Matrix;
r3dVector targetPosition = currentCar->GetPosition() + exitPosition;
if ( TestExitPosition( targetPosition) )
{
TeleportPlayer( targetPosition, "Exiting vehicle");
success = true;
break;
}
}
NICE)) Thanks!
Friends how to fix???
http://s44.radikal.ru/i104/1309/12/0b6220de08a6.png
http://s58.radikal.ru/i162/1309/1f/f774db98fa27.png
http://youtu.be/TEcOz7lLZGw
can you help me?
this is optional, if you not like old block blue for spawns and like more how zombie spawns replace this.
obj_VehicleSpawn.cpp
OLD CODE
NEW CODECode:void obj_VehicleSpawn::DoDraw()
{
#ifndef FINAL_BUILD
#if VEHICLES_ENABLED
if( g_Manipulator3d.IsSelected(this) || ( spawnedVehicle != NULL && g_Manipulator3d.IsSelected(spawnedVehicle)) )
#else
if( g_Manipulator3d.IsSelected(this) )
#endif
{
r3dColor clr = r3dColor::blue;
r3dRenderer->SetRenderingMode( R3D_BLEND_ALPHA | R3D_BLEND_ZC );
clr.A = 196;
r3dBoundBox localBBox = GetBBoxLocal();
r3dBoundBox bbox;
bbox.Org = GetPosition();// - 0.5f * m_bboxSize;
bbox.Org.y += .5f * localBBox.Size.y ;
bbox.Size = localBBox.Size;
r3dVector rotation = GetRotationVector();
// there's a bug with rotation so I've to swap the axis.
float temp;
temp = rotation.y;
rotation.y = rotation.x;
rotation.x = temp;
r3dDrawOrientedBoundBox( bbox, rotation, gCam, clr );
// r3dDrawUniformSphere ( GetPosition(), m_maxDist, gCam, clr );
r3dRenderer->Flush();
}
#endif
}
example shotCode:void obj_VehicleSpawn::DoDraw()
{
//#ifndef FINAL_BUILD
#if VEHICLES_ENABLED
/* if( g_Manipulator3d.IsSelected(this) || ( spawnedVehicle != NULL && g_Manipulator3d.IsSelected(spawnedVehicle)) )
#else
if( g_Manipulator3d.IsSelected(this) )
#endif
{*/
r3dColor clr = r3dColor::blue;
r3dRenderer->SetRenderingMode( R3D_BLEND_ALPHA | R3D_BLEND_ZC );
clr.A = 196;
r3dBoundBox localBBox = GetBBoxLocal();
r3dBoundBox bbox;
bbox.Org = GetPosition();// - 0.5f * m_bboxSize;
bbox.Org.y += .5f * localBBox.Size.y ;
bbox.Size = localBBox.Size;
r3dVector rotation = GetRotationVector();
// there's a bug with rotation so I've to swap the axis.
float temp;
temp = rotation.y;
rotation.y = rotation.x;
rotation.x = temp;
r3dDrawLine3D(GetPosition(), GetPosition() + r3dPoint3D(0, 20.0f, 0), gCam, 0.4f, r3dColor(242, 64, 0));
r3dDrawCircle3D(GetPosition(), 2.0f, gCam, 0.4f, r3dColor(242, 255, 0));
r3dRenderer->Flush();
/* }*/
#endif
}
http://img838.imageshack.us/img838/3244/p5cb.png
Thanks))