Skip to content

Commit

Permalink
Fix defective physics includes
Browse files Browse the repository at this point in the history
  • Loading branch information
Drombeys committed Feb 9, 2024
1 parent 2217431 commit fcd25ad
Show file tree
Hide file tree
Showing 111 changed files with 289 additions and 290 deletions.
8 changes: 4 additions & 4 deletions src/xrGame/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "CustomOutfit.h"
#include "actorcondition.h"
#include "UIGameCustom.h"
#include "matrix_utils.h"
#include "../xrPhysics/matrix_utils.h"
#include "clsid_game.h"
#include "game_cl_base_weapon_usage_statistic.h"
#include "Grenade.h"
Expand All @@ -39,7 +39,7 @@
#include "ai_space.h"
#include "trade.h"
#include "inventory.h"
#include "Physics.h"
#include "../xrPhysics/Physics.h"
#include "level.h"
#include "GamePersistent.h"
#include "game_cl_base.h"
Expand All @@ -48,13 +48,13 @@
#include "string_table.h"
#include "usablescriptobject.h"
#include "../xrEngine/cl_intersect.h"
#include "ExtendedGeom.h"
#include "../xrPhysics/ExtendedGeom.h"
#include "alife_registry_wrappers.h"
#include "../Include/xrRender/Kinematics.h"
#include "artefact.h"
#include "CharacterPhysicsSupport.h"
#include "material_manager.h"
#include "IColisiondamageInfo.h"
#include "../xrPhysics/IColisiondamageInfo.h"
#include "ui/UIMainIngameWnd.h"
#include "map_manager.h"
#include "GameTaskManager.h"
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/Actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "fire_disp_controller.h"
#include "entity_alive.h"
#include "PHMovementControl.h"
#include "PhysicsShell.h"
#include "../xrPhysics/PhysicsShell.h"
#include "InventoryOwner.h"
#include "../xrEngine/StatGraph.h"
#include "PhraseDialogManager.h"
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ActorCameras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "level.h"
#include "../xrEngine/cl_intersect.h"

#include "elevatorstate.h"
#include "../xrPhysics/elevatorstate.h"
#include "CharacterPhysicsSupport.h"
#include "EffectorShot.h"

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ActorVehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "PHDestroyable.h"
#include "Car.h"
#include "../Include/xrRender/Kinematics.h"
#include "PHShellSplitter.h"
#include "../xrPhysics/PHShellSplitter.h"

#include "actor_anim_defs.h"
#include "game_object_space.h"
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/Actor_Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "ActorEffector.h"

#include "PHWorld.h"
#include "../xrPhysics/PHWorld.h"
#include "level.h"
#include "xr_level_controller.h"
#include "game_cl_base.h"
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/Artefact.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "stdafx.h"
#include "artefact.h"
#include "PhysicsShell.h"
#include "../xrPhysics/PhysicsShell.h"
#include "PhysicsShellHolder.h"
#include "game_cl_base.h"

Expand All @@ -11,7 +11,7 @@
#include "level.h"
#include "ai_object_location.h"
#include "xrServer_Objects_ALife_Monsters.h"
#include "phworld.h"
#include "../xrPhysics/phworld.h"
#include "restriction_space.h"
#include "../xrEngine/IGame_Persistent.h"

Expand Down
22 changes: 11 additions & 11 deletions src/xrGame/BastArtifact.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////
// BastArtifact.cpp
// BastArtefact - àðòåôàêò ìî÷àëêà
// BastArtefact - артефакт мочалка
///////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "BastArtifact.h"
#include "PhysicsShell.h"
#include "extendedgeom.h"
#include "../xrPhysics/PhysicsShell.h"
#include "../xrPhysics/extendedgeom.h"
#include "ParticlesObject.h"


Expand All @@ -30,7 +30,7 @@ CBastArtefact::~CBastArtefact(void)
{
}

//âûçûâàåòñÿ ïðè ñòîëêíîâåíèè ìî÷àëêè ñ ÷åì-òî
//вызывается при столкновении мочалки с чем-то
void CBastArtefact::ObjectContactCallback(bool& /**do_colide/**/,bool bo1,dContact& c,SGameMtl * /*material_1*/,SGameMtl * /*material_2*/)
{
dxGeomUserData *l_pUD1 = NULL;
Expand All @@ -40,7 +40,7 @@ void CBastArtefact::ObjectContactCallback(bool& /**do_colide/**/,bool bo1,dConta

if(!l_pUD1 || !l_pUD2) return;

//îïðåäåëèòü êòî åñòü êòî, èç äâóõ ñòîëêíóâøèõñÿ ïðåäìåòîâ
//определить кто есть кто, из двух столкнувшихся предметов
CBastArtefact *pBastArtefact = l_pUD1 ? smart_cast<CBastArtefact*>(l_pUD1->ph_ref_object) : NULL;
if(!pBastArtefact) pBastArtefact = l_pUD2 ? smart_cast<CBastArtefact*>(l_pUD2->ph_ref_object) : NULL;
if(!pBastArtefact) return;
Expand All @@ -55,7 +55,7 @@ void CBastArtefact::ObjectContactCallback(bool& /**do_colide/**/,bool bo1,dConta

void CBastArtefact::BastCollision(CEntityAlive* pEntityAlive)
{
//ïîïàëè âî ÷òî-òî æèâîå
//попали во что-то живое
if(pEntityAlive && pEntityAlive->g_Alive())
{
m_AttakingEntity = NULL;
Expand Down Expand Up @@ -133,12 +133,12 @@ void CBastArtefact::UpdateCLChild()
//Log ("--- A - CBastArtefact",*cName());
//Log ("--- A - CBastArtefact",renderable.xform);

//ñîâðåìåíåì ýíåðãèÿ ïî íåìíîãó òîæå óìåíüøàåòñÿ
//современем энергия по немногу тоже уменьшается
if(m_fEnergy>0) m_fEnergy -= m_fEnergyDecreasePerTime*Device.fTimeDelta;

if (getVisible() && m_pPhysicsShell) {
if(m_bStrike) {
//âûáðàòü æåðòâó, åñëè îíà åùå íå âûáðàíà
//выбрать жертву, если она еще не выбрана
if(!m_AliveList.empty() && m_AttakingEntity == NULL) {
CEntityAlive* pEntityToHit = NULL;
if(m_AliveList.size()>1)
Expand All @@ -164,7 +164,7 @@ void CBastArtefact::UpdateCLChild()
{
m_fEnergy -= m_fStrikeImpulse;

//áðîñèòü àðòåôàêò íà âûáðàííóþ öåëü
//бросить артефакт на выбранную цель
Fvector dir;
m_AttakingEntity->Center(dir);
dir.sub(this->Position());
Expand Down Expand Up @@ -219,7 +219,7 @@ void CBastArtefact::Hit (SHit* pHDS)

if(m_fEnergy>m_fEnergyMax) m_fEnergy = m_fEnergyMax;

//÷òîá âûñòðåë íå ïîâëèÿë íà òðàåêòîðèþ ïîëåòà àðòåôàêòà
//чтоб выстрел не повлиял на траекторию полета артефакта
HDS.impulse = 0;
}

Expand All @@ -228,7 +228,7 @@ void CBastArtefact::Hit (SHit* pHDS)
}


//îáúåêò ìîæíî ïîäíÿòü òîëüêî â ñïîêîéíîì ñîñòîÿíèè
//объект можно поднять только в спокойном состоянии
bool CBastArtefact::Useful() const
{
if(m_fEnergy>0)
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/BlackDrops.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////
// BlackDrops.cpp
// BlackDrops - ÷åðíûå êàïëè
// BlackDrops - черные капли
///////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "BlackDrops.h"
#include "PhysicsShell.h"
#include "../xrPhysics/PhysicsShell.h"


CBlackDrops::CBlackDrops(void)
Expand Down
10 changes: 5 additions & 5 deletions src/xrGame/BlackGraviArtifact.cpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
///////////////////////////////////////////////////////////////
// BlackGraviArtifact.cpp
// BlackGraviArtefact - ãðàâèòàöèîííûé àðòåôàêò,
// òàêîé æå êàê è îáû÷íûé, íî ïðè ïîëó÷åíèè õèòà
// BlackGraviArtefact - гравитационный артефакт,
// такой же как и обычный, но при получении хита
///////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "BlackGraviArtifact.h"
#include "PhysicsShell.h"
#include "../xrPhysics/PhysicsShell.h"
#include "entity_alive.h"
#include "ParticlesObject.h"
#include "phmovementcontrol.h"
#include "xrmessages.h"
#include "physicsshellholder.h"
#include "explosive.h"
#include "PHWorld.h"
#include "../xrPhysics/PHWorld.h"
#include "CharacterPhysicsSupport.h"
extern CPHWorld* ph_world;
CBlackGraviArtefact::CBlackGraviArtefact(void)
Expand Down Expand Up @@ -126,7 +126,7 @@ void CBlackGraviArtefact::Hit (SHit* pHDS)
if(HDS.impulse>m_fImpulseThreshold)
{
m_bStrike = true;
//÷òîá âûñòðåë íå ïîâëèÿë íà òðàåêòîðèþ ïîëåòà àðòåôàêòà
//чтоб выстрел не повлиял на траекторию полета артефакта
HDS.impulse = 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/Bolt.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "stdafx.h"
#include "bolt.h"
#include "ParticlesObject.h"
#include "PhysicsShell.h"
#include "../xrPhysics/PhysicsShell.h"
#include "xr_level_controller.h"

CBolt::CBolt(void)
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/Bolt.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "missile.h"
#include "DamageSource.h"
#include "../xrPhysics/DamageSource.h"
class CBolt :
public CMissile,
public IDamageSource
Expand Down
6 changes: 3 additions & 3 deletions src/xrGame/BreakableObject.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "stdafx.h"
#include "BreakableObject.h"
#include "xrserver_objects_alife.h"
#include "PHStaticGeomShell.h"
#include "PhysicsShell.h"
#include "Physics.h"
#include "../xrPhysics/PHStaticGeomShell.h"
#include "../xrPhysics/PhysicsShell.h"
#include "../xrPhysics/Physics.h"
#include "../xrEngine/xr_collide_form.h"
#include "../Include/xrRender/Kinematics.h"

Expand Down
3 changes: 1 addition & 2 deletions src/xrGame/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ file(GLOB_RECURSE XGM_SOURCE_ALL_FILES
"*.h"
"../xrServerEntities/*.*"
"../xrGameSpy/gamespy/md5c.c"
"../xrPhysics/*.*"
"../xrPhysics/*.cpp"
)
file(GLOB_RECURSE XGM_SOURCE_AI_FILES
"ai/*.*"
Expand Down Expand Up @@ -130,7 +130,6 @@ target_precompile_headers(xrGame PUBLIC "stdafx.h")
target_include_directories(xrGame PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
target_include_directories(xrGame PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../xrServerEntities/")
target_include_directories(xrGame PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/ui/")
target_include_directories(xrGame PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../xrPhysics")
target_include_directories(xrGame PUBLIC "${IXRAY_SDK_INC}")

# Project defines
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/CaptureBoneCallback.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "physicsshell.h"
#include "../xrPhysics/physicsshell.h"

struct CPHCaptureBoneCallback :
public NearestToPointCallback
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/Car.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//#if 0

#include "ParticlesObject.h"
#include "Physics.h"
#include "../xrPhysics/Physics.h"

#ifdef DEBUG
# include "../xrEngine/StatGraph.h"
Expand All @@ -29,7 +29,7 @@
#include "CarWeapon.h"
#include "game_object_space.h"
#include "../xrEngine/gamemtllib.h"
#include "PHActivationShape.h"
#include "../xrPhysics/PHActivationShape.h"
#include "CharacterPhysicsSupport.h"
#include "car_memory.h"

Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/Car.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
//#if 0

#include "entity.h"
#include "PHDynamicData.h"
#include "../xrPhysics/PHDynamicData.h"
#include "../xrPhysics/PhysicsShell.h"
#include "../xrPhysics/PHUpdateObject.h"
#include "script_entity.h"
#include "CarLights.h"
#include "holder_custom.h"
#include "PHSkeleton.h"
#include "DamagableItem.h"
#include "phcollisiondamagereceiver.h"
#include "../xrPhysics/phcollisiondamagereceiver.h"
#include "CarDamageParticles.h"
#include "xrserver_objects_alife.h"
#include "CarDamageParticles.h"
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/CarDamageParticles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "PHDestroyable.h"
#include "Car.h"
#include "../Include/xrRender/Kinematics.h"
#include "PHWorld.h"
#include "../xrPhysics/PHWorld.h"
extern CPHWorld* ph_world;
void read_bones(IKinematics *K, LPCSTR S , xr_vector<u16>& bones)
{
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/CarDoors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "PHDestroyable.h"
#include "car.h"
#include "../Include/xrRender/Kinematics.h"
#include "MathUtils.h"
#include "../xrPhysics/MathUtils.h"
#include "game_object_space.h"
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool CCar::DoorHit(float P,s16 element,ALife::EHitType hit_type)
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/CarExhaust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "PHDestroyable.h"
#include "car.h"
#include "../Include/xrRender/Kinematics.h"
#include "PHWorld.h"
#include "../xrPhysics/PHWorld.h"
extern CPHWorld* ph_world;

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/CarLights.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "PHDestroyable.h"
#include "Car.h"
#include "../Include/xrRender/Kinematics.h"
#include "PHWorld.h"
#include "../xrPhysics/PHWorld.h"
extern CPHWorld* ph_world;

SCarLight::SCarLight()
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/CarSound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "PHDestroyable.h"
#include "car.h"
#include "../Include/xrRender/Kinematics.h"
#include "PHWorld.h"
#include "../xrPhysics/PHWorld.h"
extern CPHWorld* ph_world;
CCar::SCarSound::SCarSound(CCar* car)
{
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/CarWeapon.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "stdafx.h"
#include "CarWeapon.h"
#include "PhysicsShell.h"
#include "../xrPhysics/PhysicsShell.h"
#include "PhysicsShellHolder.h"
//#include "../Include/xrRender/Kinematics.h"
#include "../Include/xrRender/Kinematics.h"
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/CarWheels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "PHDestroyable.h"
#include "car.h"
#include "../Include/xrRender/Kinematics.h"
#include "ExtendedGeom.h"
#include "../xrPhysics/ExtendedGeom.h"

CCar::SWheel::SWheelCollisionParams::SWheelCollisionParams()
{
Expand Down
Loading

0 comments on commit fcd25ad

Please sign in to comment.