- Joined
- Jun 30, 2013
- Messages
- 421
- Reaction score
- 157
Hello everyone, long thought, and decided to share with the community is not a big useless function, it is called "Apex Destruction"
Attention! Server version is not complete, there are drawbacks, and various bugs that other people do not see how you destroy objects!
For a start no need for download Apex and PhysX:
Put the contents of archives on the way: WarZ\src\External (It is desirable to first remove the old).
Added to the client side:
Open your WarZ.sln
Search this
Search this
If neither of which I have not forgotten that on the client side are done, you can go to the studio, load the map and add objects to the destruction of.
Attention! Apex uses to destroy their own objects!
object_name.apb
They are on the way: ObjectDepot\ApexObjects
Now, on to add to the server side.
Open your Warz_Server.slh
Search this
Replace this:
Search this
Replace this:
Create obj_ApexDestructible.cpp
Create obj_ApexDestructible.h
Compile server.......
Like everything, oh destroying work only at high graphics settings!
Sorry for my English, so I wrote this tutorial on memory, I hope not forgotten anything xDDD
I said earlier, this feature is useless, given below my craft unique objects, and a video demonstration:
[video=youtube;fF7xkWgZSn0]https://www.youtube.com/watch?feature=player_detailpage&v=fF7xkWgZSn0[/video]
Good luck.........
Attention! Server version is not complete, there are drawbacks, and various bugs that other people do not see how you destroy objects!
For a start no need for download Apex and PhysX:
You must be registered to see links
You must be registered to see links
You must be registered to see links
(extract and replaced - WarZ\bin) Put the contents of archives on the way: WarZ\src\External (It is desirable to first remove the old).
Added to the client side:
Open your WarZ.sln
Search this
Replace this:#define APEX_ENABLED 0
#define APEX_ENABLED 1
Search this
Replace this:close->setSkipOcclusionCheck(true);
Compile.....clone->setSkipOcclusionCheck(true);
If neither of which I have not forgotten that on the client side are done, you can go to the studio, load the map and add objects to the destruction of.
Attention! Apex uses to destroy their own objects!
object_name.apb
They are on the way: ObjectDepot\ApexObjects
Now, on to add to the server side.
Open your Warz_Server.slh
Search this
#if APEX_ENABLED
g_pApexWorld->Simulate(substepSize, true);
g_pApexWorld->FetchResults(true);
#else
PhysXScene->simulate(substepSize);
m_needFetchResults = true;
#endif
Replace this:
#ifndef WO_SERVER
#if APEX_ENABLED
g_pApexWorld->Simulate(substepSize, true);
g_pApexWorld->FetchResults(true);
#else
PhysXScene->simulate(substepSize);
m_needFetchResults = true;
#endif
#endif
Search this
#if APEX_ENABLED
g_pApexWorld->Simulate(substepSize, i == numStepsReq - 2);
g_pApexWorld->FetchResults(true);
#else
PhysXScene->simulate(substepSize);
PhysXScene->fetchResults(true);
#endif
Replace this:
#ifndef WO_SERVER
#if APEX_ENABLED
g_pApexWorld->Simulate(substepSize, i == numStepsReq - 2);
g_pApexWorld->FetchResults(true);
#else
PhysXScene->simulate(substepSize);
PhysXScene->fetchResults(true);
#endif
#endif
Create obj_ApexDestructible.cpp
#include "r3dPCH.h"#include "r3d.h"
#include "GameCommon.h"
#include "multiplayer/P2PMessages.h"
#include "ServerGameLogic.h"
#include "obj_ApexDestructible.h"
IMPLEMENT_CLASS(obj_ApexDestructible, "obj_ApexDestructible", "Object");
AUTOREGISTER_CLASS(obj_ApexDestructible);
obj_ApexDestructible:bj_ApexDestructible()
{
#if APEX_ENABLED
ObjTypeFlags |= OBJTYPE_ApexDestructible;
#endif
}
obj_ApexDestructible::~obj_ApexDestructible()
{
#if APEX_ENABLED
ObjTypeFlags |= OBJTYPE_ApexDestructible;
#endif
}
BOOL obj_ApexDestructible::Load()
{
return FALSE;
}
BOOL obj_ApexDestructible::OnDestroy()
{
r3dOutToLog("obj_ApexDestructible %p destroyed\n", this);
return parent::OnDestroy();
}
BOOL obj_ApexDestructible::Update()
{
return parent::Update();
}
Create obj_ApexDestructible.h
#pragma once
#include "GameCommon.h"
#include "NetworkHelper.h"
class obj_ApexDestructible: public GameObject
{
DECLARE_CLASS(obj_ApexDestructible, GameObject)
public:
obj_ApexDestructible();
~obj_ApexDestructible();
virtual BOOL Load();
virtual BOOL OnDestroy();
virtual BOOL Update();
};
Compile server.......
Like everything, oh destroying work only at high graphics settings!
Sorry for my English, so I wrote this tutorial on memory, I hope not forgotten anything xDDD
I said earlier, this feature is useless, given below my craft unique objects, and a video demonstration:
[video=youtube;fF7xkWgZSn0]https://www.youtube.com/watch?feature=player_detailpage&v=fF7xkWgZSn0[/video]
You must be registered to see links
stlmnt_wall_section_01_str_3x.apb
barrier_sandbag_01_03x02_01.apb
stlmnt_bld_cln_genstore_01.apb
Good luck.........
Last edited: